You are paying for invisible waste — right now.

Your Claude Code quota doesn't evaporate evenly.
Find the turns that burn it.

quota-autopsy reads your local session transcripts and shows you, call by call: where the tokens went, which calls wasted them, and the config changes that stop it. Local-only. Zero dependencies. Free overview.

$ npx quota-autopsy
$ npx quota-autopsy

  Range 2026-09-07 → 2026-09-12 · 46 sessions · 1162 API calls

  TOTAL  276.58M tokens   ≈ $187.80
  ├─ input           4.20M      $21.01   fresh tokens (full price)
  ├─ output          1.25M      $31.23   generated tokens (full price)
  ├─ cache write         0       $0.00   1.25x–2x price
  └─ cache read    271.13M     $135.56   0.1x price · saved ≈ $1220.07

  Waste signals (all sessions)
  ⚠ 4 warm contexts re-sent uncached             ≈ $3.39
  ⚠ repeated file reads                          ~477.9k tokens ≈ $2.39
  ⚠ oversized tool outputs                       ~937.4k tokens ≈ $4.69

  Estimated avoidable spend: ≈ $10.47
  → details + fixes per session with Pro

Real run: 46 sessions, 1,162 API calls (author's own data) — tool output stays in English

0
dependencies
3,600
duplicate rows collapsed in one real corpus
100%
local — nothing leaves your machine
$10.47
avoidable spend found in a 46-session run

Quota burns in spikes, not in averages

Anthropic publicly acknowledged users hitting Claude Code limits "way faster than expected" (Mar 2026). The community found the mechanisms: cache prefixes corrupted by context edits, TTL downgrades from 1h to 5m past the quota boundary, resumed sessions re-billing whole contexts uncached.

"One of our agents busted cache and did not notice. By the time we noticed, we went from 0% to 70% in three or four turns." — from the public issue threads

Counters tell you how much you burned. quota-autopsy tells you exactly where, why, and what to change — from the same transcripts your local Claude Code already writes.

The price of a context

fresh input1.0×
cache write1.25×
cache read0.1×
A cache-bust costs 12.5× a cache-hit.

Your pains — and the findings behind them

Five patterns that cost real quota. quota-autopsy detects every one of them automatically.

🔥

“My quota dies faster than my output explains.”

Every burned call sits in your transcripts. quota-autopsy finds the exact turn — timestamp, tokens, dollars.

🧊

“Resuming a session re-bills the whole context.”

Cold starts get flagged: 610k tokens re-sent after 15h idle = $3.08. Batch your sessions instead.

📦

“Some tool output keeps bloating every later turn.”

Finds every 40k+ char dump — and the context tokens it permanently costs.

🪞

“Session splits double-count my costs.”

Dedupe by message.id — 3,600 duplicated rows collapsed. Numbers you can trust.

🔒

“I won't hand my chat data to another service.”

Runs 100% local. The only network call in the entire tool is the one-time license check.

What it finds

forensics

Cache re-creates

The cached prefix rewritten while still fresh — full context paid at 1.25–2x instead of 0.1x. Shows the exact turn, gap, and dollars.

forensics

Warm re-sends

Calls that read zero from cache seconds after a full-context call. Two back-to-back full-context bills is the most expensive pattern in agent work.

forensics

TTL downgrades

Watches cache writes shift 1h → 5m mid-session — the documented post-quota penalty that compounds future burn.

hygiene

Repeated reads & giant outputs

Files read 3+ times, 600KB terminal dumps and screenshots that re-inflate your context on every later turn.

hygiene

Paid errors, bloat, subagents

Throttled calls that still billed, 150k+ contexts, sidechain spend — each with a concrete fix.

correctness

Splits counted once

Continued/forked sessions copy whole histories. Same API call = same charge — 3,600 duplicate rows collapsed in our own dogfooding corpus.

The moment you see it

😰

11:47 PM. Quota at 70%.

All you did today was refactor. The numbers don't add up — and you can feel it.

🔍

0.4 seconds later

$3.08
avoidable per year

One finding: 610.5k tokens re-sent after a 15h idle gap. Right there. Visible.

😌

One line changed

From tomorrow on, that $3.08 no longer exists. Sleep better.

From totals to a per-call autopsy

The free overview shows you the size of the problem. Pro shows you exactly where it is:

  • Every finding with the exact turn, timestamps and dollar estimate
  • A fix for each pattern — what to change, and why it helps
  • The session's most expensive calls, ranked
  • Markdown + HTML exports for your team or your notes

What a Pro report looks like (real output)

$ quota-autopsy show 50f4d9 (Pro)

  2026-09-12 · 151.31M tokens · ≈ $91.91 · cache hit 99.0%

  [MED]  1 oversized tool output ≈ $0.36 ~72.8k tokens
         • Read …/Screenshot 2026-09-09.png — 269k chars
         fix: trim at the source — pipe through head/tail/grep,
         paginate listings, ask for a summary instead of raw dumps

  [INFO] 2 cold starts after idle (normal)
         • 09-11 17:52 re-sent 610.5k fresh tokens after 15h 31m
         • 09-11 01:31 re-sent 552.0k fresh tokens after 26h 42m

  Most expensive calls
    1. 09-11 17:52   input 610.5k   $3.08
    2. 09-11 01:31   input 552.0k   $2.79

How much are you burning?

Slide to your situation — the estimate uses the share found in our real 46-session corpus.

avoidable per year
≈ $672
per session
≈ $2.31
quota-autopsy Pro costs $24 — once

Estimate, not a promise — but every percent is real money.

How it works

Reads locally

Streams ~/.claude/projects/**/*.jsonl — 46 sessions (99 MB) in 0.42 s. No network, no telemetry, no account.

Reconstructs the spending

Per-call token buckets, cache behavior, tool outputs, sidechains — priced with a table you can edit for any provider or router.

Reports with fixes

Terminal overview, per-session autopsy, Markdown/HTML export for the team, JSON for your own tooling.

quota-autopsy vs. the rest

Counters tell you how much. Only quota-autopsy tells you where and why — and what to change.

quota-autopsy/costccusage
Call-by-call: where & why
Fixes per finding
Cache timeline (TTL, re-creates)
Report export (Markdown/HTML)
Data sourcelocal transcriptslocal sessionAnthropic API
PriceFree · Pro $24freefree

Pricing

One-time. No subscription. Local license check with 30-day offline grace. macOS · Windows · Linux.

Free

$0
  • Full overview: totals, cost breakdown
  • Per-model and top-session breakdown
  • Aggregate waste signals
  • Works with any local transcripts dir

Pro lifetime

$24
  • The autopsy: per-session findings with events, timings, dollars
  • The fixes: concrete recommendations per finding
  • Full session list + unlimited history
  • Markdown & HTML report export
  • Future detectors for the same license
Get lifetime access

Pays for itself the moment you remove one found waste — and the overview is free anyway.

FAQ

Does my data leave my machine?

No. The tool reads local transcript files and writes only its own config under ~/.quota-autopsy/. The single network call it can make is the license check against Gumroad when you activate Pro — nothing else, and no telemetry.

Which platforms does it run on?

macOS, Windows and Linux — anything with Node 18+. It reads whatever Claude Code transcript directory exists on your OS.

I run Claude Code with a non-Anthropic model / router. Does it work?

Yes. Costs come from an editable pricing table (~/.quota-autopsy/pricing.json, see examples/). Detectors work on any model name.

How accurate is it?

Token counts are exact (deduplicated by API response id — streaming partials and session-split copies counted once). Dollar figures are estimates from a published price table, shown as “≈”, and cross-checked against Claude Code's own cost-state rows when present. An independent second implementation in tools/verify.py recomputes every metric in the test suite.

Can I use my license on several machines?

Yes. Activation doesn't consume uses — install and activate everywhere you work. The check re-verifies locally with a 30-day offline grace.

Isn't this just ccusage / /cost?

Counters answer “how much?”. This answers “where did it go, why, and what do I change?” — per-call forensics with fixes, not a counter.

What if something looks wrong?

Report it — a mislabeled pattern is a bug. Refunds are handled through Gumroad, but most issues are fixed in the next release, and updates are free with your license.

Get new detectors first

One email when a new detector ships. No spam, unsubscribe any time.

Collected via Netlify Forms — no third-party tracking.

Pro — $24 · lifetime Buy now