Learn / Explainers / Context rot: five failure modes and four operations
Context rot: five failure modes and four operations
Animated explainer · 4:12 · from Chapter 7
Space plays and pauses · ← → step · F fullscreen
An animated explainer of context rot: why a fuller window makes an agent dumber, the five ways context fails, and the four operations that fix it.
Transcript
Every step of the animation, in the words it uses on screen. Select a line to jump to it.
From Chapter 7
Managing the Context Window
This explainer condenses a few pages of Chapter 7, which is in the full book. The chapter traces the ideas through a worked example; the preface and Part I are free to read online.
Questions
- Does a bigger context window make context rot obsolete?
- No. A bigger window raises the hard limit, which is a fact about storage, not attention. Measured performance degrades as input grows even when everything fits, and the soft limit sits well below the hard one and moves with the model and the task. A bigger window buys headroom, not focus. The context engineering guide covers why curation stays the work.
- How do I tell context poisoning from context clash?
- Poisoning is one false statement, usually a fact the agent invented or misread, that stays in the window and gets cited as ground truth. Clash is live contradiction: two instructions or two versions of a fact on the same desk, often an early guess and a later correction, with nothing marking which supersedes which. Fix poisoning by removing the false fact, since appending a correction only adds a clash; fix clash by pruning the superseded item. The post on context rot symptoms and fixes walks through each mode.
- Which of the four operations should I reach for first?
- The two cheap moves: trim tool results once they have been acted on (compress) and write the plan to a file the agent re-reads after a reset (write). Chapter 7 says most tasks need only these two. Add selection when the tool list or corpus is crowding the desk, and isolation when a subtask's exploration would bury the main thread. Size your own window with the context window budget planner.
- Is the 40% utilization ceiling a real limit?
- It is an illustrative rule of thumb that circulates among practitioners, not a constant. The real soft limit depends on your model and your task (harder reasoning saturates sooner than lookup), and the only trustworthy way to find it is to measure. Treat the number as a starting line you adjust, and treat the practice of keeping utilization low as sound.