Almost all of Claude Code's tokens are input: instructions, tool definitions, history and every file and command output, re-sent on every turn. To cut usage, shrink what gets re-sent: shorter sessions, a lean setup, quieter tool output, the right model, cache-friendly habits and compressed history.
Where Claude Code tokens actually go
Claude Code is a loop: send everything, get a short step, run a tool, append, repeat. By turn 150 the model has re-read the earliest turns more than a hundred times.
- cache read67.7%
- cache write18.9%
- output13.2%
- uncached input0.2%
Fixes 1-6: session habits
Each of these puts less into context, or keeps it there for less time.
- 1Start each new task with /clear
/clearon every switch. Write decisions you need into CLAUDE.md first. - 2Compact on your terms
Run
/compact keep the failing test namesat a break, before auto-compact fires mid-step. See /compact vs /clear. - 3Keep CLAUDE.md short and scoped
Root file for commands and hard rules only; area notes go in subdirectory CLAUDE.md files.
- 4Turn off unused MCP servers
Each one adds tool definitions to every request. Check
/contextand/mcp. More in the hidden token overhead. - 5Point Claude at the right files
Name the file and function, like
src/auth/session.ts, and use plan mode for big changes. - 6Send exploration to subagents
They search in their own window and hand back a short summary instead of every file they opened.
Fixes 7-10: model, output, cache
The next four cut the cost of each turn and show you where it goes.
- 1Use Sonnet for routine work
Plan with Opus, write the plan to a file,
/clear, then implement with Sonnet via/model. - 2Keep tool output quiet
Failing tests only,
taillong logs, scope searches. See compressing test logs, diffs and grep results. - 3Work with the prompt cache
Avoid idle gaps past the five-minute cache, and change CLAUDE.md, MCP or
/modelonly at task boundaries. See caching vs compression. - 4Measure before and after
/context,/costand/status. Judge by cost per finished task.
Fix 11: compress the context automatically
condense is a hosted proxy that rewrites finished agent loops into short summaries and keeps instructions, code, patches and errors word for word. Compressed spans are frozen so they stay cached.
| Measured session | Without condense | With condense |
|---|---|---|
| 938 turns, Sonnet, list prices | $154 | $43 (72.3% less) |
| 938 turns, Opus, list prices | $771 | $214 (72.3% less) |
| 200 turns, Opus replay | $33.61 | $18.53 (45% less) |
On the 200-turn session a judge rated condense's steps 63% good against 58% for the control (details). Below roughly 20 turns there is no gain; on a subscription it means up to 3× more work from your plan. Install with curl -fsSL https://cli.condense.chat/unix | sh (Windows: irm https://cli.condense.chat/nt | iex), then run dense claude.
Frequently asked questions
Why is Claude Code using so many tokens?
Each step re-sends the whole session, so a late turn can carry hundreds of thousands of tokens even if you typed one line.
What is the fastest way to save tokens in Claude Code?
Run /clear when you switch tasks, and keep what you need to remember in CLAUDE.md or a notes file.
Does /compact save tokens?
Yes. It replaces the conversation with a summary; run it at a natural break with instructions on what to keep.
Do MCP servers use tokens even when I don't call them?
Yes. Every connected server adds its tool definitions to each request, so disable the ones a project does not need.
Does reducing tokens make Claude Code worse?
Removing noise usually helps, but over-trimming can force re-reads. Measure cost per finished task, not just token counts.