[BUG] rate_limits absent from statusLine stdin for Team plan sessions — usage data exists server-side
Setup
- Claude Code 2.1.225, macOS 26.5.2
- Claude Team subscription (OAuth
subscriptionType: "team"), dedicated config dir viaCLAUDE_CONFIG_DIR - Control on the same machine: personal Max account on the default config dir, same statusline script
Symptom
The documented rate_limits field never appears in the statusLine stdin JSON for Team-plan sessions. Captured per-render stdin mid-session:
{"t":1786168968,"api_ms":266142,"has_rl":false,"rl":null}
(api_ms = .cost.total_api_duration_ms — 266 s of accumulated API time, so this is long past the first API response; has_rl = has("rate_limits") on the raw stdin object.)
The Max account on the same machine always receives rate_limits. Same script, same OS, same CLI version — the variable isolates to the subscription tier.
The data exists server-side
With the same Team account's OAuth token:
GET https://api.anthropic.com/api/oauth/usage
anthropic-beta: oauth-2025-04-20
returns HTTP 200 with populated windows:
{"five_hour":{"utilization":4.0,"resets_at":"2026-08-08T11:00:00+00:00"},"seven_day":{"utilization":47.0,"resets_at":"2026-08-13T03:00:00+00:00"}}
So the quota data exists — it just never reaches the statusLine payload.
Likely mechanism
This extends #63659 (same symptom reported for a Max account on Windows; auto-closed for inactivity). Per the community analysis referenced there (jarrodwatts/claude-hud#348), Claude Code builds the statusLine rate_limits object from the anthropic-ratelimit-unified-5h-* / -7d-* response headers and omits the field when no window data has been cached. Team-plan sessions apparently never receive those unified headers, so the field never appears.
Expected
rate_limits present in statusLine stdin for Team subscribers. Note the docs currently scope the field to "Claude.ai subscribers (Pro/Max)" (https://code.claude.com/docs/en/statusline, "Fields that may be absent") — if Team is intentionally excluded, that would be worth stating explicitly, but given the data is available server-side for Team accounts, populating it seems like the right resolution. Team users currently have no in-product way to see 5h/7d usage in custom statuslines.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗