How to reduce Claude Code costs
To cut Claude Code costs, send less tool output, fewer tool schemas and fewer cache rewrites on each call, because Claude Code sends the whole conversation again on every call. Do the free steps first, then route Claude Code through Context Mode Gateway: a long Claude Code session on Claude Opus 5.5 cost 65.5% less, $7.20 down to $2.49.
What to do:
- Do the free steps from Anthropic's cost guide: see what you can change yourself.
- Connect Claude Code or Codex to Context Mode Gateway with one command:
npx @context-mode/cli. See the quick start. - Watch your own tokens, cost and saving per request in the console.
Key facts
- What it is
- A guide to where Claude Code spends tokens, what you can change yourself, and what Context Mode Gateway changes on the request path.
- Who it is for
- Developers and CTOs who find Claude Code too expensive, on API billing or on a Claude plan.
- Clients
- Claude Code. Context Mode Gateway also works with Codex, but Codex cost is not measured yet.
- Measured result
- Claude Code on Claude Opus 5.5 cost 65.5% less on a long agentic coding session, which went from $7.20 to $2.49, 4 of 4 pairs cheaper, run on 2026-10-03. Over 168 shorter paired runs on 2026-09-29, 155 cost less and 168 of 168 tasks passed in both arms. Method and evidence.
- Limits
- We measured cost at list price, not plan usage limits. A short question with few tool calls leaves little to save.
Where Claude Code spends tokens
A coding agent sends the whole conversation to the model on every call. Four things decide the cost:
- Tool output stays. A test run, a log or a JSON file the agent reads enters the conversation and is sent again on every later call of the session.
- Re-reads. For WebFetch, Claude Code hands each fetched page to a small helper call with no cache mark, so each read of the page is charged as fresh input.
- Cache rewrites. The provider caches the start of the prompt. If a tool changes text inside that cached part, the next call writes it to cache again. See Prompt caching.
- Start cost. Tool schemas and the system prompt sit at the start of every request, and each new session writes part of that start to cache again.
Anthropic's own cost page puts the average at about $13 per developer per active day and $150 to $250 per developer per month across enterprise deployments (Manage costs effectively, read 2026-10-01).
What you can change yourself
Anthropic's cost page lists steps that need no extra tool. Among them: manage context early, choose the right model, cut MCP server overhead, move instructions from CLAUDE.md into skills, adjust extended thinking, send verbose work to subagents, and write specific prompts (Manage costs effectively, read 2026-10-01). Do these first. They cost nothing.
What Context Mode Gateway changes
The gateway sits between Claude Code and the model API. It changes what each request carries, and does not change your files or your agent's settings.
The gateway adds its own tools, memory and skills, and those cost tokens. The results below count both sides. Every change is listed in Context Saving.
What it saved
Paired runs against Claude Code going direct, on Claude Opus 5.5, 2026-09-29. Ranges are 95% intervals. Task success was equal in both arms on every row.
| Category | Task | Pairs | Gateway vs direct |
|---|---|---|---|
| Agentic Coding | Code search (grep over 150 files) | 16 | Opus 5.5: 29% lower cost (23 to 34%) |
| Agentic Coding | One-line edit | 12 | Opus 5.5: 28% lower cost (14 to 42%) |
| Agentic Coding | Repo history question (git log, 320 commits) | 16 | Opus 5.5: 25% lower cost (16 to 34%) |
| Large Tool-Output Handling | One large log | 16 | Opus 5.5: 22% lower cost (15 to 30%) |
| Test-Driven Debugging | npm test fix loop, short | 16 | Opus 5.5: 22% lower cost (16 to 28%) |
| Multi-Agent Orchestration | Three parallel subagents, then one more | 20 | Opus 5.5: 15% lower cost (12 to 19%) |
A reply-style block that asks for short answers was on in every Context Mode run. Cost is list price applied to the token counts Anthropic returned. Every result for both models, with its method and evidence.
On a Claude plan
We measured cost at list price, not plan usage limits. On API billing the saving is cash. On a Claude plan it is list-price value, not cash, and we make no claim about how long your plan's limits last.
FAQ
How much does Claude Code cost per developer?
Anthropic's cost page says about $13 per developer per active day, and $150 to $250 per developer per month across enterprise deployments (source, read 2026-10-01).
What does Claude Code spend most tokens on?
Tool output that is sent again on every later turn, tool schemas, and cache writes at the start of each request. See where an agent's tokens go.
Will Context Mode lower my bill?
It depends on your work. On Claude Opus 5.5, cost was 25 to 29% lower on agentic coding and 22% lower on test-driven debugging. The console measures your own saving from your own traffic.
Do I have to change my agent or model?
No. One command sets the base URL, and your Claude account still pays the model. See Quick start.
Does it help with Claude plan usage limits?
We measured cost at list price, not plan limits. On a Claude plan the saving is list-price value, not cash.