If you rotate daily across multiple AI coding agents and IDEs — OpenAI Codex, Claude Code, Google Antigravity, Nous Hermes inside WSL2, Cursor, Cline/Roo — plus AIGC video/image tools like Dreamina, figuring out your real token spend and cache efficiency is surprisingly broken.
When I built Agent Usage Radar (zero-dependency Node.js 24 built-in node:sqlite, 74/74 cross-platform regression tests across macOS, Windows, and WSL2) and ran it across my own workstation (Host + WSL:Ubuntu), it surfaced:
- 14.68B+ tokens across 29 detected tool entries
- 91.7% prompt cache hit rate (~$23,527 saved via caching; ~$6,592 verified priced subtotal)
- 95,700+ logged AIGC credits across 1,550 Dreamina tasks (kept strictly separate from token spend)
Here are the four engineering pitfalls that broke naive token trackers along the way:
1. Inclusive vs. disjoint cache token double-counting
OpenAI Codex's input_tokens includes cached_input_tokens, whereas Anthropic, Antigravity, and Hermes report cache reads as a separate disjoint bucket. Adding them blindly double-counts cache reads and silently inflates cost reports.
2. Copying live SQLite WAL/SHM files across Windows + WSL2
Copying active SQLite database files mid-write across Windows and WSL2 9P filesystems triggers SQLITE_BUSY or corrupt frames. Agent Usage Radar reads committed WAL snapshots safely without copying databases or blocking live agent writers.
3. Log rotation & pruned aggregate-only threads
Simple MAX() aggregators lose spend whenever rolling JSONL logs rotate, and naive heuristics fabricate fake input/cache/output splits on pruned aggregate threads. Agent Usage Radar uses an identity-keyed SQLite history ledger that preserves rotated-away sessions while keeping unsplit aggregate threads honestly labeled unsplit.
4. Honest Schema 2 pricing + built-in stdio MCP server
npx agent-usage-radar sync-prices pulls effective-dated first-party model rates from kestreldevtools.site/api/model-prices.json, switches promotional rates on their exact UTC effective dates, and leaves unverified SKUs explicitly unpriced rather than guessing.
It also ships a zero-dependency stdio MCP server (npx agent-usage-radar mcp) so your coding agents can inspect their own daily spend and budget.
Try It in 1 Command (Zero Telemetry, Zero Cloud Upload)
# Forever-free MIT CLI summary (macOS, Windows, Linux, WSL2) npx agent-usage-radar scan # Local loopback bilingual GUI (127.0.0.1, 14-day free Pro trial, no credit card) npx agent-usage-radar ui # Sync daily Schema 2 model rates npx agent-usage-radar sync-prices # Expose spend & budget tools over stdio MCP npx agent-usage-radar mcp - GitHub (MIT core + v1.0.1 Release): https://github.com/augustfu-droid/agent-usage-radar
- npm: https://www.npmjs.com/package/agent-usage-radar
- Live Benchmark & Early-Bird Pro Buyout ($14.90, 3 devices): https://kestreldevtools.site/radar.html (Creem Checkout)
What other agent log formats or local IDE trackers should we add adapters for next? Drop them in the comments!

