If you are burning through Claude Code quotas with the speed of a crypto trader in a bear market, you are not alone. Developer Marcus Aguiar Maciel decided to stop guessing and start parsing. By writing a custom parser for the raw .jsonl session transcripts stored locally in ~/.claude/projects, he identified three specific mechanisms that silently inflate token costs. The findings expose a critical gap between perceived usage and actual billing, particularly for users on Pro/Max subscriptions or API billing who face sudden limits after minimal activity.
The 5-Minute Prompt-Cache Cliff
The first culprit is the expiration of Anthropic's prompt caching. While a warm cache reduces read costs to 0.10x of standard rates, the TTL (Time to Live) is strictly enforced. For standard API keys, this window is just 5 minutes. Macielβs data shows that pausing for six minutes to test an app forces a full cache rewrite. On a 300,000-token context using Claude Opus 4.6, this single idle pause can jump the cost of the next turn from $0.45 to $5.63. Worse, switching models mid-session, such as moving from Opus to Sonnet, isolates the cache entirely, forcing a cold start and paying the full creation fee for the entire history.
Compound Interest on Noisy Tool Outputs
The second killer is what Maciel calls the "Turn-5 Compound Interest" effect. Because Claude is stateless, every turn re-sends the entire conversation history. A single noisy tool output, such as a package-lock.json file or a verbose test suite with 280 passing tests, persists in the prefix. If a 40,000-token lockfile is read at Turn 5, those tokens are billed again at Turn 6, 7, and all the way to Turn 45. Similarly, unpaginated MCP servers that dump 15,000-token JSON blobs into the chat create a permanent tax on every subsequent interaction, turning minor debugging steps into significant financial liabilities.
Fixed Overhead and the CATO Solution
Beyond user-generated noise, fixed overhead from installed MCP servers and CLAUDE.md files injects heavy JSON schemas into the system prompt before the first user message is even sent. To combat these leaks, Maciel released CATO (Claude Adaptive Token Optimizer), an open-source plugin that runs entirely inside Claude Codeβs native process. CATO offers a 30-second retroactive audit via /cato-import, which scans historical transcripts to break down real costs and cache misses by cause. It also implements a live cache countdown, a BM25 sandbox for compressing large MCP responses, and git-aware blocking of heavy file reads, claiming to cut token costs by 35-80% without external dependencies.
Key Takeaways
- Cache TTLs are aggressive: 5 minutes for API keys, 60 for subscriptions; pausing triggers expensive rewrites.
- Model switching breaks cache continuity, forcing full history re-creation at higher multipliers.
- Verbose tool outputs act as compound interest, billing the same tokens on every future turn.
- CATO plugin provides local, zero-network auditing and automatic compression of noisy MCP and test outputs.
- Audit your ~/.claude/projects files using /cato-import to identify idle vs. model-switch cache misses.
The Bottom Line
Token economics in agentic coding are opaque by design, but tools like CATO prove that transparency is possible. Stop treating your context window as free space; it is a depreciating asset that costs money every time you blink.