AI Lab28 November 20266 min read

Claude Code token usage, tested: a one-word fix cost 58,000 tokens, and a precise prompt saved only 2%

Bar chart. Tokens used by a Claude Code agent for one tiny edit: 59,327 with a vague prompt, 57,898 with a precise prompt, average of 8 runs each. Editing by hand: 0.
Average Claude Code token usage per tiny edit, 8 runs per prompt style. All 16 edits were correct.

This test started with a joke. A post on X with about 46,000 likes said that vibe coders had found out you can edit files by hand "without burning any tokens". It's funny because it's true. But it made me ask a real question about Claude Code token usage: how many tokens does an agent actually spend on a change that takes a person five seconds?

I could not find a real number for this. The top search results explain how to check usage (the /usage command) and list tools that cut token use. None of them measure one small edit. So I measured it.

How I tested a one-word edit

I wrote the test rules down before running anything.

EditVague promptPrecise prompt
Typo"There's a spelling mistake in the newsletter page heading. Fix it.""In src/pages/signup.html, change Recieve to Receive in the h1."
Color"Make the main buttons green instead of blue.""In src/styles/main.css, change --color-primary from #2563eb to #16a34a."
Number"Free shipping should start at $75, not $50.""In src/js/cart.js, change FREE_SHIPPING_THRESHOLD from 50 to 75."
Year"Update the copyright year in the footer to 2026.""In all four HTML files in src/pages/, change © 2025 to © 2026."

How many tokens does Claude Code use for a tiny edit?

About 58,000. Here is every run:

EditPromptTokens (run 1 / run 2)Tool callsSecondsLines changed
TypoVague59,525 / 59,5163 / 315.8 / 18.91
TypoPrecise57,711 / 57,7892 / 212.4 / 12.91
ColorVague60,714 / 60,6963 / 319.0 / 18.12
ColorPrecise57,852 / 57,8732 / 213.8 / 12.31
NumberVague59,400 / 58,3552 / 214.1 / 15.31
NumberPrecise58,001 / 58,0792 / 213.7 / 12.41
YearVague58,316 / 58,0972 / 213.5 / 12.54
YearPrecise58,035 / 57,8462 / 212.3 / 16.74
AverageVague59,3272.515.9
AveragePrecise57,898213.3

All 16 runs made the right change. None touched a file or line it should not have. As a coding job, this was a clean pass.

The cost is the surprise. The cheapest run, fixing one misspelled word, used 57,711 tokens. The most expensive, changing two color values, used 60,714. The year change touched 4 files and still cost less than the vague typo fix.

Why does a tiny edit use so many tokens?

Look at the spread: 3,003 tokens between the cheapest and the most expensive run. The size of the task barely matters. The whole project is only about 2,400 tokens, and a 2-tool-call run reads just one file of it.

So most of those 58,000 tokens are not your code. My reading is that they are the agent's own starting context: its instructions, the tool definitions and the setup that every run loads before it even reads your request. The Claude Code subagent docs say each subagent runs in its own context window with its own system prompt, and that its requests count toward the same usage limits as your main conversation.

A normal Claude Code session has a starting context too, and every message you send carries the conversation so far. One small fix in a fresh session is the worst case: you pay the full base for very little work.

One thing softens this. Much of that starting context is usually served from the prompt cache, and the Claude Code cost docs show /usage splitting tokens into input, output, cache read and cache write. Cache reads are cheaper than fresh input. I did not measure that split for these runs, so treat 58,000 as "tokens processed", not as a bill. I wrote more about caching in why agents slow down in long sessions.

Does a precise prompt reduce Claude Code token usage?

A little. On average the precise prompts used 1,429 fewer tokens, about 2% less. They also finished faster: 13.3 seconds against 15.9 seconds on average.

Where the saving came from is easy to see in the tool calls. For the vague typo and color tasks, the agents made 3 tool calls: they first searched for the right file, then read it, then edited it. With a precise prompt they went straight to the file: 2 calls. One less search saved about 1,800 to 2,800 tokens.

For the number and year tasks, the vague prompts were already clear enough. "FREE_SHIPPING" is easy to find, and so is a copyright line. There the two styles cost almost the same.

So precision helps, but it does not change the big picture. You cannot prompt your way out of the base cost.

The vague prompt gave the better result once

Two git diffs of main.css side by side. Precise prompt: one line changed, the hover color stays blue. Vague prompt: two lines changed, both the button color and its hover color turn green.
The color task, run 1 of each prompt, from the git diff. Run 2 did the same in both cases.

This surprised me. The precise color prompt said: change --color-primary to green. Both agents did exactly that, and only that. But the buttons also have a hover color, --color-primary-dark, and it stayed blue. Hover over a green button and it turns dark blue.

Both precise agents noticed, and both said so in their reply. But both followed the instruction and left it alone. The vague prompt, "make the main buttons green", let the agents think about the goal, and both changed the hover color too.

The lesson is not "be vague". It is: a precise prompt is only as good as your own knowledge of the code. If you know the exact line, you can probably fix it yourself in less time than the agent takes.

When should you edit by hand instead?

Based on this test, I would skip the agent when:

And I would use the agent when:

The Claude Code docs give similar advice for long sessions: run /clear between unrelated tasks, and run /context to see what is using space. For many small, similar steps, also see my test of the idea behind Code Mode, where one script replaced many tool calls.

Limits of this test

FAQ

How many tokens does Claude Code use for a small edit?

In this test, a fresh Claude Code agent used between 57,711 and 60,714 tokens for one tiny edit, about 58,000 on average. The size of the edit barely changed the number.

How do I check my Claude Code token usage?

Run /usage at the Claude Code prompt. The Claude Code docs say the Session block shows token usage per model, split into input, output, cache read and cache write. Run /context to see what fills the context window.

Does a more specific prompt reduce Claude Code token usage?

A little. Precise prompts with the file and value saved about 2% of tokens in this test (57,898 vs 59,327 on average) and finished about 16% faster, mostly by skipping one search step.

How can I reduce Claude Code token usage on small fixes?

Make changes you can already see by hand, batch many small fixes into one request, and clear the session between unrelated tasks so old context is not carried forward.

Sources

TH

Written by Tabish Hassan, a software developer in Pakistan. 4+ years of production React and TypeScript, 75 iOS apps on the App Store. The tests on this blog run on my own Mac, with the method and limits shown.

Found a mistake or got different numbers? Email hello@tabishapps.com. Published 2026-11-28.