I pay a flat monthly price for Claude Code. Some weeks I run agents all day; some weeks I barely open it. I had no idea whether the plan was saving me money compared with paying per token, and nothing in either the Anthropic or OpenAI dashboards answers that directly.
The data to answer it is already on your machine. Claude Code keeps a log of every response in ~/.claude/projects, and Codex keeps its sessions in ~/.codex/sessions. Each entry has the model and the token counts. So I wrote a small check that reads those logs, prices them at API rates, and compares the total with your plan.
curl -fsSL https://ganivra.com/check.sh | sh It asks which plan you're on the first time, remembers it, and prints something like this (illustrative output, not my numbers):
Claude Code · last 30 days · 22 active days Usage at API prices $1,842.17 claude-opus-5-5 $1,610.40 61.2M input · 2.1B cache reads · 4.8M output claude-sonnet-5-5 $231.77 9.4M input · 310.2M cache reads · 1.1M output Busiest 5 hours $96.10 from Tue 18 Nov 14:00 Your plan Claude Ultra, $200 a month → Your plan covered 9.2x its price in usage. Keep it. Codex · last 30 days · 6 active days Usage at API prices $41.08 gpt-6-astra $41.08 2.3M input · 18.0M cache reads · 410.2k output Your plan ChatGPT Business seat, $25 a month → About break-even: $41.08 a month at API prices against $25. Top projects: checkout-api $1,204.90 · mobile-app $310.15 · other $368.20 Nothing was sent anywhere. How it decides
It divides your month of usage at API prices by your plan's price:
| Usage ÷ plan price | Verdict |
|---|---|
| Above 1.5 | The plan covered that many times its price. Keep it. |
| 0.5 to 1.5 | About break-even. |
| Below 0.5 | Paying per token would have cost less. (The plan also covers the chat app, so weigh that too.) |
With fewer than 5 active days it shows the numbers but no verdict. One quiet week shouldn't decide anything.
Things I learned building it
Each response is logged more than once. Claude Code writes the same response to several lines as it streams. Adding them up naively double- or triple-counts. The check keys each response on its message and request ID and keeps the line with the final output count.
Cache reads are most of the tokens. In a long agent session, the bulk of input tokens are cache reads, often billions in a month. They're priced far below normal input, while cache writes cost more than normal input, and 5-minute and 1-hour writes are priced differently. If you price everything as plain input, the total is wildly wrong. The check prices each kind separately, plus fast-mode and long-prompt rates.
Neither vendor publishes the limits behind a plan. Plans reset every 5 hours and every week, but the token limits aren't public. So the check can't honestly say "you'd have been fine on the cheaper plan." Instead it shows your most expensive 5-hour window, which is the best evidence you have for that decision.
Logs don't last forever. Claude Code deletes logs after 30 days unless you've changed cleanupPeriodDays. You can look back up to 90 days with --days 90 if you've kept them.
Codex doesn't record fast mode. Those calls are priced at the standard rate, so Codex totals can be slightly low.
What it reads and what it never does
- It uses token counts, model names, timestamps and the name of each project folder (
checkout-api, never the full path). - It never prints, stores or sends prompts, responses or code.
- The only network request is for the public price list (github.com/ProdMoh/llm-prices).
- Our server counts each download of the script in Google Analytics, so I know how many people run it. That count includes nothing from your machine and no IP address.
Piping curl into sh deserves suspicion, so read it first: check.sh is about 30 lines that download check.py and run it with Python 3, standard library only.
Options
# Skip the question curl -fsSL https://ganivra.com/check.sh | sh -s -- --claude-plan max # Look further back, one tool only, as JSON curl -fsSL https://ganivra.com/check.sh | sh -s -- --days 90 --tool claude --json It runs on macOS and Linux with Python 3.8 or later. No Windows yet.
Try it and tell me your number
I'm curious how wide the spread is. My guess is that most people are either far above 1.5x or well under 0.5x, and very few are near break-even. If you run it, post the verdict line in the comments (no need for the dollar figures), and tell me where it got something wrong.
If you manage a team on Claude Code or Codex seats and want the same view for every developer, every month, that's what I'm building at Ganivra. The check itself is free and stays that way.