I Ran Claude Code for 5 Hours and It Burned 26M Tokens. Here's How I Debugged It

Dev.to AI
Generative AI

Opus model, lots of file reading, long context. When it finished, the CLI showed exactly one number: $47. No token breakdown, no trace of what the agent actually did, no explanation why the cost was that high. So I pulled the session logs and started digging. The first surprise: 26,364,893 cache read tokens. Not a typo. That was 99.9% of all tokens in the session. On long Claude Opus sessions, every turn re-reads the accumulated context from cache. Cache reads are cheaper ($1.50/M vs $15/M for fresh input), but tens of millions of tokens still add up.