How to Stop Claude Code Burning Through Your Token Allowance

A laptop showing a code editor on a wooden desk at night, with a coffee mug, notebook and warm desk lamp light

How to Stop Claude Code Burning Through Your Token Allowance

A laptop showing a code editor on a wooden desk at night, with a coffee mug, notebook and warm desk lamp light

Claude Code does not come with a fixed number of messages. Anthropic says there is no set allowance: how fast you run through your usage depends on the model you pick and on how long and how complex your sessions get. That flexibility is part of the appeal, and it is also why so many developers hit a session limit in the middle of a working day and wonder where it all went. The answer, according to a developer who dug into his own logs, is rarely one big task. It is the slow accumulation of reused context, idle background agents and conversations that never end.

Nate Herk, who runs a YouTube channel on AI automation, went through a week of his own Claude Code usage and found a pattern that surprises most people who see it for the first time. In that week, the tool logged 2.37 billion tokens, and 96 percent of them were cache reads, context the model had already processed and was simply reusing. Because cached input costs roughly a tenth of fresh input, those reads represented only about 40 percent of the cost at API prices. The raw token count tells you almost nothing about how much allowance is gone; what matters is the mix of model, fresh work and background activity.

Anthropic’s own team has been publishing the same kind of guidance. Thariq, an engineer on the Claude Code team, has explained that the tool was built around prompt caching, and a high cache hit rate is part of what lets Anthropic offer generous subscription limits. The advice that follows is less about clever tricks than habits: check where the usage goes, pick the right model before you start, keep subagents on a short leash, and close conversations that have done their job.

Find Out Where the Allowance Actually Goes

The first step costs nothing and takes less than a minute. On the Pro, Max or Ultra plans, typing /usage inside Claude Code shows a breakdown of local usage by source, including skills, subagents and MCP servers, along with recommendations for cutting it back. The recommendations can be specific: in one example, the tool flagged a single line in a CLAUDE.md file costing 49,000 tokens every time it loaded, and pressing F applied the fix. The D and W keys switch between the last day and the last week, separating a one-day spike from a recurring cost.

One limitation: the breakdown covers activity on the local machine only, not usage synced from another computer or chats on Claude’s website. Even so, it shows which source is actually eating the allowance rather than which one you assume is, and skipping this step means fixing habits that were never the problem.

Claude Code is included with the Pro plan, which starts at 20 dollars a month with monthly billing, and the allowance is shared with your other Claude activity, so a heavy week of website chats leaves less room for coding sessions. Knowing the split before you change anything keeps the rest of the advice honest.

Use the Smaller Model for Routine Work

The single biggest lever most developers have is the model they run by default. Anthropic changed the Pro default from Sonnet to Opus in September, so anyone who never touched the settings is now running the heavier model on every task, including renaming files. Anthropic’s Help Center describes routine Opus use as the fastest way to drain a daily limit, and Herk’s logs back that up: in one week, an Opus request cost about 2.5 times as much as a Sonnet request on average, while a request to the most capable model cost about 3.5 times an Opus request.

Hands typing on a laptop keyboard with code blurred on the screen in a bright home office
Routine work rarely needs the heaviest model, and the gap between Sonnet and Opus adds up across a day of small jobs.

The fix is to match the model to the job. Sonnet handles routine tasks well, and a common pattern is to use Opus for the plan and Sonnet for much of the execution, with a command such as /model Opus plan. Opus 5.5 defaults to medium effort, which Anthropic says matches or beats the older Opus 5 at high effort, so Herk recommends leaving it at medium unless a task genuinely calls for more.

Just as important is choosing the model before the session starts. Switching models midway through a chat breaks the cache, because each model keeps its own cache and the new one has to process the full context again. Thariq published an example in April in which switching from Opus to Haiku for an easy question after 100,000 tokens would have made Haiku process the entire context from scratch, wiping out any saving from the cheaper model. Changing the effort level mid-session no longer breaks the cache, according to the Claude Code team, but a model switch still does. Decide at the start, and stay with the decision for that task.

Keep Background Subagents on a Short Leash

Subagents are the quietest drain on a Claude Code allowance, because they spend usage even when you are not looking at them. A subagent starts with a short prompt rather than the main session’s conversation or the files it has already read, so it has to load the instructions and files it needs again, and that repeated reading adds to usage. A subagent’s cache lasts only five minutes, compared with one hour of inactivity for the main chat, so an idle subagent rebuilds its context when work resumes. In 30 days of the channel’s usage, subagents accounted for 47 percent of the total.

The failures can be dramatic. One developer used 76 percent of a weekly limit in under a day during a session that kept up to seven subagents running in parallel. Lydia, from the Claude Code team, advised that in most cases each subagent should complete one task, return its result and then stop. If an agent genuinely must remain idle, the subagent prompt cache TTL setting can be raised to one hour, matching the main chat. Subagents you configure can also inherit the main chat’s model even when their tasks do not need it, so set a default subagent model explicitly; Herk says Sonnet handles those jobs most of the time.

Anthropic identifies only three reasons to use a subagent: relieving an overloaded main session, running independent jobs in parallel, or separating conflicting tools and instructions. When each step depends on the previous one, the company recommends letting one main session plan and carry out the work. One Anthropic customer found that a single-agent setup ran about twice as fast as a setup with many agents, and the team calls the buildup of agents doing nearly the same work agent sprawl. Keeping the tool updated helps too: background status updates now cost about 99 percent less than before the fix on November 4, and one team’s telemetry put background summaries at 16.4 percent of spending before updating and zero afterward.

Scheduled loops deserve the same suspicion. They run when you are idle and send the full context each time, and a loosely specified goal can keep working overnight and drain usage, especially if it starts subagents of its own. Give every goal a clear stop condition, or change its check-in time to zero if it does not need to check in at all.

Compact or Clear Long Chats Before They Bloat

Every message in Claude Code carries the conversation with it, including instructions, files and earlier messages, so a long chat gets more expensive with every turn even when the new work is small. On the one-million-token models, Claude Code normally waits until about 967,000 tokens before compacting a conversation, and until then the cached material keeps counting toward usage while the growing context can degrade performance through what developers call context rot. The models each have a one-million-token context window and a maximum output of 128,000 tokens.

Some users take control with a lower threshold, setting /autocompact 400k, and one developer estimated that this setting would have saved 29 percent of weekly usage. The lesson is that a conversation kept short costs less, because each message resends less baggage.

For a genuinely new task, the simplest move is to clear the conversation entirely with /clear. Clearing costs nothing, even after the cache has expired, and within a project Claude Code can still know the project’s CLAUDE.md, goals, files and folders, so you lose less than you fear. Anthropic’s Help Center suggests asking whether your next prompt would make sense in a fresh session, and if it would, starting one. One warning: a break of an hour or more expires the main-chat cache, so returning to the old conversation requires a rebuild.

Keeping CLAUDE.md short is part of the same habit. Anthropic recommends keeping the file under 200 lines and moving task-specific instructions into skills that load fully only when needed. Tests cited in a separate write-up found 80 percent of the system prompt could be removed for two models without a measurable drop in results. It is a similar story to how AI now generates code and reviews pull requests, where the tooling keeps improving but the workflow around it decides how much it costs to run.

Ignore the Viral Token Savers

Not every saving is real, and some of the most popular ones cost more than they save. RTK, a tool that compresses terminal output before Claude sees it, has about 90,000 GitHub stars and has been claimed to save 70 percent of tokens. JetBrains tested it and found that tasks cost about 7.6 percent more at low effort, even as RTK’s own counter reported 96 million tokens saved. In Questma’s 1,700 attempts, the smaller output came with more Claude turns and higher spending. The model needed more rounds to finish the job, and the rounds cost more than the compression saved. Check whether a tool reduces actual spending, not just the size of its output.

A short instruction can cut output far more cheaply. One experiment had Claude answer in the style of a caveman: about 7,000 output tokens without instructions, about 4,300 when asked to answer concisely, and about 4,100 with the caveman style. The concise instruction did almost all of the work, so put it in CLAUDE.md or a skill rather than bolting on a tool whose own meter flatters it.

The same logic applies to the tools loaded into a session. Turn off MCP servers, connectors and web search tools that a task does not need, including in the Claude app, because Anthropic says tools and connectors consume tokens when many are loaded. Accurate routing maps can also direct Claude to a file or project location without repeated searching, which can take a couple of minutes each time. Max and Ultra users should also check for free limit resets tied to the launch of the most capable model: Anthropic gave eligible users one to three, and any available reset is worth using before it expires. Anthropic’s broader work, including Anthropic’s work beyond the coding tool, shows a company expanding in several directions at once, but the day-to-day cost of Claude Code still comes down to these small choices. And for developers who want to keep costs down across the board, there are also free AI repositories that can replace paid subscriptions for some jobs entirely.

Bottom Line

The most useful idea here is that a big token count tells you little; what matters is where your limit actually goes. In the week Herk logged, cache reads accounted for 96 percent of tokens but 40 percent of the cost at API prices, and the expensive part was the fresh work, the heavy model and the background agents. Check your own numbers with /usage before changing anything, pick the model at the start of the session, keep subagents to one task each, and clear conversations that have done their job. The figures here come from one person’s logs, not a rule, so test any saving claim against your own usage.

on this page