AI CompendiumA public chart of the language
Home / Failure Modes / Context Rot
Failure Modes

Context Rot

A long session slowly getting worse.

Definition

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.

How people use it
Hour two of a debugging session.
"It has gone stale. Write a handover note, clear the session, and try again clean."
Worked example

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.

Sources
  • blogEffective context engineering for AI agents ↗Anthropic Engineering · 2025

    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 ↗Claude platform docs · 2026

    What actually consumes the window — input, tools, thinking and output — plus context rot and compaction. Authoritative for this product, not for models generally.

Related terms