The “wasted tokens” number everyone quotes is about 16x too high

34,434 real Claude Code requests, measured.

2026-12-05 · 1,318 sessions · 4.70 billion input tokens · token counts exact, dollars estimated

Claude Code writes a transcript of every session to ~/.claude/projects. Those files carry the API’s own per-request usage accounting — and, in recent versions, the exact shape of each request, including every tool schema sent with it.

That is enough to answer a question I had not seen answered with data: not “how do I cut my token bill”, but where does it actually go?

The finding that changed my mind

I started out expecting to find waste and cut it. I found the waste. Then I found out it was worth about a twentieth of what the standard arithmetic says.

59 tool schemas were sent on request after request and never once invoked, costing 30.67M tokens. That is the number a “cut your AI bill” post would quote. Multiply by the input rate and you get a headline: $117 of pure waste.

It isn’t $117. It’s about $7.43.

    priced as cache reads   $7.43   <- realistic
    priced as fresh input   $117    <- what the naive figure implies

Tool schemas sit at the very front of the prompt. That makes them the single most cached thing in it — and on this data 97.0% of input tokens were served from cache, billed at roughly a twentieth of the input rate. The tokens you would “save” by deleting a tool are the cheapest tokens you have.

The standard method — count removable tokens, multiply by the input price — overstates the saving here by about 16x. The trim is still worth doing. It is not the transformation it looks like.

Where the money actually went

modelrequestsinput (incl. cache)outputest. cost
Opus 5.516,2023.17B12.07M$1,362
Opus 54,333962.40M4.90M$778
Haiku 5.58,832385.99M13.76M$18.15
Sonnet 5.54,634177.69M2.63M$90.46
total34,4344.70B33.37M~$2,249

Haiku did 8,832 requests — 26% of all traffic — for 0.8% of the cost. That ratio is the single biggest lever on this list, and it has nothing to do with trimming tool schemas.

Cache

served from cache          4.56B    97.0%
written to cache         138.72M     3.0%
    of which 1h TTL      120.27M   (billed at 2x input)
    of which 5m TTL       18.45M   (billed at 1.25x input)
never cached              71.04k

97% is healthy, and it is also the reason the waste number above collapses. Note the split: most cache writes were at the 1-hour TTL, which bills at 2x input, not 1.25x. Cache writes are not free, and a prompt prefix that keeps getting invalidated pays that premium every time.

Fixed overhead

Across 17,214 requests, before a single word of conversation:

  system prompt          43.28M tokens   (2.51k per request)
  tool schemas          211.96M tokens   (12.31k per request)
  fixed overhead        255.24M tokens

~14.8k tokens of fixed prefix on every single request, five-sixths of it tool schemas. As a share of all billed input that is only 5%, because conversations grow much larger than their prefix — but it is the part you pay on request one and on request ten thousand.

Thinking

15.98M thinking tokens — 47.9% of all output. Billed as output. On a long Opus session this is a bigger line item than anything in the schema table, and effort is the lever.

The specific tools

toolper requestrequests carriedtotalactually called
Artifact7.56k3,84129.03M161
ScheduleWakeup1.32k15,93720.97M2
Agent1.17k17,11920.10M119
Bash1.10k17,12018.80M24,921
ReportFindings68216,40911.19M0
Read54317,1209.30M339
ListAgents56016,4099.19M1

Bash is what a well-earned schema looks like: 18.80M tokens, 24,921 calls. ScheduleWakeup cost more than Bash and was called twice.

Rolled up by MCP server, which is the unit you actually toggle:

servertoolstokenscalls
claude-artifacts811.80M7
Gmail1911.12M106
Claude Docs51.31M0
Gumroad32884.52k298
Google Calendar2552.30k0
Google Drive2548.09k0

Three servers carried on every request for eleven days and never called once. Gumroad is the counter-example worth noticing: 32 tools for 884k tokens — one thirteenth the cost of Gmail’s 19, and the most-used server on the list (298 calls). Tool count is a bad proxy for cost; schema size is the thing.

Measure your own

The transcripts are JSONL. Two record types carry everything above:

So you can attribute cost to individual tool schemas without instrumenting anything. Here is the whole idea in twenty lines:

import json, glob, os, collections

usage = collections.Counter()
calls = collections.Counter()

for path in glob.glob(os.path.expanduser("~/.claude/projects/**/*.jsonl"), recursive=True):
    for line in open(path, encoding="utf-8", errors="replace"):
        try:
            d = json.loads(line)
        except ValueError:
            continue
        msg = d.get("message") or {}
        u = msg.get("usage") or {}
        for k in ("input_tokens", "output_tokens",
                  "cache_read_input_tokens", "cache_creation_input_tokens"):
            usage[k] += u.get(k) or 0
        for block in msg.get("content") or []:
            if isinstance(block, dict) and block.get("type") == "tool_use":
                calls[block["name"]] += 1

print(usage)
print(calls.most_common(20))

That gets you totals and call counts. Attributing schema cost needs the api-request-shape join, and pricing it honestly needs the cache split — which is the part everyone skips, and the part that produced the 16x correction above.

Two caveats worth stating

The tool

I packaged this as token-xray — one Python file, no dependencies, 26 tests. It reads local transcripts, sends nothing anywhere, needs no API key, and prints every section above against your own data, including the honest-versus-naive bracket.

appenable.gumroad.com/l/token-xray — $39.

It is paid, which I would rather say plainly than bury. Everything needed to reproduce the method is above, and the twenty lines will get most people most of the way. Source of this page and the raw numbers on GitHub.


Also measured: which Claude Code token fixes actually save money — fifteen configurations measured; --allowedTools "" saves exactly zero tokens, and model choice beat every trim by 23x.

Also measured: your headless Claude Code evals are probably not reading CLAUDE.md — a rule obeyed 3/3 when injected properly and 0/3 sitting in CLAUDE.md, because claude -p never put it in context.

Also measured: when Claude Code subagents actually pay for themselves — splitting the work costs 1.97x as much at 1,668 lines and is 4.3x cheaper at 10,328, and on a needle hunt it takes precision from 1.000 to 0.714.

Free, no signup past an email: What Claude Code actually follows — eight findings from 250+ isolated, graded runs: which CLAUDE.md rules get half-done, the broken file a passing test suite misses, and whether a model cheats on a test that contradicts its spec.


Numbers from one developer’s usage, 2026-11-24 to 2026-12-05. Token counts exact; dollars estimated from list prices. Project and session names omitted.

More measured notes on coding agents: alexenabled.github.io

Also measured: every broken test suite scored a perfect 1.000 — 599 validated mutants, and why coverage could not tell any of the suites apart.