[BUG] /usage command fails with rate_limit_error when checking usage data

Status Open
Reported on v2.1.71
Maintainer reply None cached
Activity 9 comments · opened Mar 9, 2026

What's Wrong?
When running the /usage command to check current usage and limits in Claude Code, the UI displays an error:

Error: Failed to load usage data: {"error":{"message":"Rate limited. Please try again later.","type":"rate_limit_error"}}

The /usage dialog opens but immediately fails to load any data, making it impossible to monitor current token usage or remaining quota.

What Should Happen?
The /usage dialog should successfully load and display current session usage statistics, token consumption, and remaining quota without being rate limited by the usage data endpoint itself.

Steps to Reproduce

  1. Open Claude Code in an active session
  2. Type /usage and press Enter
  3. Observe the error: "Error: Failed to load usage data: rate_limit_error"

Additional Context
This appears related to #31637 where the /api/oauth/usage endpoint aggressively rate limits usage monitoring requests. The error occurs on the Anthropic Max plan.

Environment

  • Claude Code version: 2.1.71 (Claude Code)
  • OS: Windows 10 Pro (Build 19045)
  • Terminal: Windows Terminal 1.23.20211.0
  • Platform: Anthropic Max

View original on GitHub ↗

9 Comments

github-actions[bot] · 5 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/30930
  2. https://github.com/anthropics/claude-code/issues/31055
  3. https://github.com/anthropics/claude-code/issues/31021

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

Elvin-yk · 5 months ago

Still reproducing on v2.1.83. Root cause traced in #31637.

  • Claude Code version: 2.1.83
  • OS: macOS Darwin 25.2.0
  • Model: claude-opus-4-6 (1M context)

Triggered via /status → Usage tab, same error:

Error: Failed to load usage data: {"error":{"type":"rate_limit_error","message":"Rate limited. Please try again later."}}

Status and Config tabs load fine. /usage command also fails the same way. Conversations and model inference are completely unaffected — only the usage data endpoint is rate-limited.

Per the analysis in #31637, the root cause is overly aggressive rate limiting on the /api/oauth/usage endpoint — approximately 5 requests per access token before returning 429, with no recovery and no Retry-After header. This effectively makes Claude
Code's built-in usage monitoring unusable under normal use.

This issue is marked as stale, but the problem clearly persists. Would appreciate some attention from the team — even a more generous rate limit on the usage endpoint or more aggressive client-side caching would resolve this.

andrybicio · 4 months ago

Same issue here.

  • Claude Code v2.1.92
  • NixOS 26.05 (Yarara) on WSL2
RadeenXALNW · 4 months ago

Experiencing same issue. v2.1.104

pixelsomatic · 4 months ago

Same issue with the v2.1.104

paralaxsd · 4 months ago

Occurs with CLI v2.1.107.

wesort · 4 months ago

Occurs with CLI v2.1.109.

Might be related to general Claude errors

dune-ng · 3 months ago

Same with CLI v2.1.150

billmei · 2 months ago

As a workaround, doing /logout and /login reset the rate limit for my OAuth session token, allowing me to use the endpoint again.