AI Coding Spend, Metered Locally in 2026: Codeburn and the Token-Observability Wave

Local AI-spend meters like Codeburn (npx codeburn) read your on-disk session files to break token usage and cost down across Claude Code, Codex, Cursor, Copilot and 31 tools - no proxy, no API keys. What they do well, and where you cross from personal observability into team usage-based billing.

8 min read

AI coding spendCodeburntoken observabilityusage-based billingcost tracking

TL;DR (June 2026): The June 1 move of GitHub Copilot to usage-based billing kicked off a wave of local AI-spend meters - tools that read the session files your coding agents already write to disk and break spend down by tool, model, and project, with nothing leaving your machine. Codeburn is the breakout: npx codeburn, 31 tools supported, live pricing, MIT-licensed. They are excellent for personal observability. They are not billing - the moment more than one person, customer, or cost-center is involved, you need usage-based billing, not just a dashboard.

Why local AI-spend meters appeared overnight

When AI coding was a flat $10 or $20 a month, nobody needed to watch the meter. That changed on June 1, 2026, when Copilot switched to token-metered AI Credits and developers started reporting bills jumping from $29 to $750 in a month. Cursor, Claude Code, and Codex had already moved spend onto per-token economics. Suddenly "where did my tokens go?" became a real question, and a category of tools showed up to answer it locally.

What Codeburn actually does

Codeburn is the one people are installing. It reads the session files that Claude Code, Codex, Cursor, Copilot, OpenCode and 25+ other tools already write to disk, then breaks every token and dollar down by task, model, tool, and project. The design choices are the selling point:

  • Nothing leaves your machine. No proxy, no wrapper, no API keys - it parses local session files, so there is zero data-exfiltration risk.
  • Zero-friction install. npx codeburn (or bunx, or brew install codeburn) opens an interactive terminal dashboard, last 7 days by default.
  • Live pricing. It pulls current model rates from LiteLLM, so the dollar figures track real API rates instead of stale hardcoded numbers.
  • An optimizer. codeburn optimize scans your sessions and ~/.claude/ setup for waste - low cache-hit rates, unused MCP servers, bloated context files - and prints copy-paste fixes with estimated savings.
  • One-shot success tracking. It surfaces the gap between tasks the agent nails first try and tasks where it burns tokens cycling edit/test/fix.

It is fully open source under MIT. As one developer put it after it launched, "you watch the money burn in real time." That visceral feedback loop is exactly why these tools spread.

Where local meters stop being enough

A local dashboard answers one question well: where did MY tokens go this week? That is personal observability, and for a solo developer it may be all you need. But it has hard limits the moment your AI spend stops being personal:

  • It lives on one laptop. Session files on your disk do not roll up across a team. There is no shared view of what the whole org spent.
  • It cannot bill anyone. Reading your own spend is not the same as attributing cost to a customer, a project, or a cost-center and turning it into an invoice line.
  • It is reactive. A dashboard shows you the burn after it happened. It does not enforce a spend cap before a runaway agent loop produces a four-figure bill.

This is the line between observability (what did I spend?) and billing (who owes what, and how do I stop overruns?). Codeburn and its peers own the first. The second is a different problem.

Where UsageBox fits: a local meter is the right tool when the spender and the payer are the same person. UsageBox is for when they are not - metering usage-based AI spend per customer, per project, and per model across a team, enforcing real-time spend caps before the overrun, and turning that metered usage into billing. Run Codeburn on your own machine to find waste; run UsageBox when that spend has to be attributed, capped, or invoiced.

The takeaway

The local-metering wave is a healthy sign: AI cost is finally something developers can see instead of fear. Install one - Codeburn is the obvious first pick - and run its optimizer to claw back the easy waste. Just know what it is: a personal observability tool, not a billing system. The day your AI spend belongs to a team, a customer, or a budget you are accountable for, you have crossed from "watch the meter" into "meter, cap, and bill," and that is a different stack.

Key Topics

  • AI coding spend
  • Codeburn
  • token observability
  • usage-based billing
  • cost tracking

Related Articles

Explore more articles on similar topics to deepen your understanding of usage-based billing.

Tracking GitHub Copilot AI Credits in 2026: The Usage API and What It Still Hides

GitHub Copilot bills in AI Credits (1 credit = $0.01) since June 1, 2026, and the June 19 usage metrics API added ai_cre...

8 min readRead more

The AI Cost Tooling Stack in 2026: Local Meters, Gateway Dashboards, Vendor APIs, and Billing

After AI coding went metered (Cursor caps, Copilot AI Credits), cost tooling appeared at four layers: local meters (Code...

8 min readRead more

Prompt Caching Is Quietly Breaking Your AI Cost Tracking (Cache Reads vs Writes, and the Numbers That Lie)

Prompt caching is the best per-call cost lever in 2026 - up to 90% off repeated context, stackable with batch discounts ...

6 min readRead more

Explore More Articles

Discover our complete collection of usage-based billing guides and implementation patterns.

View all articles