Definitions
What Is Context Decay? Definition, Mechanism, and How It Happens
Context decay is the informal, umbrella name people reach for when an AI agent's grip on its own context window loosens over a session. This entry defines it precisely, breaks down the two distinct mechanisms it usually points at (context rot and context drift), and walks through how the decay actually happens step by step.

Context decay is the informal name for an AI agent's context window becoming a less reliable basis for its next action as a session goes on: information that was available and correctly used earlier stops being used correctly, even though nothing was deleted and the model itself never changed. It happens through two distinct, separately studied mechanisms that the phrase conflates: the model's own ability to retrieve and weigh information degrading as the window grows longer (what the research literature calls context rot), and the window's contents going stale relative to the world the agent is acting in (context drift). Most sessions that "feel" like context decay are actually one of these two, or both at once; which one you're looking at determines which fix applies.
"Context decay" itself is not a term with a single formal definition in the literature the way context rot is. It is the question people type in when something is clearly going wrong with how an agent uses its own context, before they know which of the two underlying mechanisms is responsible. This entry exists to answer that question directly, and to route you to the precise mechanism once you know which one applies.
How context decay happens, step by step
Four things happen over the course of a long-running session, and each one chips away at the reliability of the context window independently of the others.
- The window fills up. Every tool call, retry, and partial result gets appended. Nothing the agent does shrinks the window on its own; only deliberate compaction does, and compaction is lossy by construction.
- Retrieval gets less reliable as length grows. This is the part context rot names specifically. A 2025 Chroma technical report tested 18 models on controlled tasks and found performance degraded as input length increased even when the task and the needed information stayed constant, contradicting the assumption that a model handles its 10,000th token as reliably as its 100th (Context Rot, Chroma, 2025). Earlier work had already found a positional component to this: models tend to use information at the very start and very end of a long input more reliably than information buried in the middle (Liu et al., 2023).
- The window's contents stop matching reality. This is context drift, and it is an entirely separate failure from rot. A file gets edited, a ticket closes, an API's data changes, but the agent's context still holds the version it read three turns ago. The information is retrieved just fine; it is simply no longer true. Rot is a model-behavior problem. Drift is a data-freshness problem. A session can have either one alone or both at once, and the two compound rather than overlap.
- Compaction loses the quiet constraints. Once a session runs long enough that raw history has to be summarized or truncated, something has to be cut. What gets cut disproportionately is the material that looked unimportant at the time: the edge case mentioned once, the reason an earlier approach was rejected. The agent keeps producing plausible output, just against a thinner version of its own past.
None of these four steps requires a model update, a new deployment, or any external cause. That is the signature that distinguishes context decay from model drift: the weights are frozen the entire time, and what degrades is the state the model is conditioning on.
Context decay vs. context rot vs. context drift
Context decay (the umbrella term) | Context rot | Context drift | |
|---|---|---|---|
What degrades | The window's overall reliability as a basis for action | The model's ability to retrieve and weigh information it still has | The accuracy of the information itself, relative to the present |
Cause | Combination of rot and drift over session length | Window length, distractor density, position | Time elapsed since the information was captured, world-state changes |
Fix lives in | Both of the columns to the right | Curation, compaction strategy, re-anchoring | Re-fetching, invalidation, timestamping captured facts |
Studied as its own term? | No formal definition; used colloquially | Yes, named and measured directly (Chroma, 2025) | Described but not yet named as a standalone research term on most sites |
If you're trying to decide which mechanism you're actually facing in a given session, two quick tests separate them. First, re-run the exact same prompt against a length-matched but noise-free context: if accuracy recovers, you were looking at rot (or at distractor accumulation, a close cousin); if the answer is still wrong, the agent is confidently using stale information, which is drift. Second, check the provenance of anything the agent cites as current: a cited fact that is correct for an earlier point in time but wrong now is drift; a cited fact that was never correct, surfaced from a distractor or a failed attempt treated as current, is rot.
How to measure it
Context decay shows up in behavior before it shows up in any single metric, because each individual output along the way still looks plausible on its own.
- Accuracy vs. session length. Replay a fixed probe task at intervals with the live session's accumulated context prepended, and plot accuracy against turn count or token count, per drift regression tests. A downward slope at constant task difficulty is the rot signature.
- Staleness checks. For any fact the agent treats as current, diff it against the live source (file, API, ticket state) it originally came from. A mismatch is drift, not rot, regardless of how confidently the agent states it.
- Instruction loss. Enumerate the session's hard constraints once at the start, then check each later output against that list. Constraints violated later in a session that were honored earlier point at either rot (the constraint got buried) or compaction loss (the constraint got summarized away).
- Distractor capture. Watch for the agent citing a superseded plan, a failed attempt, or an earlier wrong answer as if it were the current state of affairs. This is a strong signal for rot specifically, though check provenance before attributing it, since stale external memory can produce the same symptom.
Mitigation
Treat the context window as a curated budget rather than an append-only log. For the rot side, keep sessions and prompts no longer than the task needs, and re-inject the goal and key constraints periodically so they sit in the high-attention recent region of the window rather than buried early, a pattern covered in re-anchoring patterns. For the drift side, don't let facts age silently in context: timestamp anything captured from an external source, and re-fetch rather than reuse when a decision depends on current state. For both, the strongest structural fix is keeping durable facts, decisions, and goals outside the context window entirely, in files or a ledger the agent reads on demand instead of carrying forward by default, which is the core idea behind state externalization. When a session has accumulated enough of either failure that recovery is uncertain, starting a fresh session from a small, verified state file is usually cheaper than trying to detox a polluted one in place.
Related terms
- Context rot: the precisely studied mechanism behind the retrieval half of context decay, with citations and a dedicated FAQ distinguishing it from drift.
- Behavioral state decay: the broader umbrella phenomenon this site tracks, of which context decay is the context-window-specific slice.
- Agent drift: a taxonomy: where context-related failures sit within the wider classification of agent drift.
- State externalization: the main preventive pattern for both rot and drift.
- Drift regression tests: how to measure decay quantitatively rather than by anecdote.
FAQ
What is context decay? It's the informal name for an AI agent's context window becoming a less reliable basis for its actions as a session continues, usually because of context rot (retrieval and weighting failing as the window grows), context drift (the window's contents going stale relative to the real world), or both together.
Is context decay the same as context rot? No. Context rot is one specific, named mechanism: the model's own retrieval and weighting of information degrading as input length grows, even when that information is unchanged and correct. Context decay is the broader, informal umbrella that also covers context drift, where the information itself has gone stale. People often mean rot specifically when they say "context decay," but the two aren't interchangeable.
Does clearing or summarizing the context fix context decay? Partially, and it can also make things worse. Summarization shrinks the window, which helps with rot, but it is lossy: it tends to drop the quiet constraints that looked unimportant at the time, which can itself look like decay afterward. It does nothing for drift, since a well-written but stale summary is still stale.
Can context decay happen in a short session? Rot specifically needs enough accumulated length and distractor density to matter, so it's rare in short sessions. Drift has no length requirement at all: a single tool call can return already-stale data, and a short session built on that call is just as exposed as a long one.