When an AI Agent Context Reaches 261k Tokens An AI agent's context ballooned to 261,834 tokens and failed against a 128,000-token model limit, according to incident report INC-002. The growth came not from a single prompt but from replayed tool results accumulating across checkpoints, exposing three missing controls: no hard token budget, no message cap, and no pruning policy for old tool observations. The report recommends scanning for the issue with a heuristic tool and confirming with a test that simulates 50 or more tool calls to assert the context stays bounded. One research request grew to 261,834 tokens and failed against a 128,000-token model limit. The context did not become large in one prompt. Replayed tool results accumulated across checkpoints. INC-002 exposed three missing controls: no hard token budget, no message cap, and no pruning policy for old tool observations. Large search and file results were also inserted without compression. The important metric is context size at each boundary. A final failure log is too late to explain where growth started. Run a heuristic review with: prevention-scanner scan . --format json Then confirm the result with a test that simulates 50 or more tool calls and asserts the context remains bounded. Read the full INC-002 incident https://github.com/InterroAI/interro-awesome-agent-incidents/blob/main/INC-002-context-explosion.md .