Context rot is the degradation of an AI agent’s accuracy as its context grows. A larger window can hold more information without making that information reliably usable: even a relevant instruction may be lost amid the surrounding input. section 3.4.1 section 3.0
Context rot compounds the “lost in the middle” problem. Length can erode accuracy even when information is favorably placed; burying a key detail in the middle can make retrieval worse. Stale or wrong information is a separate failure, called context poisoning. section 3.4.1 section 3.0
A buried instruction
A prompt to fix a UserProfileCard component includes technology and architecture details alongside the critical instruction. If that instruction is buried in the middle of a long prompt, supplying it is not the same as making it easy to retrieve. section 3.4.1
Treat the advertised context window as headroom, not a budget to fill. A production rule of thumb puts noticeable degradation around 40% utilization, but that is a heuristic, not a guaranteed threshold. Select and structure context rather than assuming more input is always better. section 3.4.1 section 3.0
Compaction is one response, but another is to make the conversation disposable. Externalize project state into files such as specs, plans, research notes, and validation contracts, then start fresh agent sessions for tasks. In the GSD workflow, a discussion records product decisions in CONTEXT.md before planning, execution, and verification. section 3.5.3 section 3.5.3

