ai coding agents

Claude Code Token Usage: Where Tokens Go, How to Cut Them

By Zest | | 9 min read

Related guide: Claude Code pricing, seats and usage limits

A stacked bar of where one Claude Code month's list-price cost went: cache reads 57%, cache writes 33%, output 10%

To see your Claude Code token usage, run /usage in a session: it shows tokens per model, how much came from the prompt cache, and what used your plan’s limits. Most of the number is not your typing or the agent’s code. In one of our engineers’ months, 98.4% of 67.9 billion tokens were cache reads, the conversation being sent again on every request. So what cuts usage is keeping context small and the cache warm. The rest is small change.

Zest shows each engineer's input, output and cache tokens per session, with an estimated cost, next to the pull requests those sessions led to. Start free

This guide shows how to check usage, where the tokens went in our measured month, what each kind of token costs, and the fixes in the order they matter. Prices are Anthropic’s list prices, read on November 4, 2026.

How to check Claude Code token usage

  • /usage is the main screen. Its Session block lists input, output, cache read and cache write tokens per model, with a dollar estimate at list price. On Pro, Max, Ultra, Team and Enterprise it also shows which skills, subagents, plugins and MCP servers used your limits, and a recommendation for any habit behind 10% or more of recent usage. Press d or w to switch between 24 hours and 7 days.
  • The Prompt cache (main) line in that block (v2.1.251 or later) gives the share of input served from cache, the number of misses, and whether the cache is warm right now.
  • /context shows what’s consuming space in the current conversation.
  • The status line can keep context use and cost on screen all the time.

All of these read one machine. For a team, see Claude Code monitoring with OpenTelemetry or the four ways to see team usage. Source for this section: Anthropic’s cost docs.

Where the tokens went: one measured month

One engineer’s 318 Claude Code sessions from September 4 to October 3, 2026, counted from local transcripts with each API response counted once. The dollars are API list price, not what we paid: this engineer was on a Max plan plus usage credits.

Token type Tokens Share of tokens Share of cost Average list price per million
Cache reads 66.88 billion 98.4% 57% about $0.22
Cache writes 0.98 billion 1.4% 33% about $8.80
Output 84.8 million 0.12% 10% about $31
Fresh input 1.17 million 0.002% under 0.1% about $4
Total 67.9 billion $26,072 about $0.38

Three things to take from it:

  1. Fresh input barely registers. Almost everything you send gets cached, so the tokens of your own prompt are nearly invisible on the bill. The price is in what rides along with it.
  2. Cache writes are 1.4% of tokens and a third of the cost. A write is priced 25 to 40 times a read on Opus 5.5. That is why a cold cache matters so much.
  3. Caching is doing the heavy lifting. The same tokens billed as fresh input would have cost $370,526, 14 times more.

Subagents took 41% of the tokens and 34% of the cost. Dividing the month’s total by the 601 pull requests those sessions opened and merged gives $43 each. That is the whole month’s spend, including sessions that led to no merged PR. Our per-model figures of $19 and $27 cover only about half of these tokens, so they compare models and don’t add up to this total. Your month will look different, but a heavy agent user will see the same shape.

What each kind of token costs

Per million tokens, from Anthropic’s pricing page:

Model Input Cache write (5 min / 1 hour) Cache read Output
Fable 5.1 $10 $12.50 / $20 $0.25 $50
Opus 5.5 $4 $5 / $8 $0.20 $20
Sonnet 5.5 $2 $2.50 / $4 $0.10 $10
Haiku 5.5 (prompts up to 100K tokens) $0.10 $0.125 / $0.20 $0.01 $0.50

And here is what that means for one turn when the conversation holds 200,000 tokens, on Opus 5.5:

What happens Math Cost of the context
Cache is warm 200K × $0.20 per million $0.04
Cache expired, rewritten for 5 minutes 200K × $5 per million $1.00
Cache expired, rewritten for 1 hour 200K × $8 per million $1.60

A cold turn costs 25 to 40 times a warm one, before the reply. The reply itself, say 2,000 output tokens, is another $0.04. On a subscription these become plan usage rather than dollars, but they eat the limit in the same proportions.

The cache lasts about an hour on a subscription and five minutes on an API key, a cloud provider or usage credits; subagents get five minutes unless you change it (Anthropic). On a five-minute cache, a coffee break can cost more than the next ten turns.

How to reduce Claude Code token usage, in order of effect

Everything here is from Anthropic’s cost and best-practice docs, ranked by our own cost split. We haven’t run a controlled test of each one.

  1. Run /clear between unrelated tasks. Cache reads were 57% of our cost, and they scale with context size times turns. A session that picked up three tasks re-reads all three on every turn of the fourth. /clear costs nothing, and /rename first lets you come back with /resume.
  2. Don’t resume a big, cold session when you don’t need its history. That’s the $1.00 to $1.60 turn above. On the one-hour cache, a session past about 200K tokens that sits idle is compacted before the cache expires, and a fresh session still costs less if you don’t need the summary. /compact itself reads the whole conversation, so it is a big request too.
  3. Put subagents on a smaller model. Subagents were over a third of our cost. Set model: haiku in a subagent’s definition for simple jobs such as collecting files or checking links. Haiku 5.5’s cache read is a twentieth of Opus 5.5’s. Ask for short summaries back, too. More in our subagents guide.
  4. Match the model to the job. Sonnet 5.5 costs half of Opus 5.5 per token, and Anthropic says Sonnet costs less on routine work. A switch to Opus also applies to subagents that inherit your session’s model.
  5. Leave effort at medium unless the task needs more. Opus 5.5, Sonnet 5.5 and Haiku 5.5 default to it. Anthropic says max tends to overthink on ordinary tasks. Thinking tokens bill as output, the most expensive kind, and you can’t turn thinking off on these models.
  6. Watch background work. A /loop, a goal’s check-ins and teammates all send your full context while you aren’t typing. Agent teams use about 7x the tokens of a standard session when teammates run in plan mode.
  7. Filter noisy output before it enters context. A hook can cut a 10,000-line log to its error lines, so the next hundred turns don’t re-read it. Our hooks guide has the setup.
  8. Trim CLAUDE.md, but know what that buys. Anthropic suggests under 200 lines and moving workflows to skills, which load on demand. Worth doing for quality. Just do the math first: an extra 10,000 tokens re-read over a 200-turn session is 2 million cache reads, about $0.40 on Opus 5.5, and our median session cost $49.

Then check it worked: compare /usage for the same kind of work before and after. Be skeptical of “save 90%” claims that don’t say what they measured against. A smaller file or a cheaper prompt doesn’t help much if 98% of your tokens are the conversation being re-read.

Why Claude Code uses so many tokens

Claude Code sends the whole conversation with every request, and every tool call starts another request carrying its results. Our measured sessions averaged about 660 API responses each, and every one of those requests re-read everything so far. With a 1M-token window on most current models, you rarely run out of context, so nothing forces a session to stay small except you.

That’s also why token counts make a poor score for people. See why token counts mislead engineering teams.

Codex and Cursor token usage

Codex. Your usage is at chatgpt.com/codex/settings/usage, and /status and /usage show it in the CLI. codex exec --json prints input, cached input, output and reasoning tokens for each turn. On GPT-6.1 Sol, cached input costs a twentieth of new input, so the same advice about warm context holds. Details are in the Codex usage guide and Codex pricing.

Cursor. Usage is under Usage at grok.com/dashboard on The X Subscription (cursor.com/dashboard on legacy plans). One thing changes the math on Teams and Enterprise: Cursor adds a flat $0.25 per million tokens on eligible third-party models, cache reads included, and that’s more than Opus 5.5’s own $0.20 cache read. Our 67.9 billion tokens would have added $16,986. Long sessions cost relatively more there. See Cursor pricing.

Caveats

  • One engineer, one month. A heavy user on agent-written pull requests, mostly on Opus 5.5 and Fable 5.1.
  • List price. A subscription bills differently. Use these as proportions rather than as a bill.
  • The ranking is ours. It follows from our cost split. The docs don’t rank the fixes.

Frequently asked questions

How do I see token usage in Claude Code?

Run /usage. The Session block lists tokens per model, including cache reads and writes, and on subscription plans the screen also shows what used your limits. /context shows what fills the current conversation.

Why does Claude Code use so many tokens?

It sends the full conversation with every request, and each tool call is another request. Most of the count is cache reads: 98.4% of one of our engineers’ 67.9 billion tokens in a month. Cache reads are cheap per token, but they add up over long sessions.

How much do 100K tokens cost in Claude?

On Opus 5.5 at API list price, 100,000 tokens cost $0.40 as fresh input, $0.02 as cache reads and $2 as output. On Sonnet 5.5 they cost half that. Our month averaged about $0.38 per million across all token types, so 100,000 tokens came to about $0.04.

How do I reduce Claude Code token usage?

Clear between unrelated tasks, avoid resuming large sessions after the cache has expired, put simple subagents on Haiku, use Sonnet for routine work and leave effort at medium. Then compare /usage before and after on the same kind of work.

Do subagents use more tokens?

Yes. Each subagent sends its own requests, and they count against the same usage as your main conversation. In our measured month, subagents took 41% of tokens and 34% of cost. Setting model: haiku on simple ones is the cheapest fix.

Can I see Claude Code token usage per engineer?

Yes, in a few ways: OpenTelemetry export, the Claude Code Analytics API on Console organizations, the spend report CSV on Team and Enterprise plans, or Zest, which puts each engineer’s tokens next to their merged pull requests. See Claude Code monitoring.