First, why long sessions are normally affordable
Claude Code leans hard on Anthropic's prompt cache. The stable prefix of your conversation — system prompt, tool definitions, the history you've already accumulated — is billed at a fraction of the normal input rate on repeat turns. That's why a three-hour session doesn't cost what its raw token count suggests: you keep re-sending the same context, but you mostly stop re-paying for it.
The part sub-agents break
A sub-agent spins up a fresh context. It does not inherit the parent session's cached prefix — it starts cold, reads the files it needs, runs its own tool calls, and pays full price for all of it. Fan out five agents over the same repository and you've re-bought overlapping context five times, at the uncached rate, while the main session sits there holding the same information cheaply.
This is the common reason heavy Claude Code users burn through the weekly limit faster than their token counts seem to justify. The work didn't get five times harder; the caching advantage just quietly stopped applying to most of it.
It compounds: sub-agents hit their own ceilings too
Each sub-agent also has its own context to fill, and tool output piles up in it fast — build logs, search results, file reads. A sub-agent that hits its token ceiling mid-task fails or truncates, which usually means the orchestrating session spawns another one to redo the work. You pay for the failed attempt and the retry.
What actually helps
- Use sub-agents for genuinely parallel work. Fanning out to "be thorough" on a task one agent could do sequentially re-buys context for no throughput gain. Save the fan-out for independent workstreams.
- Scope each agent narrowly. The less a sub-agent has to read to do its job, the smaller the uncached bill. Point it at files, not at "the codebase."
- Shrink what every context — parent and child — carries. This is where Headroom applies: it compresses tool output, logs, and boilerplate locally before they enter any context, and it compresses sub-agent traffic the same way it compresses the main session. The same task fits in fewer tokens, cached or not — around 50% fewer overall.
Related reading: why you hit the weekly limit by Wednesday, the four patterns behind Claude Code's costs, and how the 5-hour window works.