How Long-Context Agents Fail

Four named, documented ways long context degrades AI agent behavior — poisoning, distraction, confusion, and clash — with the specific benchmarks and real incidents behind each.

Yash Amin
13 min

What this page is — and isn't

This page documents four specific, named failure modes with real reported examples and benchmark results, cited inline. It is not a general survey of everything that can go wrong with an AI agent — it's the taxonomy specific to what happens when an agent's context window fills with the wrong tokens. Written and maintained by Crescent AI's engineering team, who build context-management systems for production agents; every figure below is attributed to the study it came from, and the FAQ above flags which claims are single-study results rather than settled fact.

The short version: a bigger context window doesn't fix this. Advertised window sizes grew nearly 5,000x between 2020 and 2025, but the four failure modes below aren't about running out of room — they're about what happens to a model's attention long before the window fills. Each has a distinct cause, a distinct documented example, and a distinct fix; treating them as one generic "long-context problem" is why generic fixes (just raise the window, just summarize more aggressively) so often don't work.

  • Poisoning — a hallucination gets embedded in context and repeatedly referenced as fact.
  • Distraction — the model over-relies on repeating its own history instead of reasoning fresh.
  • Confusion — irrelevant information (like unused tool definitions) degrades responses it shouldn't touch.
  • Clash — conflicting information causes the model to anchor on an early, later-contradicted assumption.

Methodology

The four-mode taxonomy below follows Drew Breunig's widely-cited June 2025 essay [1], which named and grounded each mode in a documented example rather than a theoretical description. Supporting evidence is drawn from published benchmarks and papers (RULER, Lost in the Middle, Chroma's Context Rot study, the Microsoft/Salesforce multi-turn study), each of which measures a specific synthetic or controlled task — not a live production agent. Where a finding comes from one study rather than a replicated consensus, the text says so.

Four Distinct Ways Context Degrades Agent Behavior

Independent researcher Drew Breunig's widely-cited analysis names four distinct failure modes, each traced to a concrete documented example rather than described in the abstract [1]. They aren't variations of the same problem — each has a different cause and a different fix.

0
tokens where a real agent began repeating stale prior actions
0
tools that had to be cut for an 8B model to pass a tool-use benchmark
0
avg. performance drop when info was split across turns vs. given at once

Context Length Isn't the Bottleneck — Effective Use Is

Advertised context windows grew from 2,048 tokens (GPT-3, 2020) to 4,096 (GPT-3.5, 2022), 128,000 (GPT-4 Turbo, 2023), 200,000 (Claude 3, 2024), 1,000,000 (Gemini 1.5 Pro, 2024), and 10,000,000 (Llama 4 Scout, 2025) — a roughly 5,000x increase in five years. If the four failure modes on this page were purely about running out of space, that growth should have made them rare. It hasn't.

Advertised context window size, by model release

Log scale — nominal window size only, not effective/reliable-use length [2]

The field has since converged on a name for this general phenomenon: context rot. In July 2025, Chroma Research evaluated 18 frontier models — including GPT-4.1, Claude Opus 4 and Sonnet 4, Gemini 2.5 Pro and Flash, and Qwen3 variants — on tasks well within each model's advertised window, and found that every single one degrades as input length grows [2]. The study identifies three compounding mechanisms: the lost-in-the-middle effect (models attend well to the start and end of a context but poorly to the middle), attention dilution (transformer attention scales quadratically, so 100K tokens of input means roughly 10 billion pairwise token relationships competing for the same attention budget), and distractor interference (content that's semantically similar but irrelevant to the task actively misleads the model, and even a single distractor measurably reduces performance versus a clean, needle-only context). NVIDIA's own RULER benchmark reaches a compatible conclusion from a different angle: despite near-perfect accuracy on simple retrieval, every model it tested showed large performance drops as sequence length increased across its 13 more demanding task types [3]. The window got bigger; what the model can reliably do with it didn't grow at the same rate.

Context Poisoning

A hallucination or error gets embedded into an agent's own context — a goals section, a memory note — and is then repeatedly referenced in later turns as if it were established fact. The documented case: a Gemini agent playing Pokémon hallucinated game-state details into its own goals section, then pursued unreachable goals built on that false premise for the rest of the run. Nothing in the model's reasoning was wrong given its (poisoned) inputs — the error was upstream, in what was allowed to persist as authoritative context without a correction path.

Context Distraction

As context grows very long, a model over-relies on repeating patterns from its own history instead of reasoning fresh about the current state. The same Gemini agent, past roughly 100K tokens, showed a measured tendency to repeat prior actions rather than synthesize new plans — the accumulated history of past moves began to outweigh the model's reasoning about the present situation.

Context Confusion

Superfluous information — most commonly, irrelevant tool definitions — gets incorporated into responses it shouldn't influence. A quantized Llama 3.1 8B model failed a tool-use benchmark when given all 46 available tools, but succeeded when given only the 19 tools actually relevant to the task. The model wasn't incapable of the task; it was confused by options it didn't need to see. This failure mode scales with model size — smaller models are more susceptible to it than frontier models with more parameters to spare.

Context Clash

Conflicting information introduced at different points in a session causes the model to act on an early assumption and fail to recover once later information contradicts it. Microsoft Research and Salesforce Research tested 15 leading LLMs across more than 200,000 simulated conversations and found a 39% average performance drop across six generation tasks when the same task was split across multiple turns instead of given all at once — and the effect showed up in conversations with as few as two turns [4]. The useful detail is in the breakdown: the model's best-case capability (what the researchers call aptitude) only fell by about 15%. The majority of the 39% drop came from reduced reliability — the model making an early assumption, prematurely committing to an answer built on it, and not reconciling the contradiction once later turns corrected it. The skill wasn't gone; the model just wouldn't backtrack. A 2026 follow-up study on long-horizon search tasks confirmed the same anchoring pattern holds under controlled, extreme context growth, not just in the original benchmark setting [5].

How These Failures Are Measured

BenchmarkWhat it testsLimitation
Needle-in-a-HaystackRetrieval of one planted fact in a long contextNVIDIA's own RULER paper calls it "indicative of only a superficial form" of long-context understanding
RULER (NVIDIA) [3]Synthetic tasks across 13 categories, configurable sequence lengthSynthetic, not a real agent trajectory
Lost in the Middle [6]Multi-document QA with relevant info at varying positionsPositional bias only — doesn't test poisoning, distraction, or clash directly
Context Rot [2]18-model sweep across input length, distractors, and format variationReports relative degradation, not absolute per-model accuracy at each token count

None of these substitute for testing your own agent: a generic long-context benchmark score doesn't tell you whether your specific agent's trajectory is vulnerable to any of the four modes above. The reference architecture and specific primitives that prevent each failure mode are covered in Context Engineering for Production AI Agents.

What's Next: Context Engineering as a Standard Discipline

The direction all of this evidence points the same way: context management is becoming a first-class engineering discipline rather than a side effect of prompt design. The practical patterns converging across production teams are compaction before the window fills (not after), structured and versioned memory instead of an ever-growing transcript, and tool-set scoping per task instead of exposing an agent's full tool catalog on every call. Expect next-generation agent benchmarks to weight exactly the metrics this page has been discussing — reliability across repeated turns, not just best-case aptitude — since that's the component the Microsoft/Salesforce breakdown shows actually explains most of the failure.

Risks and Mitigations

  • Context poisoning — don't let raw, unverified tool or model output persist indefinitely in an authoritative context section (goals, memory) without a correction path.
  • Context distraction — compact before the window fills, not after; treat "approaching the limit" as the trigger, not "at the limit."
  • Context confusion — scope the active toolset to what's relevant to the current task, not the full available set, especially on smaller models.
  • Context clash — present complete, non-contradictory information in fewer turns where possible; when contradiction is unavoidable, make the correction explicit rather than assuming the model will reconcile it.

For production incidents that trace back to these same root causes — tool-calling errors, silent quality drift — see AI Agent Failure Modes in Production. The general adoption and cost landscape these failure modes sit inside is covered in The State of Agentic AI in Production, 2026.

Is your agent's context management tested against these?

A generic benchmark score doesn't tell you whether your own agent's trajectory is vulnerable to poisoning, distraction, confusion, or clash.

Frequently Asked Questions

Context poisoning (a hallucination gets embedded and repeatedly referenced), context distraction (the model over-relies on repeating its own history instead of reasoning fresh), context confusion (irrelevant information degrades responses it shouldn't influence), and context clash (conflicting information at different points causes the model to act on an early, later-contradicted assumption). Each has a documented, named example, not just a theoretical description.
No. Hallucination is the model generating something false in a single response. Context poisoning is what happens after: a hallucination or error gets written into the agent's own context — a goals list, a memory note — and then repeatedly referenced as if it were fact, compounding across further turns. The documented case is a Gemini agent that hallucinated game-state details into its own goals section, then pursued unreachable goals built on the false premise.
No — nominal window size and effective, reliable-use length are different things. Chroma Research tested 18 frontier models in July 2025 and found every one of them degrades as input length grows, well within their advertised window limits. Advertised context windows grew from roughly 2,000 tokens (GPT-3, 2020) to 10 million (Llama 4 Scout, 2025), but the four failure modes on this page aren't solved by a bigger window — they're caused by what's competing for the model's attention inside it.
A Microsoft Research and Salesforce Research study of 15 leading LLMs measured a 39% average performance drop across six generation tasks when the same task was split across multiple turns instead of given all at once. Their breakdown found the model's best-case capability (aptitude) only fell by about 15% — the majority of the 39% drop came from reduced reliability: the model locking onto an early wrong assumption and failing to recover, not from losing the underlying skill. This is the documented basis for "context clash."
No. This page synthesizes documented findings from independent researchers, model vendors, and published benchmarks, cited inline by source and date. Where a figure is a single study's result rather than a settled fact, the text says so.