Context rot is the decline in a language model’s ability to accurately recall information from its context as the number of tokens in that context window increases. Anthropic attributes the concept to studies on needle-in-a-haystack style benchmarking, and reports that while some models exhibit more gentle degradation than others, the characteristic emerges across all models. Its practical consequence is that context must be treated as a finite resource with diminishing marginal returns rather than as a container to be filled.
Usage
Context rot is the empirical ground Anthropic gives for Context engineering: because recall degrades as context grows, the aim becomes finding the smallest possible set of high-signal tokens rather than supplying everything that might conceivably be relevant. Anthropic characterises the effect as a performance gradient rather than a hard cliff — models remain highly capable at longer contexts but may show reduced precision for information retrieval and long-range reasoning compared with their performance on shorter contexts.
It also shapes Anthropic’s position on context-window size. Anthropic argues that waiting for larger windows, while a tempting tactic, is unlikely to resolve the problem for the foreseeable future, because windows of all sizes remain subject to context pollution and information-relevance concerns wherever the strongest agent performance is wanted. The three techniques it recommends for long-horizon work — Compaction, Structured note-taking and Sub-agent architecture — are presented as ways of addressing these constraints directly.
A later post on long-running agents names context rot, alongside a context window’s hard token limit, as one of the reasons a multi-hour or multi-day agent run cannot simply rely on an ever-larger context window: the degradation is said to kick in well before that hard limit is reached.
LangChain’s The Anatomy of an Agent Harness uses the term, linking to research by Chroma, for models becoming worse at reasoning and completing tasks as their context window fills up, and treats it as a problem the agent harness has to manage — describing harnesses today as largely delivery mechanisms for good context engineering. It names three harness strategies: Compaction, which summarizes and offloads the context when the window is nearly full; Tool Call Offloading, which keeps only the head and tail of large tool outputs in context and writes the rest to the filesystem; and Skills, which use Progressive Disclosure so that too many tools or MCP servers are not loaded into context at the start, where they would degrade performance before the agent begins work.