--allowedTools cuts your schema overhead” saves exactly zero tokensFifteen Claude Code configurations, changed one at a time, measured with the CLI’s own per-request accounting.
There is a whole genre of article telling you how to cut your Claude Code bill. Nearly all of the numbers in it are produced the same way: count the tokens in something you could remove, multiply by the input price, and measure it once.
All three steps are wrong, and they fail in the same direction. So I measured instead. The headline: the best prefix trim available was worth $1.64 per 10,000 requests, and choosing a different model was worth $37.77.
Each trial runs one claude -p in an empty scratch directory — no repository,
no CLAUDE.md — with a deliberately trivial prompt (Reply with exactly:
ok). With no real work to do, almost the whole request is prefix, so a change in
the measurement is a change in the prefix rather than the model doing something different.
prefix = input_tokens + cache_creation_input_tokens + cache_read_input_tokens
That is the entire prompt the request carried, and unlike cost it does not move with cache
state. claude -p --output-format json reports all of it, plus
total_cost_usd, so no instrumentation is needed.
| configuration | prefix | vs baseline | $/10k warm |
|---|---|---|---|
--tools "" | 3,803 | −16,418 (−81.2%) | 0.40 |
--tools "Read,Grep" | 6,171 | −14,050 (−69.5%) | 0.64 |
--tools working set | 8,640 | −11,581 (−57.3%) | 0.89 |
--disallowedTools Bash | 20,171 | −50 (−0.2%) | 2.04 |
| baseline (Haiku) | 20,221 | — | 2.04 |
--allowedTools "" | 20,221 | 0 (0.0%) | 2.04 |
| +10 MCP tools | 20,414 | +193 | 2.06 |
| +40 MCP tools | 20,993 | +772 | 2.12 |
--allowedTools "Read,Grep" | 21,784 | +1,563 (+7.7%) | 2.20 |
+40 MCP, ENABLE_TOOL_SEARCH=off | 51,150 | +30,929 (+153%) | 5.14 |
--allowedTools does not remove a single token--allowedTools "" produced a prefix of 20,221 tokens — identical to
baseline, to the token. It governs permission, not payload. The schemas
are still sent; the model just is not allowed to use them.
Worse, the narrowing form adds: --allowedTools "Read,Grep" came in
1,563 tokens above baseline. If you adopted that flag to save money, you have been
paying a small premium.
--toolsIt changes which built-ins are present, not merely permitted. --tools
"Read,Grep" is −69.5%, and on a real task — read a file, return
the matching line — it still answered correctly.
--tools "" silently corrupts your outputSame real task, three configurations:
| configuration | result | is_error |
|---|---|---|
| baseline | GAMMA_MARKER_7781 | false |
--tools "Read,Grep" | GAMMA_MARKER_7781 | false |
--tools "" | <invoke name="Read"> | false |
With no tools present the model tried to call one anyway and emitted raw tool-call syntax as its answer — and the run was reported as a success. A batch pipeline that adopted this for the 81% saving would write malformed strings into its results and have no signal at all.
Ten MCP tools added 193 tokens. Forty added 772 — about 19 tokens each, against roughly 250 for a full serialized schema. The full schema is not in the request.
The widely-quoted “50–70k tokens of MCP overhead” reproduces exactly, but only with deferral switched off: the same 40 tools went from 20,993 to 51,150. The figure was never wrong — it was measured before schema deferral became the default, and the advice built on it has outlived the problem. Inverted, the actionable version is: do not disable tool search. It is worth more than every trim here combined, and it is already on.
One trap worth knowing: --tools "" together with MCP servers came to
18,018 tokens, not the ~3,800 you would expect. Deferral appears to need the built-in tooling to
work, so the MCP schemas return in full at ~355 tokens each.
| lever | saving per 10k requests |
|---|---|
| Opus → Haiku, same work | $37.77 |
| best prefix trim | $1.64 |
| realistic prefix trim | $1.16 |
--allowedTools "" | $0.00 |
Identical prompt, warm cache: Haiku $2.04 per 10k, Sonnet $19.91, Opus $39.81. Trimming the prefix on Opus gets you to $16.65. Switching model gets you to $2.04.
As a cross-check against 14 days of ordinary observed usage on the same machine — 1,397 sessions, 35,894 requests: Opus took 60.3% of requests and 95.4% of the cost, while Haiku did 25.5% of requests for 0.8%. And 97.0% of all input tokens were served from cache, which is exactly why pricing removable prefix tokens at the input rate overstates so badly.
| baseline | cold $/req | warm $/req | ratio |
|---|---|---|---|
| Haiku | 0.002252 | 0.000204 | 11.0x |
| Sonnet | 0.041100 | 0.001991 | 20.6x |
| Opus | 0.082153 | 0.003981 | 20.6x |
The identical configuration, measured twice seconds apart, costs twenty times more the first time. Any comparison that runs each candidate once is reporting cache luck. The published comparisons I checked do exactly that: one task, one run per tool.
One vendor guide says trimming a project instruction file yields “on a $500/month API spend, roughly $460 saved per month from editing one file”. Measured: appending 9.2 KB of project instructions (2,536 tokens) cost $5.07 per 10,000 Opus requests. Deleting it entirely — not editing it, deleting it — saves that. To reach $460/month you would need roughly 907,000 requests a month, at which point your bill is not $500.
A kilobyte of instructions costs about 55 cents per 10k Opus requests, or 2.8 cents on Haiku. Write what you need. Trim it for the model’s attention if you like — that is a better argument — but not for your bill.
--tools to what the job
needs. This is the one trim that pays.--allowedTools as a cost measure.One machine, one CLI version, one account, one day. The trivial-prompt design isolates the prefix on purpose, which also means that in a long session the conversation dominates and every percentage here shrinks as a share of the real bill — the ranking is what travels, the percentages are an upper bound. Two trials per configuration, defensible only because the spread was exactly zero on all fifteen. Dollars are the CLI’s own figures at list prices; on a subscription plan the ratios hold but the absolute numbers do not. The MCP tools are synthetic by design, so that the arms are comparable between machines.
I packaged the report and the harness that produced it: fifteen configurations, ten findings,
every figure traced to the trial behind it, plus the one-file tool so you can run the same matrix
against your MCP servers and your own typical task. It takes a --budget and
stops before it passes it. 26 tests, no dependencies, no API calls in the suite.
It is paid, which I would rather say plainly than bury. Everything needed to reproduce the method is on this page, and the numbers above are the real ones.
Also measured: the “wasted tokens” number everyone quotes is about 16x too high — 34,434 requests on where the money actually goes. And your headless Claude Code evals are probably not reading CLAUDE.md.
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.