
Just now, Anthropic published a blog post.
The core message is: Everyone, stop burning tokens for no reason, we can't stand watching anymore!

To that end, the official team listed six money-saving tips in detail. Here they are:
1. /clear when a task is done. Clear the current conversation after fixing a bug. Don't let files read and command outputs from the previous task drag into the next one, needlessly occupying context.
2. Set the model and reasoning effort level from the start. If you switch mid-conversation, all accumulated prompt cache is invalidated, and the entire conversation history has to be recalculated at full price.
3. Use @ to reference files, don't type paths manually. Attach files directly to the message using @, so Claude doesn't need to spend an extra tool call to read them. If you only type the filename, Claude might search around first and open several files to probe. All these operations go into the conversation history and are carried along in every subsequent turn.
4. Add quiet flags to commands with lots of output. Write something like ‘--reporter=dot’ in CLAUDE.md so test outputs print only a few summary lines, not hundreds of lines of details. Shorter output occupies less context.
5. Do /compact before taking a break. Compress while the conversation is still cached, costing only one-tenth of the normal rate. If you wait until you come back and the cache has expired, you have to reread everything at full price before compressing.
6. Offload large-output tasks to sub-Agents. A sub-Agent runs in an independent context window. It only passes back the conclusion when done; the files read and command outputs generated during the process don't enter your main conversation.

The Life of a Token
Using Claude Code, the API is pay-as-you-go, while the subscription model has three monthly tiers from $20 to $200.
According to official estimates, developers consume an average of $13 worth of tokens per day, spending between $150 and $250 per month.
And that's just the average. Fixing the same bug can cost several times more or less depending on how you ask.
Furthermore, each turn of conversation resends the entire content of all previous turns. The longer the session, the more expensive each turn becomes.
To understand where this money goes, we need to start with the pricing logic of tokens.

Every time you type a command in Claude Code, two things happen behind the scenes.
The first is called prefill. The model reads your entire request in one go, including the system prompt, CLAUDE.md, your message, and everything accumulated in the prior conversation. These are input tokens.
The second is called decode. This is the process where the model writes out its response word by word, including its reasoning, tool calls, and the final text you see. These are output tokens.
The crucial difference lies here.
Prefill is parallel, processing all input tokens through the GPU at once. Decode is serial, requiring a model run for every single token output. A 200-token reply means 200 independent computations.
So it's not hard to understand why output tokens are 5 times more expensive than input tokens.

On top of this, the final bill depends on two factors.
First, the model, which determines the unit price per token.
Opus 5: Input $5/million tokens, Output $25.
Sonnet 5: Input $2, Output $10.
Haiku 4.5: Input $1, Output $5.
Second, the reasoning effort level, which determines the *quantity* of tokens.
Most output tokens in a session are reasoning tokens, and the effort level controls this amount. Higher effort means the model thinks longer, outputting more reasoning tokens. The difference between ‘max’ and ‘low’ can be several times.
Use Sonnet for simple tasks, and only bring out Opus for the tough ones. Using a cannon to kill a mosquito is the most wasteful expense.

Prompt Caching is the Biggest Money Saver
There's another huge variable in token pricing: caching.
Each request in Claude Code starts with the same prefix: the system prompt, tool definitions, CLAUDE.md, and conversation history.
If the prefix of the current request is byte-for-byte identical to the last one, the server doesn't recalculate it. It loads the previous computation result directly.
Reading from the cache costs only 0.1 times the normal input price, saving 90% instantly.
Writing to the cache is more expensive, up to 2x. But writing only happens once, and every subsequent turn enjoys the 0.1x read rate.
For example, imagine your conversation history has 50,000 tokens. Without cache, every turn has to pay full price just to reread those 50,000 tokens. But with a cache hit, those same 50,000 tokens cost only one-tenth.
Run a session for 20 or 30 turns, and the discounts accumulated from cache hits become astronomical.
This is your biggest lever for saving money.

But caching has a critical weakness. It requires a continuous match starting from the very first byte of the request. If anything changes anywhere in the middle, everything from that point onward is invalidated.
Specifically, there are six scenarios:
1. /model to switch models: Each model has its own independent cache. Switching from Sonnet to Opus means the entire conversation history is prefilled at Opus's price, with no discount.
2. /effort to switch reasoning levels: The reasoning level is also part of the cache key. Switching it causes the entire conversation history to be recalculated.
3. Toggling Fast mode: The effect is the same as the first two; the cache is immediately invalidated.
4. /compact to compress conversation: The conversation is rewritten into a summary, the original content no longer matches, and the old cache is completely invalidated.
5. Time expiration: Cache stays alive for 1 hour for subscription users, 5 minutes by default for API users. After timeout, the next turn requires a full recalculation.
6. Resuming an old session: After too long, the cache is long gone, almost guaranteeing a full-price recalculation.
The bad news is, hitting just one of these means the entire conversation history jumps from 0.1x back to full price.
The good news is, once you know what invalidates the cache, you know how to preserve it.
For example, lock in your model and reasoning level at the start of a session and don't switch. Don't run /compact while the cache is still hot; do it when you're about to take a break.
Here's a hidden pitfall.
The opusplan mode switches models every time you enter or exit the plan. Enter once, cache invalidated. Exit, invalidated again. Jumping back and forth means each jump incurs a full-price prefill.
Your Conversation is Secretly Getting Fat
Caching helps reduce the cost of resending history to one-tenth.
But there's one thing it can't help with: your history itself is ballooning turn by turn.
Every time Claude reads a file, the file content is appended to the conversation. Every time Claude runs a command, the output is appended too. From the turn it's appended, it's carried along in every subsequent turn.
The 40th turn of conversation is resending the entire accumulated content of turns 1 through 39.
This growth is close to quadratic O(n²).

Claude Code has a safety-net mechanism.
If a command output exceeds 30,000 characters, it's not stuffed into the conversation. Instead, it's written to a temporary file, and only a summary line is placed in the conversation. But outputs under 30,000 are left unchecked.
For example, a test framework finishes and prints 400 lines of pass records, dozens of characters each, total under 30,000, not hitting the threshold.
So those 400 lines stay intact in the conversation history, being resent in every following turn.
Regarding this, the Anthropic blog offers several practical slimming methods.
1. @ reference files.
Don't manually type paths for Claude to find. @ referencing attaches the file directly to the message, saving a read operation.
If you only say the filename, Claude might grep around first, opening several files to see which one is correct. All these probes then enter the conversation history, adding unnecessary cost.

2. Add quiet flags to noisy commands.
Write a line like ‘run tests with npx vitest run --reporter=dot’ in CLAUDE.md. From then on, each test run will output only a few lines of dot results, not hundreds of lines of details. One minute of configuration saves hundreds of lines of context in every future session.
3. Isolate large-output tasks with subagents.
Subagents run in their own independent context window, passing back only the answer when done. Files read and command outputs generated during the process are all discarded. Suitable for tasks like “go check the logs for anomalies” or “help me review this large file.” You want the conclusion, not the process.

And the most important one.
4. /clear between tasks.
/clear after fixing a bug before starting the next thing. Files, command outputs, and intermediate explorations from the previous bug are all irrelevant to the next task. But if not cleared, they occupy space and consume tokens in every subsequent turn.
If you don't want to clear entirely, /compact can compress the conversation into a summary. Ten to twenty thousand tokens can be compressed to one to three thousand.

Additionally, the blog mentions a lesser-known but free operation: /rewind.
If the last few turns go off track, /rewind directly cuts them off, leaving the previous cache completely untouched.

Managing Tokens is Also a Developer Skill
Breaking down all these operations, you'll notice a pattern. Coders are developing a new set of skills.
Unrelated to frameworks or languages, it's about knowing which model to choose, how to manage context, how to preserve cache, and what reasoning level is appropriate.
These abilities didn't exist a year ago. But now they determine whether you spend $3 or $30 on the same task.
Anthropic itself is the best example.
They write 80% of their code with AI, code merge volume increased 8-fold in a year, and benchmark tests accelerated by 52x. Using AI at this intensity, if no one managed tokens, inference costs alone could blow through the budget.
From this perspective, this blog post isn't just about money-saving tips; it's about a new instinct that coders in the AI era need to develop –
Knowing what each of your operations consumes, and knowing how to make the same budget accomplish more work.
Those who understand it aren't just saving a few dollars in tokens.
References:
https://claude.com/blog/maximizing-the-value-of-your-claude-code-sessions
Editor: Moses
This article is from the WeChat public account “New Zhiyuan”, Author: ASI Apocalypse





