Usage, quotas & /stats
Real-time 5-hour and 7-day quota bars for Claude, Codex, and Gemini (agy), plus multi-provider /stats v4 analytics with Est. API Value KPIs.
Hitting a rate limit mid-task interrupts flow. muxbay pulls 5-hour and 7-day quota gauges for Claude Code, Codex, and Gemini (agy) straight into the sidebar and provides a local multi-provider /stats analytics dashboard.
Multi-provider sidebar quota gauges
At the bottom of the sidebar, 5h and 7d bars show consumed percentage, remaining time until reset, and a faint pace projection bar:
| Provider | Data source |
|---|---|
| Claude Code | ~/.purplemux/statusline.sh posting Claude statusline JSON to /api/status/statusline |
| Codex | Built-in Codex session rate-limit tracking |
Gemini (agy) |
~/.cache/antigravity-quota-gauge/latest.json (from antigravity-quota-gauge) |
Color thresholds
| Used | Color |
|---|---|
| 0–49 % | Teal — comfortable |
| 50–79 % | Amber — pace yourself |
| 80–100 % | Red — nearing window limit |
The /stats dashboard (⌘⇧U / Ctrl+Shift+U)
Open usage analytics from the sidebar or with ⌘⇧U / Ctrl+Shift+U. You can inspect Claude, Codex, Gemini, or the aggregated (Claude + Codex + Gemini) view:
Overview cards & Est. API Value
Four KPI cards — Total sessions, Est. API Value (Total), Est. API Value (Today), and Est. API Value (This month) — with period-over-period trends.
Charts & breakdowns
- Token usage by model — stacked daily bars split by model and token type (input, output, cache reads, cache writes).
- Per-project breakdown — sessions, messages, tokens, and Est. API Value per working directory, with drill-down charts.
- Activity & streaks — 30-day activity curve with longest streak, current streak, active days, and average sessions per day.
- Weekly timeline — day × hour heatmap showing concurrency patterns across the week.
Accuracy & cache v4
The stats engine (~/.purplemux/stats/cache.json, CACHE_VERSION = 4) reads local JSONL transcripts (~/.claude/projects/, ~/.codex/sessions/, and Gemini transcripts) completely offline and applies three accuracy guards:
- Cross-file deduplication by
usageIdso resumed or overlapping JSONL logs are never double-counted. - Synthetic message filtering so tool-result-only
userentries aren't inflated as human prompts. - Local timezone bucketing so daily and hourly charts align with your local clock instead of UTC.
What's next
- Notes (AI daily report) — end-of-day Markdown briefs generated from these sessions.
- Supported agents & CLI profiles — setup details for Claude, Codex, and Gemini (
agy). - Data directory — how
~/.purplemux/stats/caches are stored.