Official Claude Code Token Saving Guide: 11 Tips to Extend Your Quota
Anthropic has released the Claude Code Token Saving Guide. The core message is simple: the longer the context, the more expensive each subsequent round becomes. Chatting, document handling, and command outputs will continue to consume tokens, thus depleting your quota faster.
Here are 11 practical tips:
Use /clear to switch tasks. Clear the context after completing a task. If you are still working on the same task but the previous content is no longer useful, use /compact to compress it. Longer conversations become more expensive as each round will reintroduce previous content.
Choose the model and effort settings at the start. Executing /model or /effort midway will clear the prompt cache, requiring the entire context to be processed again in the next round. Fast mode should also be enabled from the beginning.
Compact before leaving. Subscription users have a cache that expires after about 1 hour, while the API Key defaults to about 5 minutes. If you return after the cache expires, the next round will usually require reprocessing the entire context. Compressing while the cache is still valid is cheaper.
Use /rewind if the last few rounds have gone off track. It only deletes the last few rounds, allowing you to continue using the earlier cache. /compact rewrites the entire conversation, which is more costly.
Use @filename directly for files. Claude will access the file in the first round, saving a Read or search step. A file typically only needs to be referenced with @ once; repeating @ may inadvertently add the same file back into the context.
Be specific in your prompts. Instead of saying "the test failed," directly tell Claude which test and which file. Otherwise, it may grep, search, and read through multiple files, and these results will continue to occupy context in each subsequent round.
Minimize output from tests and logs. Outputs from builds, tests, and git logs will remain in the context. You can add a quiet parameter to only output errors or use tail to truncate. Claude Code will automatically write command outputs exceeding 30,000 characters to a file, leaving only the summary and path in the session.
Use /context to check startup load. At the beginning of a new session, you can see how much context is occupied by CLAUDE.md, MCP, and tool definitions. CLAUDE.md should only contain general rules, while specialized processes should be loaded on demand through Skills, and unused MCPs can be turned off with /mcp.
Use smaller models and lower effort for simple tasks. Larger models are more expensive for both input and output, and thinking also counts as output tokens. For purely execution-based tasks, there’s no need to always use the highest-tier model and inference intensity.
Delegate large logs to subagents, and avoid misusing them for small tasks. Subagents have independent contexts and only bring back the final results to the main session, making them suitable for reading large logs or searching documents. However, they also need to read files again and run multiple rounds themselves, which can make small tasks more expensive. Tasks like searching and reading logs can also specify Haiku or Sonnet.
It’s best to run /loop in a separate session. Each loop is a complete round and will carry all the current session's context. If the interval exceeds the cache time, it may also accumulate a cache expiration. The official recommendation is to open a new terminal and run loops in a clean session.
Ultimately, Anthropic's advice boils down to: avoid stuffing useless content, clear tasks promptly, and don’t let sessions drag on too long.
-- Price
This content is provided for general informational purposes only and doesn't constitute financial, investment, legal, or tax advice. Any events, rewards, online promotions, or related information mentioned herein should not be considered a recommendation, solicitation, or invitation to purchase, sell, trade, or otherwise deal in any crypto assets. Crypto assets are highly volatile and may result in loss. The availability of WEEX services, products, and related events may vary by region. You are responsible for ensuring that your participation is in accordance with applicable local laws and regulations.
You may also like

Lido Staking Vault 0% Fee Applicable Until August 31, 2026

VIX Futures Volatility Rises as U.S. Midterm Elections Approach

Brazil fines ByteDance 153.7 million reais for violating children's data protection

Empery Reduces Bitcoin Holdings to 1,179, Expands AI Data Center Investment

AI: Hugging Face explores a sale that could value it at $13 billion

Easing US-Iran Tensions Drive Global Risk Assets Rebound, Brent Oil Falls Below $90

UBS Market Vulnerability Indicator Reaches 1.0, September Fed Meeting and November Midterm Elections May Trigger Volatility

Bitcoin Surges to 80000, Needs to Exceed 81087 to Confirm End of Bear Market

ETH Whale Holdings Unrealized Profit and Loss Ratio Rises to 0.38

Pakistan Begins Licensing Applications for Cryptocurrency Operators, Registration Required by September 5

Blockchain Association Requests Amendments to KYC Rules for Stablecoin Issuers

Cryptocurrency Trading Volume Declines for 10 Months, Market Cap Rises 21%

Former MiniMax Technical Partner Yang Bin Raises $6 Million to Launch Voice AI Company

Pakistan Resumes Mediation in US-Iran Conflict with Iran

Bitcoin Spot ETF Sees Net Inflow of $338 Million Yesterday, Continuing Six Days of Inflows

Apple to Release New Mac mini Amid Ongoing Supply Shortages

Hanwha Ocean Expands AI Welding Application to 67% and Targets U.S. Naval Market

First BTC Payment Statement at El Zonte Restaurant

Elon Musk announces SpaceX, NVIDIA partnership, stocks decline

Goldman Sachs Projects European Gas Prices to Reach €100 by 2026

Morpho Introduces Variable Income Connection Feature for Fixed Rate Waiting Funds

CME Adds Four Ethena Price Indicators to Data Feed

Aviation Fuel Prices in Russia Reach 121,864 Rubles per Ton

Suspected Data Breach at BitcoinIRA and iTrustCapital Not Publicly Disclosed

Twitch Faces Class Action Lawsuit for Unauthorized Use of Streamer Content

U.S. National Debt Surpasses $40 Trillion, Concerns Over Rising Interest Costs

BitMine Increases Holdings by 32,447 ETH, Total Holdings Reach 5.8476 Million

Russia claims that three people, including two children, died in a drone attack in Krasnodar

Gold Price Reaches 4643.95 USD, Ends 6-Month Correction












