Feature Request: Expose subscription rate limit quota in statusline data
Summary
As a Max $200/mo subscriber using Claude Code daily, I need programmatic visibility into my remaining 5-hour and weekly token budgets. Currently there is no way to check how close I am to hitting a rate limit until I actually hit it.
Context
The statusline JSON already provides excellent real-time data:
cost.total_cost_usd— accurate session costcontext_window.total_input_tokens/total_output_tokens— token countscontext_window.used_percentage— context window utilization
This data is great for per-session tracking. What's missing is the subscription-level usage ceiling — the rate limit budget for the current 5-hour rolling window and weekly period.
What I Built (as a workaround)
I built a tracking system using Claude Code hooks to work around this:
- PostToolUse hook records tool calls and session data to a JSON file
- 3-line statusline displays context window, 5h rolling window, and weekly usage using real
cost.total_cost_usddata aggregated across sessions - Session archival captures final cost on session transitions via the statusline cost snapshot
This gives me rolling-window and weekly aggregation of my own usage. But the limit ceiling is unknown — I have to wait until I hit a rate limit, note the cost at that point, and manually configure it as a threshold. That's the gap.
Proposed Solution
Add rate limit quota fields to the statusline JSON input:
{
"rate_limits": {
"window": {
"period_hours": 5,
"used_usd": 4.15,
"limit_usd": 8.50,
"remaining_usd": 4.35,
"resets_at": "2026-02-15T19:30:00Z"
},
"weekly": {
"used_usd": 15.40,
"limit_usd": 80.00,
"remaining_usd": 64.60,
"resets_at": "2026-02-20T00:00:00Z"
}
}
}
Alternatively (or additionally), a /limits or /quota CLI command that returns current usage vs. ceiling.
Why This Matters
- Power users on Max plans run multiple long sessions per day and need to budget their usage across the week
- The current UX is "use it until it breaks, then wait" — this is a poor experience for any paid service with usage tiers
- Every major cloud/API platform exposes quota visibility (AWS, GCP, OpenAI, Vercel, etc.)
- The infrastructure to track this clearly exists server-side (rate limits are enforced accurately), it just isn't exposed to the user
- The statusline hook system is the perfect delivery mechanism — the data pipeline already exists, it just needs the ceiling values added
Environment
- Plan: Claude Max $200/mo
- Claude Code version: latest (Feb 2026)
- Platform: Windows 10
- Model: Claude Opus 4.6
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗