Urgent.News

What's breaking now, across thousands of outlets.

AI

What Is Context Rot? Why AI Agents Degrade Mid-Session

Originally published at getunblocked.com on August 10, 2026. Context rot is the gradual degradation of an LLM's output quality as its context grows — the model starts missing, misreading, or ignoring information that is still right there in the window. It sets in long before the window is full, and it is the usual reason an agent that felt sharp for the first hour starts fumbling in the second.…

Context rot is the gradual decline in an LLM's output quality as its context window expands. This happens even though all the necessary information remains present within the window. The reason behind this is the finite attention budget of the model, where every token competes for the model's attention, causing accuracy and recall to degrade as the token count increases. This issue is distinct from hallucination and model staleness, which are unrelated causes of output degradation.

The primary cause of context rot is the limited attention budget. As the model processes more tokens, each token's attention is diluted, reducing the model's ability to accurately use the information it already has. Position matters, as models tend to weight the beginning and end of the context window more reliably than the middle. This is especially problematic in long-agent sessions where accumulated stale tool output and abandoned approaches compete for attention with relevant tokens.

Symptoms of context rot in an agent session include forgotten instructions, contradicted decisions, repeated work, confident misquotes, and trial-and-error drift. These issues arise because the model loses focus on the actual task as the context window grows and becomes burdened by irrelevant information. The human cost of context rot is significant, as degraded AI output increases the verification burden on developers, as evidenced by the 2026 State of Code survey, where 96% of developers do not fully trust AI-generated code.

Contrary to popular belief, a larger context window does not fix context rot. In fact, expanding the window can exacerbate the problem, as it provides more room for the degradation to operate. Instead, the solution lies in curating the context by selecting only the most relevant information, rather than simply enlarging the window. Teams can also employ retrieval on demand techniques to pull relevant history as needed, rather than hoping the context window still holds the necessary information.

In conclusion, context rot is a critical issue for AI agents, as it leads to degraded output and increased verification burdens for developers. While larger context windows are advertised, they do not effectively solve the problem, and effective context management requires careful curation of the information included in the window.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in AI

More from Tuesday 11 August →