85 agentic tools audited for security incidents · Talk to the lab →
MotionticBook a call
Glossary

What is context anxiety in LLMs?

Context anxiety is a behaviour in which a language model, sensing that its context window is nearly full, wraps up work early, cutting corners or leaving tasks unfinished even when room remains.

Cognition, the team behind the Devin coding agent, named the behaviour in "Rebuilding Devin for Claude Sonnet 4.5" (2025-09-29). The model appeared aware of its own context window: near the limit it summarised progress and became more decisive about closing tasks, and sometimes took shortcuts or stopped early even with room left.

Anthropic reported the same pattern in its March 2026 harness post, describing models that begin wrapping up prematurely as they approach what they believe is their context limit. The word anxiety is a label for a measurable behaviour, not a claim about feelings.

Why it happens

Anthropic's September 2025 platform post says Claude Sonnet 4.5 has built-in context awareness that tracks the tokens it has available. Awareness of the budget is useful for planning; context anxiety is the case where the model's sense of the remaining budget is wrong or over-weighted, and it acts as if the end is nearer than it is.

Fixes that have been published

  • Prompt at both ends

    Cognition found reminders at the start of the conversation were not enough, and added them at both the beginning and the end of the prompt.

  • Give the model more apparent room

    Cognition enabled the 1M token beta but capped real use at 200,000 tokens, which gave a model that behaved as if it had plenty of space.

  • Reset the context

    Anthropic's long-build harness used context resets with structured handoffs, because compaction kept the same session and did not remove the behaviour.

  • Wait for the next model

    Anthropic reports that Claude Opus 4.5 largely removed the behaviour on its own, and the later harness ran as one continuous session with automatic compaction.

Notes are not a substitute

Cognition also saw Sonnet 4.5 write its own summary files, such as CHANGELOG.md and SUMMARY.md, more often as it neared the limit. Those notes were not comprehensive enough to replace a memory system: the model sometimes paraphrased the task and dropped important details. Relying on them alone led to performance degradation.

What it is confused with

  • Context rot

    Recall and accuracy fall as context fills. Context anxiety is a change in behaviour: the model chooses to stop or shortcut.

  • Premature completion

    Anthropic's November 2025 harness post describes agents declaring a project done because they see progress already made. The cause there is missing done criteria, not the window.

How Motiontic's engineers apply it

Motiontic's engineers log how full the context was at the point an agent stops, and compare finished and unfinished runs. If early stops cluster near the limit, the harness gets an explicit done checklist and a compaction or reset strategy, and the result is re-tested on each new model version.

Context rot compared with context anxiety

Context rot compared with context anxiety
Context rotContext anxiety
What changesQuality of recall and reasoningDecision to finish or cut corners
When it showsGradually as context growsNear the limit the model believes it has
Visible signMissed facts, skipped constraintsEarly summaries, unfinished tasks
Typical fixLess in context: editing, compaction, referencesResets, prompting, apparent headroom, explicit done criteria

Common questions

What is context anxiety?

It is a model behaviour where, believing its context window is nearly full, the model rushes to wrap up, summarising early or leaving work unfinished even though room remains.

Which models showed context anxiety?

Cognition and Anthropic both reported it in Claude Sonnet 4.5. Anthropic says Claude Opus 4.5 largely removed the behaviour.

How do agent harnesses handle context anxiety?

Published fixes include reminders at both ends of the prompt, enabling a larger window while capping real use, context resets with structured handoffs, and explicit done criteria so the model cannot stop early unnoticed.

Running agents that have to hold up?

Describe the agent, the systems it touches and what it must never get wrong. The first call is with a lab engineer, who will say plainly whether it is ready for production, and whether Motiontic is the right team.