Background
Power-user feedback (via Grok): no visibility into per-account / per-orchestrator cost. Users want to know what each session is costing them in the same way they can see rate-limit headroom.
Signal sources
Anthropic returns input/output token counts in response headers. Claude Code already writes per-session JSONLs at ~/.claude-<alias>/projects/<project>/<session>.jsonl containing every message with token metadata. The ~/.claude/rate-limit-events.log already captures session metadata. So the data is there — the dashboard just doesn't surface it.
Two-tier ship
Tier 1 — observation only
- Parse session JSONLs for input/output token counts
- Multiply by Anthropic's published per-model rates
- Add a "Cost today" / "Cost this week" card to each account on the dashboard
- HTTP API:
GET /api/billing returns per-account / per-session breakdown
- MCP tool:
mcp__subctl__billing so agents can self-report cost
Tier 2 — subctl billing CLI
subctl billing — show today + this week aggregated
subctl billing --account <alias> — filter
subctl billing --session <name> — per-orchestrator
subctl billing --csv — exportable
Non-goals
- Cost projection / budgeting alerts (could be v1.6)
- OpenAI pricing for Codex (separate, Tier 1.5 once Codex provider is GA)
Verdict
Should ship in v1.5. Medium effort, high visibility. Sets up budgeting features later.
Background
Power-user feedback (via Grok): no visibility into per-account / per-orchestrator cost. Users want to know what each session is costing them in the same way they can see rate-limit headroom.
Signal sources
Anthropic returns input/output token counts in response headers. Claude Code already writes per-session JSONLs at
~/.claude-<alias>/projects/<project>/<session>.jsonlcontaining every message with token metadata. The~/.claude/rate-limit-events.logalready captures session metadata. So the data is there — the dashboard just doesn't surface it.Two-tier ship
Tier 1 — observation only
GET /api/billingreturns per-account / per-session breakdownmcp__subctl__billingso agents can self-report costTier 2 —
subctl billingCLIsubctl billing— show today + this week aggregatedsubctl billing --account <alias>— filtersubctl billing --session <name>— per-orchestratorsubctl billing --csv— exportableNon-goals
Verdict
Should ship in v1.5. Medium effort, high visibility. Sets up budgeting features later.