DEV Community

Cover image for Your Claude Code cost tracker is probably lying to you
Beannation
Beannation

Posted on • Originally published at wtclaude.com

Your Claude Code cost tracker is probably lying to you

Most Claude Code trackers read your session logs. Those logs don't carry billing-grade cost — so the number you trust is drifting from the number you're billed. Here's why, and how to see your real one.

The thing that bugged me

If you use Claude Code seriously, you've probably installed a usage tracker. You glance at the total, nod, move on. I did that for weeks — until the total stopped matching what I was actually being billed. Not by a rounding error. By a lot.

So I went looking for why.

Where the trackers get their numbers

Claude Code writes session data to local log files (JSONL). It's tempting to treat those logs as the source of truth — they're right there, they have token counts, they're easy to parse. Almost every tracker does exactly this.

The problem: those logs don't carry billing-grade cost. Token counts in a log are not the same thing as the cost on your bill. Pricing has tiers, cache reads and writes are priced differently, and there are cost components a token-times-a-rate estimate simply doesn't capture. A log-based tracker has to reconstruct your cost, and a reconstruction is an estimate. A good one gets close. Many don't. And none can promise they match your bill, because they're not reading the thing your bill is computed from.

Where your bill actually comes from

Claude Code surfaces a statusline — and the cost in that statusline is computed from the same source behind your bill. If you read that, you're not reconstructing anything. You're reporting the real number.

That's the entire idea behind WTClaude. Instead of parsing logs, it reads the statusline. So wtclaude today, wtclaude week, and wtclaude month are billing-grade for Claude Code in your terminal — not an estimate dressed up as a fact.

(Worth being precise: billing-grade applies to Claude Code in the terminal. The desktop app, Cowork, and Chat don't expose the same source locally, so for those WTClaude is honest and calls its numbers estimates. We label every number for exactly what it is — that labeling is kind of the whole point.)

See your own gap in one command

The most useful thing WTClaude does takes ten seconds:

wtclaude compare

It shows your real, billing-grade number next to the number a log-based tracker would show you — and the gap between them. I'm not going to quote you a multiple, because the gap depends on how you use Claude Code. For some people it's small. For some it's not. The point is you get to see yours instead of trusting that an estimate is close.

Try it

It's free, open source (MIT), and runs locally by default — nothing leaves your machine unless you turn on sync. It's an independent project, not affiliated with Anthropic.

npx wtclaude setup

Then run wtclaude compare and — if you're up for it — tell me where your gap landed. I've been collecting them and the spread is wild.

Top comments (0)