News

Programmers around the world are wasting tokens and giving away money for free. Anthropic shares Claude Code’s six tips for saving money.

2 min read
Source: ithome.com
Just now, Anthropic posted a blog. The core message is: Everyone, stop burning unjust tokens, we can’t stand it anymore! To this end, the official list of six ways to save money is as follows: 1. Clear after completing the task. After fixing a bug, clear the current conversation. Don't let the files and command output read in the previous task be dragged into the next task, occupying the context in vain. 2. Set the model and inference intensity (effort level) at the beginning. If you switch midway, all the previously accumulated prompt cache will be invalidated, and the entire conversation history will be recalculated at the full price. 3. Use @ to reference the file, do not enter the path. Use @ to directly attach the file to the message, Claude, without spending another tool call to read it. If you only enter the file name, Claude may search around first and then open several files to test. All these operations will be entered into the conversation history and carried with it in every subsequent round. 4. Add a quiet flag to commands that produce a lot of output. Write a configuration similar to --reporter=dot in Claude.md so that the test output only prints a few lines of summary instead of hundreds of lines of details. The shorter the output, the less context it takes up. 5. Do /compact before taking a break. Compressing the conversation while it's still in the cache costs only one-tenth of the normal cost. When you come back and the cache has expired, you will have to read it again at the full price and then compress it. 6. Throw large output tasks to sub-Agents. The sub-Agent runs in an independent context window, and only the conclusion is sent back after completion. The files read and the command output run during the process will not enter your main conversation. The past and present life of a token Use Claude Code to work, the API is based on volume, and the monthly subscription fee is divided into three levels from US$20 to US$200. According to official estimates, developers consume an average of US$13 in tokens per day, and the average monthly expenditure is between US$150 and US$250. This is just average