DEV Community

Cover image for agentroi: are your AI coding subscriptions paying off?
kt
kt

Posted on

agentroi: are your AI coding subscriptions paying off?

I pay a monthly fee for Claude and wanted to know if it was a good deal. The usage trackers I tried answered a different question: how many tokens I burned, and what they would have cost on the API. What I wanted was that number divided by the fee, per subscription, so I wrote agentroi.

$ agentroi
  API value $640/mo  ÷  you pay $130/mo   → 4.92x  well worth it

SUBSCRIPTIONS
  subscription      plan          fee/mo  API value/mo  return
  Claude            Max 5x          $100          $547   5.47x 547% ████████████████
  ChatGPT (Codex)   Plus (auto)      $20           $67   3.33x 333% ██████████
  GitHub Copilot    Pro              $10           $26   2.62x 262% ████████
    ↳ credits are billed at API rates since 2026-06: value past the included credits is overage on your bill, not a bonus
Enter fullscreen mode Exit fullscreen mode

agentroi on made-up logs: the API value of a month, then the return with plans set, then the Japanese report

The output and the demo above run on made-up logs from the repo's tools/demodata.

What it reads

Everything comes from files the agents already write: Claude Code's JSONL under ~/.claude/projects, Codex sessions, Gemini CLI and Qwen Code chats, Copilot CLI events, opencode's, Goose's and ZCode's SQLite, Cline, Roo and Kilo task files in VS Code-family editors, Kimi Code, Antigravity, Grok Build, Factory Droid and Aider, 16 in all. Every request is priced from a snapshot of LiteLLM's price table. There is no telemetry, and the only network call is agentroi prices update, which refreshes that snapshot.

Codex writes your ChatGPT plan into its session logs (plan_type), so Codex needs no setup unless you are on Pro $200 or $500 (plain pro is read as the $100 tier). For the rest:

agentroi set claude=max-5x chatgpt=plus   # remembered
agentroi --plan claude=ultra              # what if, this run only
agentroi --month last --detail
Enter fullscreen mode Exit fullscreen mode

Cache decides the number

In my own Claude Code logs, almost every input token is a cache read. Uncached input is a rounding error, and the value splits between cache reads, cache writes and output. So the result rests on two prices: the cache read rate, and whether a cache write was billed at the 5-minute or the 1-hour rate. Claude Code logs both, and on Opus 5.5 the 1-hour write costs 60% more. agentroi prices them separately, along with the long-context tiers, fast mode and the 1.1x US-only inference surcharge.

Not every plan has a multiple

Subscriptions bill in three ways, and the return means something different in each:

Billing Subscriptions What the return means
Quota Claude, ChatGPT, Google AI, Grok, Factory, opencode Go, Qwen, Kimi, Z.ai the deal you get; several times over is normal for heavy use
Credits at API rates GitHub Copilot, since 2026-06-01 about 1x by design
Your own API key Cline, Roo Code, Kilo Code, Goose, Aider nothing to divide by; the API value is your actual spend

Since June, Copilot spends its AI credits at API prices, so anything past the included credits is overage on your bill. The 2.62x in the example above is not a deal: whatever went past the included credits shows up on your bill. When a Copilot plan is set, agentroi prints that note under the row.

opencode can send a request through its own plans, through Copilot, or through your key, ZCode through Z.ai's plan or your key, and Cline can hand requests to Claude Code. agentroi counts each request once, under the subscription that paid for it.

A big multiple can still mean the wrong plan

5.47x on Max 5x says the plan beats the API. It does not say whether Pro would have been enough. That depends on the usage limits, not on the tokens, so agentroi reads those too. Codex writes its 5-hour and weekly usage into the session logs. Claude Code passes its limits only to the status line command, so agentroi has a statusline subcommand that records them:

{ "statusLine": { "type": "command", "command": "agentroi statusline" } }
Enter fullscreen mode Exit fullscreen mode

With a weekly reading in the window, the report scales the peak to every Claude plan (Anthropic's pricing page puts Max at 5x Pro's weekly limit and Ultra at 10x):

  Claude      Max 5x    $100    $547   5.47x 547% ████████████████
    ↳ limits used: 5h peak 31%, latest 31% · 7d peak 12%, latest 12%
    ↳ weekly peak since 2026-12-05, on each plan: Pro 60% · Max 5x 12% · Ultra 6%
    → Pro would fit: save $80/mo
Enter fullscreen mode Exit fullscreen mode

That is the same made-up data plus one fake status line reading. A week of readings can miss a heavy week, which is why the line says where they start.

Claude Code also deletes transcripts after 30 days, so every run caches the value of each whole day, and agentroi history shows months side by side after their logs are gone.

Other tools

ccusage and tokscale read 20 or more agents, and splitrail about as many as agentroi (14 to its 16). All three have daily reports and live views, and tokscale has a leaderboard. CodeBurn is the closest: it also takes your plan and shows API-equivalent spend against it, and reads live quota by signing in to each provider with the credentials on your machine, with a menu bar app on top. agentroi takes its limits only from what the agents already hand it locally, and keeps quota, credits and your own key apart.

Try it

brew install --cask kanywst/tap/agentroi
agentroi
Enter fullscreen mode Exit fullscreen mode

Or go install github.com/kanywst/agentroi@latest. Plan prices go stale fast: they live in plans.json with a source URL and a date for each subscription, and a pull request with a newer source is welcome.

Top comments (0)