liveBook · Manning

Context rot

As explained in Vibe Engineering

Context rot is the degradation of an AI agent's performance as an overloaded or stale conversation context accumulates irrelevant or conflicting information.

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

How Vibe Engineering covers it

How deep it goes
Explains length and positional effects, offers a utilization heuristic, and describes file-backed workflows as an alternative to compaction.
Examples
Uses a UserProfileCard prompt with a buried instruction and the GSD workflow with a CONTEXT.md decision file.
What you can do after
Evaluate context overload and distinguish length-related degradation from positional retrieval failures.
How it connects
Connects context rot to lost in the middle, context poisoning, context engineering, and compaction.

Also explained in

Compare how 2 books explain context rot →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Vibe Engineering. The section links point to the parts of the book it draws on.