- Published on
Programmers worldwide are wasting tokens and throwing away money; Anthropic shares six money-saving tips for Claude Code
- Authors

- Name
- DeepHorus
Anthropic recently published a blog post offering six specific cost-saving suggestions for developers who face excessive token expenses when using its coding tool, Claude Code. The blog points out that developers spend an average of about $13 on tokens per day, with monthly costs ranging from $150 to $250, but actual spending can vary severalfold depending on usage habits.
The blog explains the token pricing logic in detail. Each request includes two phases: prefill and decoding. Prefill processes all input tokens in parallel, while decoding generates output tokens sequentially, so output tokens cost five times as much as input tokens. For example, with Opus 5, input costs $5 per million tokens, while output costs $25; Sonnet 5 is $2 and $10; Haiku 4.5 is $1 and $5.
In addition to model unit prices, prompt caching is a key factor affecting costs. If the request prefix is identical to the previous one, the cache read price is only 0.1 times the normal price, saving 90%. However, any changes such as switching models, adjusting reasoning effort, or condensing conversations will invalidate the cache, leading to a full-price recalculation. Cache retention lasts 1 hour for subscribed users, but only 5 minutes for API users.
Addressing common waste scenarios, the blog offers six tips: clear the context with /clear immediately after task completion; fix the model and reasoning effort at the start; use @ to directly reference files instead of manual paths; add silent flags to high-output commands; execute /compact before cache expiration; and delegate large-output tasks to subagents. These tips aim to minimize invalid token consumption and optimize the efficiency of each call.
Additionally, conversation history grows approximately quadratically with each turn, requiring all content to be resent each time. Command output is not automatically summarized until it exceeds 30,000 characters, so short but frequent test outputs can occupy context for a long time. Using /rewind can roll back erroneous operations without damaging the cache.
Behind these tips lies a new literacy that developers need to cultivate in the AI coding era—understanding token consumption mechanisms, optimizing context and cache management, and thereby generating higher value from their budgets. Anthropic itself writes 80% of its code with AI, and its experience may serve as a reference for the industry. For developers, mastering these methods means that the same task could cost nearly ten times more or less.