Where Claude Code burns tokens
Token cost in an agent loop is dominated by context, not by the answer. Every turn, the agent re-sends the context it is carrying — and if that context is stuffed with whole files it grepped and read earlier, you pay for those tokens again and again. On a large codebase the bill climbs fast.
- whole-file reads pull in hundreds of lines to use a handful
- re-reading the same files each turn re-bills the same tokens
- grep / glob dumps large, low-signal blocks into the window
- context bloat forces auto-compact, which then loses useful detail