The Quota audit for Claude Code
One command reads the logs Claude Code already keeps on your machine and tells you, in dollars, where your last 7 days of usage went and how much of it was avoidable.
Run npx quotaplug audit in any terminal where you use Claude Code. In about 15 seconds it reads your local session logs, prices every request at API list rates, and shows how much went to re-reading long conversations, to subagents, and to the expensive model. It then replays the week with leaner rules. No account, and nothing leaves your machine.
npx quotaplug auditWhat the audit shows you
- Your real spend, in API dollars. Your plan is not billed in dollars, but your limits drain on the same drivers. Pricing every request at list price is the clearest way to see which habits cost the most.
- Re-read context. How much of the week went to sending the same conversation history again on every step, split by context size: under 100k, 100k to 400k, over 400k tokens.
- Subagents. How many you ran, what share of spend they took, and how many ran on Opus.
- Oversized tool output. Build logs, test runs and file reads big enough to be re-read for the rest of the conversation.
- Your heaviest conversations and projects, with peak context size, so you know exactly where to look.
- The replay. The same week, request by request, with an earlier compaction window and cheaper subagents. The result is a multiplier: how much longer your plan would have lasted.
What we found on our own logs
QuotaPlug started as the fix for our own bill. On our heaviest week of November 2026, the audit priced the week at $3,936 of API-equivalent usage, with 62% of it spent re-reading conversations above 400k tokens. The replay with the public rules came to $1,837: 2.1 times less. On a week dominated by subagents, 68% of spend came from 195 agents, 40% of them on Opus.
A week after we applied the rules by hand, the audit found only 1.34x left to gain. That is the point: the audit tells you honestly when you are already lean.
How it works
- It lists the session logs Claude Code writes under
~/.claude/projects(orCLAUDE_CONFIG_DIR) for the last 7 days, including subagent logs. - It reads the token counts Claude Code records on every request (input, cache read, cache write, output), and removes duplicates by request id.
- It prices each request at the model's public API rate.
- It replays each conversation as if it had been compacted earlier and its subagents had run on a cheaper model, and compares.
The full method, with its assumptions and what it does not count, is in how savings are measured.
Privacy
The audit runs entirely on your computer. It does not need an account, it does not upload anything, and it never reads the text of your prompts or code for analysis: only the usage numbers Claude Code stores next to each request. You can run it offline.
Options
npx quotaplug audit --days 14looks further back (up to 30 days, as far as your logs go).npx quotaplug audit --jsonprints raw numbers for your own scripts.
When the audit says you can save a lot
You have two options. Apply the fixes by hand with our guide to reducing Claude Code token usage. Or let QuotaPlug apply them and keep them applied: npx quotaplug login connects this computer to your subscription. Subscribe first at quotaplug.com/signup (7-day money-back guarantee).