Context Anxiety in Kiro: Claude Opus 5 at 30% Usage
Kiro's context usage meter read 30% while Claude Opus 5 told me in the same chat that it had no room left to work with. Kiro measured the real usage. The model estimated its own remaining context, and the estimate was wrong by a wide margin. The behavior has a name, "context anxiety", and both a production write-up and a peer-reviewed paper describe it.
What the screenshot shows

Two readings sit on the same screen. The Kiro context usage meter reports 30%. The Claude Opus 5 response in the chat reports that it is out of context and cannot continue the work as planned.
Why 30% of a 1M token window matters
Kiro runs Claude Opus 5 with a 1M token context window. The Kiro models changelog lists it as an experimental rollout with a 1M context window and a 2.2x credit multiplier. Anthropic's Opus 5 notes confirm 1M tokens as both the default and the maximum, with 128k max output tokens and thinking on by default.
So 30% is about 300,000 tokens. Every Claude generation before the 1M variants lived inside a 200,000 token ceiling. My session had already passed that older ceiling by 100,000 tokens when the model declared itself finished. I cannot inspect the model's internal estimate, so I cannot prove the connection.
What context anxiety is, and who documented it
Cognition described this behavior in September 2025 after they rebuilt Devin for Claude Sonnet 4.5. Their write-up calls Sonnet 4.5 "the first model we've seen that is aware of its own context window". As it approached the limit, it summarized its progress without a prompt and became more decisive about closures. The cost: it took shortcuts and left tasks incomplete when it believed the window was nearly full, with plenty of room still available. Cognition also reports that the model underestimates its remaining tokens consistently, and that it is very precise about those wrong estimates.
Their fix was structural. They enabled the 1M token beta and capped real usage at 200k. The model then believed it had runway and behaved normally.
Peer-reviewed research followed. "Lost in Context: Addressing Context Anxiety in Large Language Models" by Ifueko Igbinedion, Jillian Ross, Etienne Ricardez, Sertac Karaman and Eric So appeared on arXiv on 29 May 2026 and was accepted at ICML 2026. The authors find that frontier reasoning models sometimes hold the capability to solve a problem and still fail through premature self-doubt. They trace part of the cause to a model's inability to estimate how many tokens a task needs, and they measure real efficiency losses when a model operates under a perceived constraint. They also show that models can learn strategies for long-horizon problems without the anxiety, which points at training rather than at model scale as the fix.
Cognition's field report and the paper agree on the mechanism. A model's estimate of its own token budget is a guess, and the guess is too low.
Reports where the tool is wrong instead of the model
There is a second, separate failure with the same surface appearance. In that one the meter reads low and the runtime genuinely refuses.
A Claude Code user filed issue #28167 in February 2026 against a 1M context Opus model. The /context command reported 199k of 1000k tokens, 20%, and the session still returned "Context limit reached". The reporter's diagnosis: the displayed percentage summed input, cache creation and cache read tokens, and left output tokens out, while the limit check counted the total. The issue closed as not planned in April 2026 after inactivity. The bot flagged three earlier duplicates. A related report, issue #17959, covers the same mismatch against the internal low-context warning.
Kiro has its own version. In issue #5485 a Kiro CLI user on a 1M Sonnet model saw 18% usage, pasted a 91KB log, and hit an immediate overflow and forced compaction. The same log written to a file and read by a fresh session added 4%. Issue #5509 reports the meter stuck at 0% with Claude Opus 4.6. Issue #4876 reports a summarization loop when a workspace scan pushes past the 80% threshold on the first question of a session.
| Case | Meter reading | Runtime behavior | Model's own claim |
|---|---|---|---|
| Claude Code #28167 | 20% of 1M | Refused with "Context limit reached" | Not the issue |
| Kiro CLI #5485 | 18% | Forced compaction after a 91KB paste | Not the issue |
| My Kiro session | 30% of 1M | No refusal, no summarization | Reported no context left |
My case belongs in the last row, and oddly the conversation still continued after the model reported that it had no context space left for any work.
How Kiro normally handles a full context window
Kiro sends every previous message in a conversation to the model on each turn. The summarization docs state the threshold plainly: at 80% of the model's context limit, Kiro summarizes all the messages in the conversation to bring the length back under the limit. The context usage meter in the chat panel exists so you can watch that number rise. Both the meter and the automatic summarization arrived in IDE 0.7. The Kiro CLI adds a /compact command and compacts automatically on overflow.
The usual complaint about this design is summary quality. Kiro issue #4178 reports summarized context that loses important information, so the next stretch of the conversation continues from the wrong point. Cognition reached the same conclusion from the other direction. They tried to replace their own compaction with the model's self-written notes and saw performance degradation, because the model did not know what it might need later.
At 30% usage Kiro had no reason to summarize. Roughly 700,000 tokens of room remained. The threshold was 50 percentage points away.
How to recover a session that reports a full window
The meter is the authority here, so the first step costs nothing. I tell the model the real reading and ask it to continue. My session kept working after that.
When the model repeats the claim, I ask it for a handoff. It writes the work that is left as a set of instructions, and I paste those instructions into a new chat. The handoff performs the same compaction Kiro runs at 80%, by hand, at a point I choose.
A file beats a paste for that handoff. Specs, steering files and task lists survive in a form any later session can read, and the file system holds the detail that a paraphrase drops. My guide on agentic AI across the software development lifecycle covers where those artifacts sit in the wider flow. Cognition's result applies here too. A model's own notes leave gaps, because it cannot predict what it will need.
Kiro can also export the whole conversation, and the format depends on the client. In the IDE you right-click the chat tab and select Export Chat, and the zip holds session.json and messages.jsonl rather than markdown. Kiro marks exports read-only, so no import path exists. The CLI is closer to a usable handoff artifact, because /transcript save writes the full chat as markdown, plaintext or JSON. A whole transcript attached to a fresh chat spends the tokens the new chat was meant to free, so I use the instruction handoff instead.
