Agent Atlas

Atlas · models

Context rot

Models get less reliable as their context grows, and use the middle of it least.

Established practiceDepth 2 of 4Reviewed 2026-11-10

See it working: Plate IV

In plain words

A fuller context window does not make a sharper agent. Past a point, more text makes the model worse at finding and using what matters, and every extra token is paid for again on each turn.

How it works

Chroma tested 18 models and found that all of them did worse as input grew, even on simple tasks. Liu and colleagues found that models do best with information at the start or end of a long context and worst with information in the middle. Anthropic’s explanation: every token attends to every other, so attention is spread thinner as the context grows.

Going deeper

Plate IV follows a real Claude Code session through 715 model calls and five compactions, then compares one long session with clearing between tasks. The fixes are cheap: clear between unrelated tasks, keep instruction files short, and write what matters to files the next agent will read.

Sources

  1. Context Rot: How Increasing Input Tokens Impacts LLM Performance Chroma
    • In this report, we evaluate 18 LLMs, including the state-of-the-art GPT-4.1, Claude 4, Gemini 2.5, and Qwen3 models.
    • We demonstrate that even under these minimal conditions, model performance degrades as input length increases
    • Our results reveal that models do not use their context uniformly
  2. Lost in the Middle: How Language Models Use Long Contexts arXiv (Liu et al.)
    • performance is often highest when relevant information occurs at the beginning or end of the input context
    • significantly degrades when models must access relevant information in the middle of long contexts
  3. Effective context engineering for AI agents Anthropic
    • Context refers to the set of tokens included when sampling from a large-language model (LLM).
    • the model’s ability to accurately recall information from that context decreases.
    • Context, therefore, must be treated as a finite resource with diminishing marginal returns.
    • This results in n² pairwise relationships for n tokens.
    • Compaction typically serves as the first lever in context engineering to drive better long-term coherence.
    • These notes get pulled back into the context window at later times.
    • but returns only a condensed, distilled summary of its work
  4. Manage costs effectively Anthropic
    • Token costs scale with context size: the more context Claude processes, the more tokens you use.
    • Stale context wastes tokens on every subsequent message.
    • to start fresh when switching to unrelated work.
    • reads the conversation it summarizes
    • Teammates load CLAUDE.md, MCP servers, and skills automatically, but everything in the spawn prompt adds to their context from the start.
    • Shut down teammates when their work is done.

Quotes were checked against the live pages on 2026-11-10.