Why Claude Code uses so many tokens
Claude Code uses so many tokens because every request resends your whole context: CLAUDE.md, files read, tool output. Caching makes that cheaper, not free.
Contents
Claude Code uses so many tokens because every request resends everything. The model remembers nothing between requests, so Claude Code sends the system prompt, tool definitions, your CLAUDE.md, every message so far, every file it read and every tool result, plus the new bit, each time. Each tool call is another request. Subagents and parallel chats send their own. Caching makes the re-reads cheaper, not free.
The quotes below are from Anthropic's Claude Code and API docs, read on 22 October 2026.
Every request carries the whole conversation#
From Anthropic's prompt caching page: "The model doesn't remember anything between requests, so Claude Code re-sends the full context: the system prompt, your project context, every prior message and tool result, and your new message."
A "turn" isn't one request either. The cost guide adds that "each time Claude uses tools it sends another request carrying that batch of tool results." A turn where Claude reads four files, runs the tests and edits two files can be a dozen requests, each carrying everything before it.
So one question costs more at the end of a long session than at the start of a new one, and the docs give the extreme case: "a one-line question in a session that has been open all day still draws usage for the whole conversation."
What's in the context before you type#
The context window page lists what loads at the start of a session: your CLAUDE.md (or AGENTS.md in its place), auto memory, MCP tool names and skill descriptions, on top of Claude Code's own system prompt and tool definitions. An output style or text from --append-system-prompt adds to it. All of it rides along on every request.
/context shows your own numbers as a live breakdown by category, including which CLAUDE.md and auto memory files loaded, and /memory opens those files. The cost page spells out what that means for CLAUDE.md: it loads at session start, so a section on PR reviews or database migrations is in every request "even when you're doing unrelated work", while a skill's full text loads only when the skill is used. Anthropic's own target for CLAUDE.md is under about 200 lines.
What makes it grow#
Once you start working, the conversation layer is what grows:
- Each file Claude reads is added to context. A vague request ("improve this codebase") means broad scanning and lots of reads.
- Tool output goes in as well: a full test run, a long log, a big
git diff. For scale, Anthropic's example of a hook that filters a 10,000-line log down to theERRORlines takes context "from tens of thousands of tokens to hundreds." - Claude's own replies and thinking count too. Thinking tokens are billed as output, and the docs say the default budget "can be tens of thousands of tokens per request depending on the model." The effort level, set with
/effort, decides how much thinking a request gets. - Screenshots and other images add up fast. Claude Code drops the oldest in batches once a request would pass the limits.
MCP servers: lighter than you remember#
The old complaint was that every MCP server dumped its whole tool list into context. That's mostly gone. With tool search, on by default on supported models, "only tool names and server instructions load at session start," and full definitions load when Claude actually uses a tool. Anthropic says adding more servers this way "has minimal impact on your context window."
An MCP server still adds tokens in three places.
- Its results land in context like any other tool output. Claude Code warns when one MCP result passes 10,000 tokens, and by default a text result over 25,000 tokens (or 50,000 characters) is saved to a file that Claude reads only when it needs to.
- A server set to
alwaysLoad, a tool its author marked to load upfront, orENABLE_TOOL_SEARCH=falseputs full definitions back in every request. So do models and platforms without tool search. - On a subscription,
/usageshows each MCP server's share of recent usage, so a heavy one has a number next to its name.
The cost page also explains why a CLI tool weighs less than a server: tools like gh or aws "are still more context-efficient than MCP servers because they don't add any per-tool listing."
Prompt caching: cheaper re-reads, not free ones#
Caching is why this isn't ruinous. The API compares the start of each request with what it processed within the cache lifetime (five minutes or an hour) and bills the matching prefix as a cache read. Per Anthropic's pricing note, on 22 October 2026:
| Token type | Price relative to normal input |
|---|---|
| Cache read | 0.1x (0.05x on Opus 5.5 and Sonnet 5.5, 0.025x on Fable 5.1) |
| Cache write, 5-minute lifetime | 1.25x |
| Cache write, 1-hour lifetime | 2x |
On a Claude subscription within your plan's usage, Claude Code asks for the one-hour cache for your main conversation. Subagents, workflows and compaction get five minutes.
Cache reads are cheap, but a whole day's conversation read at 0.1x on every request still adds up. Some actions miss the cache and reprocess everything at full price:
- switching models with
/model(each model has its own cache); - changing effort level, on most models (Opus 5.5, Sonnet 5.5, Haiku 5.5 and Fable 5.1 keep the cache with an API key or a Claude subscription);
- turning on fast mode;
- connecting or removing an MCP server, when tool search isn't deferring its tools;
- compacting, which rewrites the conversation by design;
- coming back after a break longer than the cache lifetime;
- the first session after a Claude Code upgrade.
Since v2.1.251, /usage shows a Prompt cache (main) line with your hit rate and misses. The cost page's sample reads 14 requests · 91% of input tokens from cache · 2 misses. From v2.1.260 the line also names the likely cause of the last miss, such as likely cause: tool definitions changed. Checking Claude Code usage explains the 5-hour and weekly bars on that screen, and prompt caching in Claude Code covers how long the cache lasts and what breaks it.
Compaction: a big request to make smaller ones#
When the context nears its limit, Claude Code compacts automatically: it replaces your history with a summary. To produce that summary, it sends a request containing the whole history. While the cache is warm, most of that is read from cache. After a long break it's all reprocessed, which is why Anthropic says /compact "costs the most when you resume an old session."
The compacted context isn't empty, either. CLAUDE.md and auto memory are re-injected from disk, Claude Code re-reads up to five of the files Claude read or edited (most recently modified first; a file over 5,000 tokens comes back as a Referenced file path), and invoked skills return capped at 5,000 tokens each and 25,000 in total (context window page).
What each command sends:
/clearstarts an empty conversation. It sends nothing./compactsends the whole history once to summarise it, and takes a focus (/compact focus on the failing tests)./rewindtruncates back to a prefix that's already cached.
The multipliers#
Everything above is one conversation. Five things add requests on top of it.
- Subagents run in their own context. That keeps big reads out of yours, but "the subagent's own requests still draw on your usage," and they start with a cold, five-minute cache.
- Workflows and agent teams. Anthropic says agent teams use "approximately 7x more tokens than standard sessions when teammates run in plan mode," because each teammate keeps its own context window and runs as a separate Claude instance. Each one loads CLAUDE.md, MCP servers and skills on its own.
- Scheduled loops, goal check-ins and cross-session messages each fire a turn that sends your full context, even while you're idle.
- Five parallel chats on one account draw on the same limits five times over.
- Background housekeeping is small: Anthropic puts it "typically under $0.04 per session."
Where Shuriken fits#
Shuriken won't make a token cheaper. Your agents run on your own plans and keys, and a request costs what it costs. What Shuriken adds is a view of the spending while it happens, and a way past a limit.
- Shuriken 5.1 adds live cost. A running turn shows its tokens and cost so far beside its time, and the amount climbs while it runs, for Claude Code, Codex and the other agents that report usage, so a turn that costs ten times the last one is visible before it ends.
- The Analytics page prices your chats at API rates by account, project and model. It splits "Tokens, cache included" into Input, Output, Cache reads and Cache writes, so a heavy week and a cache that kept missing look different there.
- Global MCPs assign each MCP server to all projects or to chosen ones, and a project's chats load only the servers assigned to it.
- Source switching moves the chat to another of your accounts when the one in use reaches its switch point (99% by default). Session limits start idle accounts' 5-hour windows with one tiny background request each, so limits come back earlier.
Neither of the last two saves a token. They just mean a heavy day doesn't end at lunch. Only add accounts you own and are entitled to use.
If you'd like to watch where your tokens go, turn by turn, download Shuriken.
Try the free tool: Claude limit reset tracker
Sources
- How Claude Code uses prompt caching (Claude Code docs) (accessed 22 October 2026)
- Manage costs effectively (Claude Code docs) (accessed 22 October 2026)
- Explore the context window (Claude Code docs) (accessed 22 October 2026)
- Connect Claude Code to tools via MCP: tool search (Claude Code docs) (accessed 22 October 2026)
- Prompt caching: pricing (Claude API docs) (accessed 22 October 2026)
Frequently asked questions
What does /clear do to the context?
It starts a new conversation with empty context, so the next request carries only what loads at startup: the system prompt, tools, CLAUDE.md and memory. The old conversation stays on disk for /resume. /compact keeps a summary instead, and writing that summary is a request of its own.
Do MCP servers cost tokens?
Less than they used to. With tool search, on by default on supported models, only tool names and server instructions load at the start; full definitions load when Claude uses a tool. What a tool returns still goes into your context.
Doesn't prompt caching make all this free?
No. Cache reads are billed at a fraction of the normal input price, 0.1x on most models and 0.05x on Opus 5.5 and Sonnet 5.5, and on a subscription they still draw on your limits. A /model switch, or a break longer than the cache lifetime, misses the cache and reprocesses everything.
Why does usage climb while I'm not typing?
Anthropic lists scheduled tasks such as /loop, goal check-ins and messages from your other sessions; each one starts a turn that sends your full context. Subagents and agent-team teammates that are still running keep using tokens until they finish.