Verified against Claude Code · 2026-07-24
Audit where a Claude Code session's cost actually went before setting a budget
A usage-audit prompt that breaks down a session's actual token and cost data by category — context reads, tool-result bloat, repeated file access — before proposing a concrete reduction lever and a going-forward budget, instead of guessing at savings from vague impressions of the session.
The prompt
Ready to copy — highlighted parts are example details you can swap.
You are auditing where the cost in this usage data actually went, not estimating it from a general impression of how the session felt. A specific breakdown by category is the only thing that makes a proposed reduction lever trustworthy rather than a guess dressed as an optimization. USAGE DATA Session used 340K input tokens, 12K output tokens, cost $4.85; 210K of the input tokens came from tool results, largely repeated reads of a single 8,000-line generated file across 11 separate turns. WHAT KIND OF TASK THIS SESSION WAS DOING A multi-file refactor across the reports module, run interactively over about ninety minutes. CURRENT BUDGET TARGET, IF ONE EXISTS No formal budget exists yet; sessions like this have informally run $2 to $3 in the past. WHERE THE COST IS SUSPECTED TO BE CONCENTRATED Suspect the large generated report fixture file is being re-read on every turn instead of once. HOW OFTEN THIS KIND OF SESSION RUNS This kind of refactor session runs a handful of times a month, not daily. ANALYSIS 1. Break down the usage data into distinct categories: initial context load, tool-result content returned to the model (file reads, command output, search results), the model's own generated output, and any cache-read versus cache-write split if the data distinguishes them. State the actual token count and cost share per category, not just a total. 2. For the largest category, identify the specific mechanism driving it — a single large file read repeatedly across many turns instead of once, a search tool returning far more matched content than was actually needed, a subagent's full internal output getting summarized inefficiently rather than distilled — and cite the specific turn or tool call in the data where this is visible, not a general statement that 'context use was high.' 3. Check Suspect the large generated report fixture file is being re-read on every turn instead of once. against what the data actually shows — confirm or rule out each one specifically rather than assuming the suspicion was correct just because it was already flagged going in. 4. Propose one or two concrete, specific reduction levers tied directly to the mechanism identified in step two — narrowing a glob pattern, moving a noisy verification step into an isolated subagent, caching a repeatedly-read file's content instead of re-reading it, reducing an overly broad search's result count — not a generic suggestion to 'be more concise' that does not name what would actually change. 5. State what cost or token reduction each lever would plausibly achieve, and how confident that estimate is, given the actual data available. BUDGET Given No formal budget exists yet; sessions like this have informally run $2 to $3 in the past. and This kind of refactor session runs a handful of times a month, not daily., propose a specific per-session budget or token ceiling going forward, and one clear signal that should trigger a review if that budget is exceeded — not a vague aspiration to spend less, a number and a trigger condition. CONSTRAINTS - Do not propose a reduction lever that would degrade the actual task outcome for A multi-file refactor across the reports module, run interactively over about ninety minutes. without naming that tradeoff explicitly — a cheaper session that produces a worse result is not automatically the better outcome. - If the data does not actually support attributing cost to a specific mechanism, say so rather than assigning a plausible-sounding cause to a category just because the total for it was large. OUTPUT The category breakdown, the root-mechanism findings, the proposed levers with estimated impact, and the going-forward budget with its trigger condition.
Customize
Optional — swap in your own details for the highlighted parts above.
Why this works
A general impression of a session feeling expensive is not the same evidence as a category breakdown of where the tokens actually went, and the two produce very different recommendations — 'this session was slow and pricey' invites a vague instruction to be more efficient next time, while a breakdown showing that 210,000 of 340,000 input tokens came from re-reading one file eleven times invites a specific, checkable fix: read it once and hold it in context, or delegate repeated inspection of it to a subagent whose output gets distilled before returning. Requiring the mechanism behind the largest cost category to be cited at a specific turn or tool call, rather than described generally, matters because 'context use was high' is true of nearly every expensive session and explains nothing actionable, whereas 'this specific file was read on turns 3, 7, 9, and 14 with no change to it in between' is a claim a reviewer can verify against the same data and a fix a reviewer can confirm actually addresses. Checking the stated high-cost suspicion against the data rather than assuming it was correct matters because intuition about where cost concentrates in a long agentic session is frequently wrong — the more memorable, attention-grabbing parts of a session, such as a large tool call whose result scrolled past visibly, are not reliably the same as the parts actually consuming the most tokens in aggregate, and a review that confirms the suspicion by default rather than checking it risks fixing the wrong thing while the actual driver goes untouched. Requiring the tradeoff of a proposed reduction lever to be stated explicitly targets a real risk specific to cost optimization: the cheapest way to reduce token usage is very often to do less verification, read less context, or search less thoroughly, and every one of those levers has a real chance of degrading the actual task outcome, so a recommendation that only reports the savings and never the cost to quality is an incomplete recommendation dressed as a complete one. Tying the proposed budget to actual session frequency, rather than proposing a number in isolation, matters because the same per-session cost is a rounding error for something run twice a year and a real recurring expense for something run daily, and a budget that does not account for frequency has no way to say which situation this actually is.
Verified against
Claude Code Sonnet 4.6 · 2026-07-24
Changelog
- 2026-07-24 — Initial publish, verified against Claude Code usage/cost reporting (Sonnet 4.6).
Building this for real?
This is a free starting point. If you'd rather have custom software built and running for your business, that's Scult's day job.
EXPLORE CUSTOM SOFTWARE
