AI Agents & Modes

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
Projection beats raw percentage
The faint bar behind each solid bar shows where your current burn rate will land before the window resets — giving early warning well before hitting 100 %.

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.

What "Est. API Value" means
Token usage is priced at public API rates so you can compare activity uniformly across Claude, Codex, and Gemini. If you run on a flat-rate subscription (Claude Pro/Max, ChatGPT Plus/Pro, Google AI plan), **Est. API Value** represents equivalent API consumption — not your monthly bill.

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 usageId so resumed or overlapping JSONL logs are never double-counted.
  • Synthetic message filtering so tool-result-only user entries 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