Stacked on #184 (the spool). The CLI now works out what an agent spent since its previous scrobble, as plan/token-burn.md specifies. A Claude Code reader counts the bytes past a per-file cursor and dedupes by (message.id, requestId), keeping each key's largest total, including across a window boundary. It skips <synthetic> lines, counts iterations[] under their own models, and claims finished subagents' tails as delegated. The sums are per type and per model. The plugin leaves <DID>.transcript, seeds a cursor at SessionStart and SubagentStart so copied history is never counted, and marks a subagent's file finished at SubagentStop. The drainer seals the window into the spooled entry before it publishes, so a crash or replay never counts a byte twice. vibescrobble usage prints what the next post would carry. --no-usage, VIBESCROBBLE_USAGE=off and git config vibescrobble.usage off switch it off.
Nothing reaches production records. PRODUCTION_USAGE (crates/vibescrobble-cli/src/usage/mod.rs:35) is false, so usage is written only with VIBESCROBBLE_DEV_USAGE=1 to a loopback, localhost or *.test PDS. Flipping it to true turns production writes on, once the lexicon (#223) is approved. Scanning a real 128 MiB transcript takes about 0.08 s. Below is a real Claude Code transcript counted and posted to a local reference PDS.
| before | after |
|---|---|
🤖 Generated with Claude Code