Expose rate limit utilization data in statusline JSON
Feature Request
Expose subscription rate limit data (utilization, resetsAt, rateLimitType) in the statusline JSON payload, so users can display their daily/weekly usage limits in the status line.
Context
Claude Code already parses these values from API response headers internally:
anthropic-ratelimit-unified-7d-utilization— weekly usage percentageanthropic-ratelimit-unified-7d-reset— weekly reset timestampanthropic-ratelimit-unified-5h-utilization— session usage percentageanthropic-ratelimit-unified-5h-reset— session reset timestampanthropic-ratelimit-unified-status— current limit statusanthropic-ratelimit-unified-fallback— overage availability
This data powers the /usage command UI and the internal limit warnings. However, it is not included in the JSON payload sent to the statusline command via stdin.
Current statusline JSON fields
The statusline receives cost.* (session cost, duration) and context_window.* (tokens, used percentage), but nothing about subscription rate limits.
Proposed addition
Add a rate_limit (or usage_limits) object to the statusline JSON:
{
"rate_limit": {
"status": "allowed" | "allowed_warning" | "rejected",
"type": "seven_day" | "five_hour" | "seven_day_opus" | "seven_day_sonnet",
"utilization": 0.42,
"resets_at": 1772500000,
"overage_available": true,
"is_using_overage": false
}
}
Use case
Users want to see how much of their weekly/daily limit is consumed directly in the status line, without running /usage manually. Example output:
user@host ~/project on main | $1.23 | ctx 34% | week 42% (resets 3d)
This is especially useful for Max subscribers who want to pace their usage.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗