Token telemetry
Know what each task cost. token-telemetry records every turn's and every sub-agent's tokens, and Marvin's reports turn them into cost per issue. It is an optional companion plugin and requires token-telemetry 0.16 or later.
How it works
1 · Capture
Stop and SubagentStop hooks read the session transcript after each turn. Zero model tokens: nothing runs inside the model loop.
2 · Store
A local SQLite database, ~/.claude/telemetry/usage.db. A copy in the project folder, or a Supabase backend, is optional.
3 · Read
The dashboard, /token-telemetry:token-stats, and Marvin's reports, each priced at the rate in force when the tokens were spent.
Install
claude plugin install token-telemetry@emprove
Restart Claude Code afterwards: the capture hooks load at session start, and a session before the restart records nothing. Then opt the project in:
/token-telemetry:enable
It writes a .claude/telemetry marker. Commit it and the whole team records. /token-telemetry:info says whether capture is running.
Everyday use
/token-telemetry:dashboardopens a local, read-only dashboard in your browser: filter by period, model, agent and project./token-telemetry:token-statsprints totals and breakdowns by model, agent, tier, milestone and issue./token-telemetry:project-statsshows one row per project, all time./token-telemetry:pricing-updaterefreshes the rates from Anthropic's published pricing.
In Marvin
- The
telemetrysetting records whether this project is opted in. - While a task runs, Marvin names its issue in a small sidecar file, so each event is stamped with that issue.
- Reports and stats snapshots show cost per issue, per tier and per milestone.
- Escalation's cost signal reads the same figures (Escalation).
The seam, cited not restated: token-economics.md.
Where it's absent
- No telemetry database: reports leave cost out, quietly. Nothing fails.
- A zero is never $0: a scope that matches no tokens is flagged as a scope to check, never shown as free.
Kept current by plugin_autoupdate, like Marvin itself.