Skip to content
Concept

Context Rot

Context Rot — Concept. definition: Performance degradation as context grows, attention diluted over too many tokens · nature: Judgment degradation as the context window fills up

Thariq, an engineer at Anthropic, puts the onset at roughly 300-400k tokens on the 1M-token model, depending on the task. Past that point performance falls off as attention dilutes across too many tokens: that is the mechanical definition of context rot. Chris Williams describes the same phenomenon at the level of judgment, cataloguing it as F3 among the eight failure modes an agentic development cycle has to defend against. The model's judgment degrades as the window fills, and it anchors on its own earlier outputs.

The reason it keeps resurfacing is that it constrains process design rather than model choice. Vivek Trivedy of LangChain treats it as one of the challenges the agent harness exists to answer, with compaction, offloading bulky tool results to the filesystem, and Skills as progressive disclosure. Williams builds a whole phase around it: P2 (Decompose) cuts the specification into atomic tickets sized for fresh agents, with explicit contracts at the boundaries. Neither remedy removes the degradation; both route work around it.

Thariq's practical answer is rewind. Instead of correcting inside a polluted session, return to the point just after the file reads and re-prompt with what was learned. His caution about compaction is sharper: it is lossy, and the model is at its least intelligent precisely when it decides what to keep.

Thariq expects Claude Code to eventually manage these mechanisms itself. Until then, session management stays a user skill.

Type
Concept
definition
Performance degradation as context grows, attention diluted over too many tokens
nature
Judgment degradation as the context window fills up
relations
5
Cited in
3 fiches

Neighborhood

Performance du modèle Performance de l'agent qualité du jugement … Compaction phase Decompose

→ reduces

Performance du modèle CONCEPT high confidence timeless Source ↗
Performance de l'agent CONCEPT high confidence timeless Source ↗
qualité du jugement à mesure que le contexte se remplit CONCEPT high confidence evolving Source ↗

← solves

Compaction CONCEPT high confidence timeless Source ↗

← reduces

phase Decompose METHODOLOGIE high confidence timeless Source ↗

Cited in (3)