How to reduce Claude Code costs
Updated October 13, 2026
Most of what Claude Code spends goes on re-reading context, not on writing code. On one heavy day we measured, 63% of the cost was Claude re-reading the conversation so far. So the biggest savings come from keeping context small: clear between tasks, cut what loads at startup, and pick the right model. The same steps make a plan's limits last longer.
- Cost that was re-reading context
- 63%
- Anthropic's average per active day
- $13
- Keep CLAUDE.md under
- 200 lines
Where the money goes
Every message sends the whole conversation back to Claude. Most of it comes from the cache, which is cheap per token, but it is re-read on every turn. Here is one measured heavy day on Opus 5.5, about 500 requests:
| Token type | Cost | Share |
|---|---|---|
| Cache reads (context Claude re-reads) | $31 | 63% |
| Cache writes (new context saved) | $13 | 25% |
| Output (what Claude writes and thinks) | $6 | 12% |
| New input | $0 | 0% |
| Total | $50 | 100% |
A long session costs more per message than a short one, because each message re-reads everything before it. Try your own numbers in the token calculator.
1. Clear between tasks
Use /clear when you switch to unrelated work. Old context is re-read on every message until you clear it, and clearing costs nothing. When you want to keep the thread, run /compact at a natural break, with a note on what to keep, for example /compact Focus on the API changes. Doing it yourself between tasks beats waiting for auto-compaction to start in the middle of one.
2. Shrink what loads into every session
- Keep CLAUDE.md under about 200 lines. Move detailed how-tos into skills, which load only when used.
- Run
/mcpand turn off MCP servers you are not using. CLI tools likeghuse less context than MCP servers that do the same job. - Run
/contextto see what is taking up space.
3. Pick the model and effort at the start
Sonnet handles most coding well at half the price of Opus. Keep Opus or Fable for hard design and debugging work. Thinking is billed as output, so a lower effort setting (/effort) also costs less.
Choose these at the top of a session. Switching model or effort halfway through throws away the cache, and the next message pays to rebuild it.
4. Let subagents and hooks do the noisy work
A subagent reads the long logs or search results in its own context and hands back a summary, so your main session stays small. You can run simple subagents on Haiku. A hook can filter output before Claude sees it: for example, return only the lines with ERROR from a 10,000-line log.
5. Be specific, and stop early
Vague requests like “improve this codebase” make Claude scan widely. Name the files and the goal. Use plan mode for bigger changes, and press Escape as soon as it heads the wrong way; /rewind takes you back.
6. Stay inside your plan
On a Pro or Max plan, Claude Code keeps its cache for an hour. On usage credits or an API key, the cache lasts five minutes, so a short break means paying to rebuild it. If you often run past your limits, a bigger plan can cost less than credits. When to upgrade instead of buying credits.
Common questions
- Why is Claude Code so expensive?
- Because it re-reads your conversation and files on every message. On the heavy day we measured, 63% of the cost was re-reading context. Clearing between tasks and keeping CLAUDE.md small cut that.
- How do I see what I am spending?
- Run /usage inside Claude Code, or the free ccusage tool for a day-by-day history. Our usage page shows how.
- Does /compact save money?
- Yes, on long sessions. It replaces the conversation with a shorter summary, so later messages re-read less. If you do not need the history, /clear is better: it costs nothing.
- Is Sonnet good enough for Claude Code?
- For most coding tasks, yes, and it costs half as much as Opus per token. Switch to Opus for hard problems, at the start of a session.