claude-code - ๐Ÿ’ก(How to fix) Fix [BUG] rate_limits field still missing/null from statusLine JSON on 2.1.141 (OAuth Pro, firstParty)

Official PRs (โ€ฆ)
ON THIS PAGE

Recommended Tools

ร—6

Utilities matched from this issueโ€™s tags and category โ€” try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful ยท Quick feedback

Loadingโ€ฆ

Root Cause

Without rate_limits, statusline scripts must fall back to /api/oauth/usage, which has aggressive per-token 429 rate limiting (~5 req before lockout). The native field was the intended escape hatch; with it gone, statuslines either show nothing or burn user OAuth quota polling.

Code Example

{
  "version": "2.1.141",
  "model": {"id": "claude-opus-4-7", "display_name": "Opus 4.7"},
  "rate_limits": null,
  "context_window": {"used_percentage": 13, "total_input_tokens": 128657}
}
RAW_BUFFERClick to expand / collapse

Filing as a fresh report because the prior reports of this bug are closed and locked: #40094 (closed not_planned on 2026-05-01, locked by stale-bot) and #45133 (closed as duplicate of #40094). The bug is still live on 2.1.141 with newer evidence.

What's wrong

The rate_limits field is null (was previously absent on older builds โ€” same effective bug) in the JSON piped to the statusLine command, even on an OAuth Pro plan with apiProvider: firstParty. Per the v2.1.80 changelog and the statusLine docs, it should populate after the first API response.

Captured live statusLine JSON (top-level relevant fields, redacted):

{
  "version": "2.1.141",
  "model": {"id": "claude-opus-4-7", "display_name": "Opus 4.7"},
  "rate_limits": null,
  "context_window": {"used_percentage": 13, "total_input_tokens": 128657}
}

total_input_tokens=128657 confirms many API calls have already happened in this session โ€” this is not a pre-first-call empty state.

Auth

  • authMethod: oauth_token, apiProvider: firstParty
  • Plan: Claude Pro
  • OAuth scopes: user:file_upload, user:inference, user:mcp_servers, user:profile, user:sessions:claude_code

Steps to reproduce

  1. OAuth-authenticate on Pro/Max (claude login).
  2. Configure a statusLine command that dumps stdin to a file.
  3. Run any prompt to ensure API calls happen.
  4. Inspect the dumped JSON: rate_limits is null (or absent on older builds).

Versions

  • Claude Code: 2.1.141 (also reproduces on 2.1.142)
  • OS: macOS (Darwin 25.4.0)

Why this matters

Without rate_limits, statusline scripts must fall back to /api/oauth/usage, which has aggressive per-token 429 rate limiting (~5 req before lockout). The native field was the intended escape hatch; with it gone, statuslines either show nothing or burn user OAuth quota polling.

Related

  • #40094 (closed not_planned, locked) โ€” prior report on 2.1.86
  • #45133 (closed duplicate, locked) โ€” same bug on 2.1.96
  • #38335, #38350 โ€” possibly correlated server-side rate-limit changes (per #40094 reporter)

Vote matrix ยท Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loadingโ€ฆ

Still need to ship something?

ร—6

Another batch ranked right after the header list โ€” different links, same matching logic.

Back to top recommendations

TRENDING