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

Measures outside the catalogue

  • Track input tokens per turn and alert when they grow without compaction.

Misused patterns

Related anti-patterns

Sources

Content reviewed on 2026-10-05

Anti-pattern catalogue