← Reddit

Claude Code burned my entire five-hour limit in 6 minutes 32 seconds: 10.26M tokens, zero lines of code

Reddit · cosmintrica · July 31, 2026
A Claude Code session exhausted a five-hour usage allowance in 6 minutes and 32 seconds while producing no code changes, consuming 10.26 million tokens. The token consumption stemmed from 5.19 million tokens written to one-hour cache during a tool loop involving only emulator interactions and file reads, with the large 650K-token context apparently being repeatedly rewritten rather than efficiently reused. The user identified this as a potential cache invalidation or usage-accounting defect and reported it to Anthropic with detailed evidence.

Detailed Analysis

A Reddit user's forensic breakdown of a single Claude Code session has surfaced a troubling technical anomaly: a five-hour usage allowance consumed in just 6 minutes and 32 seconds, with zero lines of code written. The user, working within Claude Cowork on a project referred to as "Fable 5," sent one brief continuation prompt after their allowance reset, only to hit a usage limit less than seven minutes later. By parsing local Claude Desktop and Claude Code JSONL logs, the user reconstructed a granular accounting of the session: 15 model calls, 8 Bash calls for Android emulator interaction, 7 file reads, and notably zero Edit or Write tool calls—meaning no actual code changes occurred despite the massive token burn. The total token count reached 10.26 million, translating to an estimated $109 in API-equivalent usage under Anthropic's published pricing, with the overwhelming majority—$103.79—attributable to one-hour cache writes alone.

The root cause appears to be a large, aging conversation context (roughly 650,000–685,000 tokens) that was being repeatedly reprocessed rather than efficiently reused. Each trivial action—an emulator tap, a file read—seemingly triggered reprocessing of the entire accumulated context, and rather than cheaply hitting the prompt cache, the system recorded 5.19 million tokens as *new* one-hour cache writes alongside 5.07 million cache-hit tokens in the same short window. This pattern suggests a cache invalidation defect: instead of reusing a previously cached context, the system may have been continuously rewriting it, incurring the substantially higher cache-write pricing tier on nearly every tool call. The user's evidence—including the specific `message.usage.cache_creation.ephemeral_1h_input_tokens` field—points to a systemic accounting or invalidation flaw rather than a one-off fluke, particularly since the same session had already exhausted a previous allowance window earlier that evening.

This incident matters beyond one frustrated user because it exposes a structural risk in how agentic coding tools manage long-running, stateful sessions. Claude Code and similar agentic products are designed to carry forward extensive context—file trees, prior turns, tool outputs—to maintain coherence across long tasks. But that design choice creates a scaling problem: as context grows into the hundreds of thousands of tokens, even trivial follow-up actions can trigger reprocessing of the entire history. When caching works correctly, this is mitigated through cheap cache hits; when it fails, as this case suggests, users can be billed (or have their allowances consumed) at full or near-full input-processing rates repeatedly, with no visible warning, context compaction, or safeguard to interrupt a runaway loop. The user's explicit critique—that a 42-character prompt triggered nearly $110 of usage without any cost warning or automatic stop guard—highlights a gap between the autonomy agentic tools are given and the guardrails users can expect around cost predictability.

The episode fits into a broader pattern of scrutiny facing agentic AI coding assistants as they move from simple chat interfaces toward autonomous, multi-step task execution. As tools like Claude Code, Cowork, and their competitors are granted more freedom to loop through tool calls, manage emulators, and self-direct multi-turn sessions, the token economics of context retention become a first-class product concern rather than a backend implementation detail. Long-context caching mechanisms—intended to make extended agentic sessions affordable—can become liabilities if invalidation logic misfires, effectively converting a cost-saving feature into a cost-multiplying one. For Anthropic, this represents both a reputational and engineering challenge: the company has heavily marketed prompt caching as a way to make long-horizon agentic workflows economical, and reports like this one, especially when accompanied by detailed log evidence, put pressure on the company to add stronger user-facing guardrails—automatic compaction, pre-execution cost estimates, or hard stops—before autonomous tool loops can silently consume entire usage windows.

Read original article →