AP25 · Unmanaged context growth
Family: Context and memory
Strong evidence
Original names: context rot, context stuffing, context distraction
Everything piles up in the window, and the agent makes less and less use of what is right in front of it.
Definition
History, tool results and whole documents stack up in the context, turn after turn, because the window is large. Nothing selects, summarises or prunes.
Observable symptoms
- Answer quality drops as the session gets longer.
- Information that is in the context gets ignored: the answer improves when the task is rerun with a smaller context.
- In the traces, input tokens grow at every turn without any compaction.
Why it hurts
A model’s ability to use a piece of information drops with input length, even when it retrieves that information perfectly. Where the information sits and the presence of distractors make it worse. And every turn rereads everything before it: cost goes up while quality goes down.
A defensible choice when…
- A short task, a few turns long, whose context stays well below the lengths where quality degrades.
Figures
- At 32,000 tokens, 11 of 13 models fall below half their short-context score; GPT-4o drops from 99.3% to 69.7%.
- Even when the model retrieves all the relevant information perfectly, its performance drops by 13.9% to 85% as the input gets longer.
- On LongMemEval, a focused prompt of about 300 tokens beats the full prompt of about 113,000 tokens (study by Chroma, which sells a vector database).
Remedies from the catalogue
- D1 · Compaction — Summarise the history as it nears a threshold, keeping decisions, open files and the goal.
- D2 · Structured notes and recited plan — Keep notes of the goal and the evidence, restated at the end of the context rather than buried in the middle.
- D5 · Context-isolation subagent — Hand heavy reading to a subagent that works in its own context and returns only a summary.
- C6 · Agentic search — Fetch information when the step needs it, instead of loading everything up front.
Measures outside the catalogue
- Track input tokens per turn and alert when they grow without compaction.
Misused patterns
Related anti-patterns
Sources
- NoLiMa: Long-Context Evaluation Beyond Literal Matching — Modarressi et al., ICML 2025, 2025-02
- Context Length Alone Hurts LLM Performance Despite Perfect Retrieval — Du et al., Findings of EMNLP 2025, 2025-10
- Context Rot — Hong, Troynikov et Huber, Chroma, 2025-07-14
Content reviewed on 2026-10-05