Feature request
Add plan usage / rate limit utilization data to the status line JSON input so custom status line scripts can display it.
Context
The status line command receives JSON on stdin with cost, context_window, model, and workspace data. However, there's no way to show plan usage limits (session % and weekly %) — the same data shown on https://claude.ai/settings/usage.
Claude Code already parses these values from API response headers internally:
anthropic-ratelimit-unified-5h-utilization (session/5-hour usage %)
anthropic-ratelimit-unified-7d-utilization (weekly usage %)
But they aren't passed through to the status line JSON.
Proposed addition
Add a rate_limit object to the status line JSON:
{
"rate_limit": {
"session": {
"utilization": 30,
"resets_at": 1773435600
},
"weekly": {
"utilization": 75,
"resets_at": 1773820800
},
"status": "allowed"
}
}
Why
- The data already exists in memory (parsed from every API response header)
- Zero additional API calls needed — just pass through what's already there
- Enables users to build status lines that match the claude.ai usage page, with progress bars showing session and weekly limits
- Currently the only percentage available is
context_window.used_percentage, which measures something completely different (conversation context, not plan usage)
Current workaround
None viable. The OAuth token can't be used against /v1/messages to get the headers directly, and /api/oauth/usage returns "OAuth authentication is currently not supported." The claude.ai usage page requires browser authentication, making it impractical to scrape.
Feature request
Add plan usage / rate limit utilization data to the status line JSON input so custom status line scripts can display it.
Context
The status line command receives JSON on stdin with
cost,context_window,model, andworkspacedata. However, there's no way to show plan usage limits (session % and weekly %) — the same data shown on https://claude.ai/settings/usage.Claude Code already parses these values from API response headers internally:
anthropic-ratelimit-unified-5h-utilization(session/5-hour usage %)anthropic-ratelimit-unified-7d-utilization(weekly usage %)But they aren't passed through to the status line JSON.
Proposed addition
Add a
rate_limitobject to the status line JSON:{ "rate_limit": { "session": { "utilization": 30, "resets_at": 1773435600 }, "weekly": { "utilization": 75, "resets_at": 1773820800 }, "status": "allowed" } }Why
context_window.used_percentage, which measures something completely different (conversation context, not plan usage)Current workaround
None viable. The OAuth token can't be used against
/v1/messagesto get the headers directly, and/api/oauth/usagereturns "OAuth authentication is currently not supported." The claude.ai usage page requires browser authentication, making it impractical to scrape.