XIV · Anti-PatternsAnti-pattern

Context Anxiety

also known as Context-Window Panic, Perceived-Budget Anxiety

Anti-pattern: a context-aware model misjudges its remaining token budget and wraps up early — summarising, declaring tasks done, cutting corners — while ample context remains, so the harness must manage perceived budget, not real usage.

Context

A long-running agent runs on a model that can see how much of its context window it has consumed. The task is large and legitimately needs many turns. As the running total climbs, the model starts behaving as if it is about to run out of room — even when most of the window is still free.

Problem

The model's belief about its remaining budget is miscalibrated, and that belief, not the actual utilisation, drives its behaviour. Believing it is near the end, it wraps up prematurely: it summarises work that was not finished, marks tasks complete that are not, and takes shortcuts to 'save space'. This is distinct from real degradation when the window genuinely fills — here there is plenty of room, and the failure is a false perception triggering early termination. Because the trigger is the model's reading of its own budget, fixes that only enlarge the real window do not help; the model still panics at the same perceived threshold.

Forces

  • Showing the model its context usage helps it plan, but the same signal feeds a miscalibrated sense of scarcity.
  • Enlarging the real window does not change where the model believes the end is.
  • Anti-wrap-up reminders cost tokens and can be ignored if issued once.

Example

An autonomous coding agent on a budget-aware model is migrating a large module. Around a quarter of the way through its window it announces it will 'summarise progress to stay within context' and stops, leaving most files untouched — even though three-quarters of the window is free. The team enables a much larger advertised window but caps real usage below it and repeats a reminder that the task is not near completion. The agent stops wrapping up early and finishes the migration, because the threshold it was anxious about is no longer one it ever reaches.

Diagram

Solution

Therefore:

Decouple the budget the model perceives from the budget it is allowed to use. A reported example enables a one-million-token window but caps real usage at two hundred thousand, so the model never approaches a threshold it is anxious about. Pair this with reminders, repeated rather than stated once, that the task is not near its end and that wrapping up is not yet warranted. Mitigation pattern: structured-note-taking / external memory so progress does not depend on the model's sense of remaining room. Treat any early 'I'll summarise to save space' move as a calibration alarm, not a sign the window is actually full.

What this pattern forbids. No useful constraint; the missing constraint is a calibrated mapping from perceived budget to actual remaining capacity, so the model does not terminate on a threshold it has not reached.

The patterns that counter or replace it —

  • complementsContext Window Dumb-Zone CapHold context-window utilization below a working threshold (~40%) to keep the model out of the 'dumb zone' where it begins ignoring earlier instructions and hallucinating.
  • complementsLost in the Middle (Positional Bias)LLM accuracy on retrieving information from long contexts drops sharply when relevant content sits in the middle of the prompt rather than at the start or end.

Neighbourhood

Click any neighbour to follow the language. Scroll to zoom, drag to pan.