Problem
- Usage can spike, but current UX is coarse:
/usage cost is a fixed 30-day summary and /usage only shows per-response footers. Provider quota snapshots do not explain where tokens went.
- The only deeper option today is manual
jq against session logs (skills/session-logs).
Proposal (small, aligned steps)
- Extend the existing session-log aggregator (
src/infra/session-cost-usage.ts) to accept date ranges/--days and emit JSON.
- Expose via CLI:
moltbot usage cost --days N --json --agent all.
- Optional: add per-session/per-model breakdown flags once the core is agreed.
Value
- Concrete diagnostics for token spikes without provider OAuth.
- Works across providers (Claude 4.5 / Gemini 3 Flash / MiniMax 2.1).
- Exportable for budgeting and dashboards.
If this direction makes sense, I can follow up with a small PR limited to steps (1) and (2), then iterate.
Problem
/usage costis a fixed 30-day summary and/usageonly shows per-response footers. Provider quota snapshots do not explain where tokens went.jqagainst session logs (skills/session-logs).Proposal (small, aligned steps)
src/infra/session-cost-usage.ts) to accept date ranges/--daysand emit JSON.moltbot usage cost --days N --json --agent all.Value
If this direction makes sense, I can follow up with a small PR limited to steps (1) and (2), then iterate.