Spend · Claude Code usage

Claude Code usage

See exactly what your Claude Code sessions cost, and where to spend less without losing speed. Per-session token spend rolled up from the local Claude Code journal, with a heuristic plus LLM recommendation for what to switch.

Start here if you want to know what every Claude Code session cost across your tracked repos: Telemetry.

See it in motion

Where to find it

  • Localhost: /claude-code-usage.html?repo=<id>
  • API: GET /api/cc-usage?repo=<id> (add &sinceDays=<n>, default 30, up to 90)
  • Keyboard: ⌘ K then type usage
  • Navigation: LLM Cost Metrics in the sidebar, then Claude Code usage under All tools, in the Billing guard and provider usage group

What it does for you

Per-session cost, no spreadsheets.Each row is one session: the model it ran on, turns, tokens in, tokens out, cache, cost in USD, and the capture source. The table holds the 20 most recent sessions of the last 30 days, and every column sorts those 20: rank them by cost to find the expensive run, or by tokens-out to find the runaway loop.
See what another model would have cost.A cost-compare table shows what your same 30-day token totals would have cost run end to end on each of three current models (Opus, Sonnet, Haiku), so you can spot where Sonnet or Haiku would have been enough. Heuristic recommendations and an optional Claude analysis, both on the Today tab, name the specific prompts to move and hand you a fix prompt to copy.
The rec lands as a PR, not a dashboard toggle.When a recommendation is worth applying repo-wide, the routing control tab opens a PR against the repo's .claude/brain/llm-routing.json with the change.

Configure

Nothing. The transcript scan reads ~/.claude/projects/<encoded-cwd>/<session-id>.jsonl on the developer's machine and writes a per-day store under the repo's .claude/brain/claude-code-usage/, which this tab reads. The OTEL receiver and the Claude Code Stop hook are the other two capture paths into the same store.

Use it well

Open this tab on Monday morning and sort by cost. The cost-per-session distribution is usually a long tail of small queries plus a few expensive long-context runs. The expensive ones are where switching models moves the bill.

Read more

Last updated