AI GLOSSARY · AI CONCEPTS

Context rot

Markdown version

Definition

Context rot is the drop in a language model's accuracy and recall as the amount of text in its context window grows. Anthropic's documentation uses the term; there is no single agreed measurement.

Also called: context rot LLM, context degradation, long context degradation, context decay.

In plain language

Context rot is what happens when you keep piling material into a conversation with an AI and its answers get less reliable. Think of a desk covered in papers: the one page you need is still there, but it is easier to miss or mix up with the others. The model does not run out of room first; it can get worse well before the limit. For a coding agent this means long sessions full of old file reads and tool output can produce more slips than a short, focused one. Curating relevant material, starting fresh or summarising can help on some tasks, but none guarantees a fix: removing needed evidence can also hurt. Test the model and workload you actually use.

Technical definition

Anthropic's context window documentation says that as token count grows, accuracy and recall degrade, a phenomenon known as context rot, so curating what is in context matters as much as how much space is available. The Chroma technical report (July 2025) tested 18 models and reports that performance grows increasingly unreliable as input length grows, with lower question-to-answer similarity and added distractors making it worse; the authors say they do not explain the underlying mechanisms. An earlier paper, Lost in the Middle (Liu et al., arXiv 2307.03172), found that performance can be highest when relevant information is at the start or end of the input and lower when it sits in the middle. These are measurements on specific tasks and models, not a law.

Worked examples in this catalogue

Catalogue examples point at a skill, guide or coding tool listed on this site, with what to run and what you see. An example marked illustrative describes the item from its own documentation; it was not executed for this page. Platform Scores are our assessment under a published method, not a safety guarantee.

  1. Skill by Skill Almanac · Illustrative, not executed

    context-window-packer 56/100 · Provisional, not yet measuredScored · Method v0.2 · How we score

    What you see
    Chooses which files fit one prompt's token budget and records what was kept, shrunk or dropped, and why.
    Why it exercises the concept
    It is a deliberate way to curate context. Choosing what goes in, instead of pasting everything, is one way to curate context, which the documentation says matters.
  2. Guide · Illustrative, not executed

    What Is an LLM? The Facts Agent Users Need

    What you see
    A guide distinguishing model behavior from the surrounding application, with Transformer/BERT examples, context limits and service-specific usage considerations.
    Why it exercises the concept
    It explains runtime context versus learned parameters and saved application state. It does not establish that every application resends all history or that a shorter prompt guarantees better answers.
  3. Coding tool · Illustrative, not executed

    Claude Code

    What to try
    /context
    What you see
    Claude Code visualizes current context usage as a colored grid and shows optimization suggestions for context-heavy tools and memory bloat.
    Why it exercises the concept
    It makes the size of the context visible before a session gets long, which is when degradation becomes a concern.

How it shows up when you use agents

In a long Claude Code, Codex or Cursor session, the context window fills with your messages, file reads, command output and tool results. Accuracy and recall can decline with longer inputs in particular tasks and models. Session elapsed time alone does not establish this cause; applications may compact, summarize or drop earlier material, so the model need not still see everything. Typical signs are forgotten instructions, a file edited as if an older version were current, or an answer that ignores something stated earlier.

What breaks when this is misunderstood: people assume a larger window means the model uses all of it equally well, and keep one session running for days. The Chroma report found better results on focused prompts than on full conversations for one of its tasks, which fits this habit.

Next actions. Check how full the session is with /context in Claude Code. Start a fresh session for a new task. Use /compact with instructions naming what to keep. Load just the files the task needs; the context window packer skill is one way to decide. The wider practice is called context engineering. Storing notes outside the conversation is covered under agent memory.

Common confusions

  • Context rot versus hitting the limit. At the limit the API returns an error or stops generating. Context rot is a decline in quality that can appear well before that point.
  • Context rot versus hallucination. A hallucination is unsupported output. Context rot is one condition under which more of it, or more missed details, can occur.
  • Lost in the middle versus context rot. Lost in the middle is a finding about position: information in the middle of the input was used less well in that paper's tests. Context rot is the broader term for degradation with length.
  • Myth: it affects all models the same way. The Chroma report describes differences between models and tasks, and says it does not explain the mechanisms. Test your own workload instead of relying on a general rule.

Terms that mention Context rot

1 terms mention this one

Guides that mention Context rot

More in AI concepts

Next steps

  1. What Is an LLM? The Facts Agent Users Need The long-form guide.
  2. context-window-packer A skill that exercises it.
  3. Context window Related term.
  4. Token Related term.
  5. All glossary terms A to Z and by family.

Sources

Definitions are written by Skill Almanac from these sources and were checked against them on 2026-11-25. Wikipedia is never the only source.

Review record

Last verified

Drafted by Claude (original draft); OpenAI Codex (bounded factual repairs); sources and example targets checked by Independent automated source review (OpenAI Codex); not human peer review on 2026-11-25. Last verified .

Change log (5)
  • : Independent automated factual/example review completed. Cached US query estimate aligned to receipt; no traffic promise. Final technical gate recorded separately; publication disabled.
  • : First version.
  • : Verifier pass: applied verifier corrections to wording, aliases and claims.
  • : Bounded source repairs: Removed guaranteed context fix and elapsed-time causal account; matched current architecture/context guide rather than stale API/history claims. Pending independent re-review.
  • : Automated review completed; approved for the staged public release. Search indexing is controlled by the release configuration.