§04 · Failure Modes

Attention degradation

Also called Context rot · Lost in the middle

The slow drop in output quality as a session grows and every token's attention is spread across more competing material.

Attention degradation is what happens to a model's output as the context window fills. Each token has a fixed attention budget; as the session accumulates file reads, test logs and old plans, that budget gets split across ever more tokens, and the signal on the pairs that matter thins out. The model is not tired or broken. It is doing the same computation over a worse ratio of relevant to irrelevant material.

You notice it as a slide rather than a break. Answers get more generic, an earlier instruction is quietly dropped, a mistake it fixed at turn ten comes back at turn thirty, and it starts describing files slightly wrong even though they are right there in the window. Because the decline is gradual there is no error to react to, and the instinct to keep going and re-explain adds more context and speeds the slide.

The remedy is unglamorous: keep sessions short and tasks bounded, compact at natural checkpoints, and start a fresh session with a written handoff when the current one is deep in the murk. Bigger windows delay the onset but do not remove it; the useful working length of a session is well short of its maximum.

In the tools
  • Claude CodeThe context indicator and /context show how full the window is; /compact and /clear are the two recovery moves.
  • AntigravityLong-running agents can be handed a fresh task with a summary rather than continued indefinitely in one thread.
In conversation

Same prompt, same repo. Two hours in and it's producing junk it would never have written at the start.

Attention degradation. The window's mostly logs now. Write down where you are, clear, and reload just the plan.

Related terms
Learn it in the school
Words are the easy part

Course 01 puts every one of these terms to work: you install Claude Code, run the loop, and ship a real project — permission modes, compaction, hooks and all.

Start Course 01 →