Key takeaways
- Watch four sources of usage - context, subagents, skills and caching interact; they are not separate billing categories.
- Retained context can recur - cached input can cost less than fresh input.
- Budget per task and overall - decide what the work is worth and use the available spending controls.
- Measure the right number - context size, cumulative usage and your bill answer different questions.
A surprising Claude Code bill can come from repeated requests and delegated work that felt routine while you ran them. To understand it, separate what entered context, what the workers did and how the requests were billed.
“Use fewer tokens” is not enough advice. Retained context, subagents, skills and caching are four useful things to inspect. They overlap: a skill can load into a subagent, and both can use cached input. They are not four separate prices on an invoice.
So this is not a post about spending less. It is a post about spending on purpose. Knowing the four shapes turns a vague unease about cost into a set of specific, answerable questions, and answerable questions are the whole of budgeting.
Where your tokens actually go
In a long session, retained context can become a large source of input tokens. Whether it is the largest cost depends on the model, caching, generated output and delegated work.
Claude Code sends the retained conversation and instructions with later requests. That can include earlier messages, file reads and tool output, until they are summarized or removed. Repeated input is not necessarily billed at the fresh-input rate: prompt caching can reuse an unchanged prefix at a lower rate. A large file may therefore affect later requests, but its cost is not file size multiplied by every remaining turn. Load deliberately and check cache usage.
The effect of a file read can continue after the turn that loaded it. Check subsequent input and cache-read counts rather than assuming that the cost ended with the read, or that every later request paid full price.
Picture a session where you load three large files for background. If only one matters to the next steps, the other two may add unnecessary context. Read what the task needs, then fetch more when a specific question calls for it.
Command output and conversation also use context. A verbose build log or search result can add more material than the next step needs. Summarize or narrow it when doing so preserves the evidence needed to solve and review the task.
The four cost shapes
The context window is one shape. Three more sit alongside it, and a budget is just knowing which shape each action belongs to.
Retained context can recur on later requests, at the applicable fresh-input or cache rate. A subagent has its own requests, including its brief, instructions, tool results and output. That is additional work, not a fixed token charge. The skills documentation says a skill body normally loads on invocation; its description can already be in context, and an invoked body remains there. Preloaded subagent skills are an exception to loading only on invocation. Caching can reduce the cost of repeated input, but writes also have a price and entries expire. See LLM caching strategies for the wider mechanics.
The lump is not one size, July 31, 2026. Worth refining the fixed-lump shape. The delegation message and the fresh window are constant, but most subagent types also receive your whole CLAUDE.md hierarchy before they start, and that part scales with whatever your instruction files have grown to. Explore and Plan skip it, which Anthropic’s subagent documentation records as fixed, with no setting attached. So the lump has a component you control, and the budgeting move is to keep the instruction files lean rather than to spawn fewer agents. Measured on this machine, a general-purpose agent that did no work at all still billed 111,253 tokens for the turn. Which agents read your CLAUDE.md has the method.
Current clarification, November 17, 2026. The July reading above is a measurement from that setup, not a fixed charge for starting a worker. Reported token use is not itself a dollar bill. Current loading depends on the worker type and configuration; custom subagents can omit CLAUDE.md, while forks and resumed agents have different context and cache behavior. Compare the input, output and cache fields before applying that measurement to another setup.
Delegation makes sense when the work is sufficiently independent or would fill the main conversation with output it will not need again. Compare that benefit with briefing, repeated context, the worker’s output and the review it needs. The cost varies with the assignment.
Look for unnecessary context, unnecessary delegation, oversized instructions and avoidable cache misses. Skills can also consume many tokens once invoked, especially if they load long references or run repeated work. Moving text into a skill postpones loading; it does not make that text free.
Start with the usage breakdown for your own session. A long main conversation, a large worker fan-out or long output can each dominate a different task. The useful priority is the one your measurements identify.
One June 2026 wrinkle for the lump shape: Claude Code’s dynamic workflows spawn it in bulk, dozens to hundreds of fresh windows per run, and the ultracode setting does this by default for big tasks. The budgeting detail worth knowing is that a workflow’s intermediate results live in script variables rather than your conversation, so the recurring shape stays flat while the lump shape multiplies out of sight. Same four shapes, new ratio: a workflow-heavy week is a lump-dominated bill, and the watch-the-recurring-shape advice above flips for exactly that week.
Current workflow clarification, November 17, 2026. Script variables can keep intermediate results out of the main conversation, but logs and returned results can still add to it. Workers have their own usage, and matching prefixes may share cached input. Measure both the main conversation and workers; neither a flat context nor a worker-dominated bill is guaranteed.
Budget by the task
A monthly limit and a task budget serve different purposes. Use the available spending controls for the overall ceiling, then decide what each task warrants before starting it.
An enforced spending limit can stop further use; a report or alert may only tell you what has already happened. Check which control your account provides. Neither decides whether a particular task deserves another worker or a longer investigation.
Before a task starts, decide what it is worth and what would count as finished. A small question may need one file; a redesign may need several workers and broader context. A stated budget is guidance, not enforcement. For scripted runs, --max-budget-usd checks estimated API spend, including subagents, but can overshoot, so leave headroom. For team setup, contact Blue Sheen.
For a small bug fix in a known file, begin with that file and a focused question. For a redesign spanning a dozen files, allow time to understand the dependencies. Adjust the scope when the evidence warrants it instead of assuming every task needs the same setup.
Set a review point as well as a budget. If a task keeps expanding, compare the remaining work with its value and decide whether to continue, narrow it or stop. A context limit is not evidence that the work is complete.
Watch the real number
Use the context readout to see how much material is currently in the window. Use /usage and, if useful, a custom status line to track tokens and estimated cost separately. For API-billed work, compare with billing records; included subscription use is not a per-turn invoice.
Since I wrote this, the token math itself shifted on the newer models. Anthropic’s Opus 4.7 update changed the tokenizer, so the same input now maps to roughly 1.0 to 1.35x more tokens than before, depending on the content. The four shapes are unchanged. The count per input is not, which means a window that read as comfortable on an older model can read fuller on a current one for the exact same files. Watch the readout, not your memory of what a given file used to cost.
Scope note, November 17, 2026. That 1.0 to 1.35x range comes from Anthropic’s April 16, 2026 comparison of Opus 4.6 and 4.7. It is not a multiplier for every later model. Measure the tokenizer and model you actually use.
Glance at context and usage during longer work. A rapid increase can tell you that a large file or output entered the conversation. Consider /compact when the task continues and /clear when the next task is unrelated, while preserving the instructions and evidence you still need.
Compare a few successive readings to spot large additions. A jump in context shows what the next request may carry; the usage and cache fields show what was processed and how it was counted. Context growth alone does not tell you the dollar cost.
Compact when a shorter summary will help you continue the same task. Summaries can omit detail, so save decisions and evidence you must retain. Clear when you want a fresh conversation for unrelated work. Check that anything needed for the next task is available in files or its new brief.
Automatic compaction helps a long session continue. Manual compaction also uses tokens to read the conversation and write a summary, and it changes the conversation’s cached prefix. It can be worthwhile at a natural break, but it is not free. /clear itself does not make a model request; the next task still has startup context.
Which habits can reduce unnecessary use?
These habits help when they preserve the context and checks the task actually needs.
Load narrow. Start with the relevant file or function and read more when the question requires it. Keep enough surrounding code to understand dependencies and verify the result.
Clear context between unrelated tasks after saving the work and any decisions you will need again. This avoids carrying irrelevant history forward, but it is not always the largest saving: check the usage of your own session.
Delegate deliberately. A noisy, independent side task can be a good use of a worker, when only its results need to return. For a small question already supported by the main conversation, briefing another worker may add unnecessary work. Measure the complete cost rather than assigning every worker a fixed charge.
Put always-needed project guidance in CLAUDE.md and procedures needed only for some tasks in skills. They have different loading behavior. A skill can avoid loading its full instructions until invoked; once loaded, those instructions use context on later turns too. Neither mechanism means you pay for the words only once forever.
Check cache behavior before changing your working habits. Claude Code handles caching automatically, and current defaults depend on the request and billing mode. Main conversations within a Claude plan’s included usage use a one-hour cache lifetime; API-key, cloud-provider and usage-credit requests default to five minutes. A twenty-minute break therefore does not always expire the cache. Inspect /usage rather than rushing to keep a timer alive.
Keep the work that improves the answer and remove repeated work that does not. Use the measurements to tell the difference.



