Feature request: expose rate limit utilization in statusline JSON
Problem
Claude Code's Max plan has strict 5-hour and 7-day rate limit windows, but there is no built-in way to see how much of your budget you've consumed or how quickly you're burning through it. Users only discover they've hit a limit when requests start failing.
The /usage command exists but has significant limitations:
- It can't be used during a prompt response, which is exactly when you'd want to check burn rate
- It fails at the start of a session before any API calls have been made
- There's no way to tell if background processes (subagents, hooks, etc.) are consuming tokens unless you're constantly spamming
/usage - It requires an explicit action that interrupts your workflow rather than being passively visible
The ability to see how much usage remains should be statusline-native — always visible without breaking flow.
Workaround Built
I built claude-usage-proxy — a lightweight reverse proxy that captures anthropic-ratelimit-unified-* response headers and exposes them in the Claude Code statusline. It currently provides:
- 5h / 7d utilization progress bars with color-coded thresholds (green → yellow → red)
- Per-prompt delta showing how much each interaction consumed
- Per-branch weekly tracking attributing 7d budget usage to git branches
- Reset countdowns for both rate limit windows
Feature Ask
Native first-party support for usage visibility inside Claude Code:
- Expose utilization data in the statusline JSON — add
rate_limit.5h_utilization,rate_limit.7d_utilization, and reset times to the JSON blob passed tostatusline-command.sh. This eliminates the need for a proxy. The API already returns these headers — Claude Code just doesn't surface them. - Built-in usage display — show utilization in the default statusline or as a persistent indicator so users can self-regulate without interrupting their workflow.
- Per-session / per-branch accounting — track how much budget each coding session (or git branch) consumes, helping teams estimate capacity.
- Alerts — warn when approaching limits (e.g., 80% of 5h window) so users can pace work or switch tasks.
Why This Matters
The proxy approach works but adds operational overhead (extra process, ANTHROPIC_BASE_URL override). Native integration would benefit every Max subscriber. The data is already flowing through Claude Code on every API response — it just needs to be surfaced.
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗