Context Failure Modes

Advanced4 min

Poisoning, distraction, confusion and clash are four measured ways a window degrades, and shortening the context helps only two of them. One study found a 39% drop from delivering the same information across several turns instead of at once.

#debugging

Four ways a window goes wrong

Context engineering pairs each part of a payload with the way that part fails. This page takes the other axis: four named mechanisms, each with evidence, that apply whatever the content is.

They are worth naming because the symptom is usually the same. The agent gets worse, and "the context is too long" is the diagnosis everyone reaches for. It is often the wrong one.

Poisoning: a wrong thing that keeps getting read

When a hallucination or other error makes it into the context, where it is repeatedly referenced.

The documented case is a Gemini agent playing Pokémon that hallucinated game states, which corrupted its goals section. From then on it pursued impossible or irrelevant goals, competently, because the false premise was in front of it on every turn.

This is the one to fear in a long agent run. A single bad fact written into a goals section or a memory file does not decay; it gets cited. And the agent's reasoning stays coherent, which is exactly why nobody notices.

The structural defence is to keep generated claims separable from retrieved facts, so a wrong one can be found and removed rather than being indistinguishable from the rest of the window.

Distraction: over-focused on its own history

When a context grows so long that the model over-focuses on the context, neglecting what it learned during training.

Two measurements. Gemini 2.5 Pro's reasoning quality degrades beyond 100k tokens, favouring repetition of actions from its history over synthesising new plans. A Databricks study found correctness for Llama 3.1 405b declining around 32k.

Note the gap between those numbers and the advertised window sizes. Degradation starts long before the limit, which means "it fits" is not the test.

The signature is an agent that keeps trying variations of what it already tried. When you see a loop, look at the history length before you look at the prompt.

Confusion: too many tools

When superfluous content in the context is used by the model to generate a low-quality response.

The sharpest evidence is about tools. The Berkeley Function-Calling Leaderboard shows every model performing worse as tool count rises. In a GeoEngine test, an 8b Llama model failed with 46 tools and succeeded with 19 while the context window was never the constraint.

That result is the useful one because it is actionable. The fix is not a bigger model or a longer window. It is fewer tools on the request, selected for the task rather than registered once and sent forever.

This connects to the standing cost context engineering notes for tool definitions: they are input tokens on every call. The accuracy cost is the part that is easier to miss.

Clash: information that contradicts itself

When you accrue new information and tools in your context that conflicts with other information in the context.

The evidence here is the most alarming in the set. Microsoft and Salesforce research found an average 39% performance drop when the same prompt information was distributed across multi-turn exchanges rather than given at once. OpenAI's o3 fell from 98.1 to 64.1 on one test.

The same information. Only the delivery changed.

The stated cause is that models "make assumptions in early turns and prematurely attempt to generate final solutions, on which they overly rely". An early guess becomes a commitment, and later corrections argue with it rather than replacing it.

The practical consequence is uncomfortable for conversational products. If a requirement emerges over six turns, the model is working from a worse brief than if you had stated it once. Re-stating the full, current requirement after it changes is cheap insurance, and it is why compaction that rewrites a history can sometimes improve quality rather than only saving tokens.

Diagnosing, rather than guessing

Four mechanisms, four different signatures:

SymptomLook at
Confidently pursuing something wrongPoisoning
Repeating earlier actions, not progressingDistraction
Picking the wrong tool, or noneConfusion
Ignoring a correction given laterClash

The reason to separate them: the fixes point in opposite directions. Poisoning wants the window edited. Distraction wants it shorter. Confusion wants fewer tools rather than fewer tokens. Clash wants the brief restated whole.

Shortening the context helps two of the four, which is why the universal reflex sometimes does nothing at all.

Further reading

Knowledge check

Question 1 of 4

An agent keeps retrying variations of what it already tried. Which failure mode?

Sign in to save your progress and pick up where you left off.