Context Rot
A long session slowly getting worse.
The gradual decline in output quality as a context fills with stale attempts, corrected mistakes, dead ends and irrelevant tool output. Quality degrades before the window is full.
Symptoms: the agent revisits rejected approaches, forgets a constraint agreed earlier, contradicts itself. The cure is clearing or compacting, not a better prompt.
The distinguishing feature is that nothing is broken and everything is worse. Every individual item in the context was once relevant; the accumulation is the problem. Because there is no error to find, the failure presents as the model "getting worse" partway through a task.
The session that argued with itself
An agent keeps re-proposing an approach that was rejected ninety minutes earlier.
The rejection is in context, competing with everything since. A brief handoff to a clean session that states the decision and the reason removes the noise and the behaviour stops immediately — no prompt change required.
- blogEffective context engineering for AI agents ↗
Defines context engineering as curating everything supplied at inference, names context rot, and covers just-in-time retrieval, compaction and keeping the window high-signal.
- docsContext windows ↗
What actually consumes the window — input, tools, thinking and output — plus context rot and compaction. Authoritative for this product, not for models generally.
Clearing · Context reset
Deliberately throwing away the context to get a clean head.
Compaction · Summarisation
Replacing old context with a shorter summary of it.
Attention Budget
The finite share of the model’s focus each token gets.
Smart Zone
The window size where the model is still sharp.
Session
One continuous run of work with the agent, with its own accumulated history.