claude-code - 💡(How to fix) Fix [BUG] incorrect API error 400 [1 comments, 2 participants]

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…
GitHub stats
anthropics/claude-code#45192Fetched 2026-04-09 08:11:08
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
1
Timeline (top)
labeled ×4commented ×1

Error Message

Every command in Claude Code returns the following error, making the tool completely unusable: API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"You're out of extra usage. Add more at claude.ai/settings/usage and keep going."}} This affects all commands without exception — including logout, config set, and auth status — meaning there is no way to recover from within Claude Code itself. However, the claude.ai/settings/usage dashboard clearly shows only 5% of the current 5-hour usage window has been consumed, with approximately 3 hours remaining before reset.

Error Messages/Logs

Observe API Error: 400 "out of extra usage" returned for every command Deleting %USERPROFILE%.claude.credentials.json and re-authenticating appeared to resolve the issue momentarily, but the error returned within minutes despite no significant usage occurring in that window. The fact that even logout and auth status commands return the "out of extra usage" error suggests the check is happening too early in the request lifecycle — before the command type is even evaluated. Non-API commands like logout should not be subject to usage limits at all.

RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

Every command in Claude Code returns the following error, making the tool completely unusable: API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"You're out of extra usage. Add more at claude.ai/settings/usage and keep going."}} This affects all commands without exception — including logout, config set, and auth status — meaning there is no way to recover from within Claude Code itself. However, the claude.ai/settings/usage dashboard clearly shows only 5% of the current 5-hour usage window has been consumed, with approximately 3 hours remaining before reset. The following steps were attempted without success:

Restarting Claude Code and opening a fresh session Running claude logout and claude login from Command Prompt Deleting %USERPROFILE%.claude.credentials.json to force a clean re-authentication (briefly appeared to work, then failed again immediately) Checking for ANTHROPIC_API_KEY environment variable (not set) Updating Claude Code via npm update -g @anthropic-ai/claude-code (already on latest version 2.1.23)

The dashboard and Claude Code appear to be out of sync, with Claude Code incorrectly believing extra usage has been exhausted when the subscription allocation is nearly untouched.

What Should Happen?

Claude Code should respect the subscription's included usage allocation. When the claude.ai/settings/usage dashboard shows only 5% of the current 5-hour window has been used, Claude Code should allow requests to proceed normally without triggering extra usage errors or blocking all commands including logout, config, and auth status.

Error Messages/Logs

Steps to Reproduce

Open Command Prompt and launch Claude Code with claude Authenticate using a Claude Pro account via claude login Attempt any command (e.g. claude config set model claude-sonnet-4-6, /status, logout) Observe API Error: 400 "out of extra usage" returned for every command Navigate to claude.ai/settings/usage in a browser Observe that the current 5-hour usage window shows only 5% consumed with ~3 hours until reset Note the discrepancy — Claude Code blocks all requests while the dashboard shows ample remaining allocation

Environment:

OS: Windows 10 (Build 26200.8037) Claude Code version: 2.1.23 Plan: Claude Pro Authentication method: Claude Pro Account (OAuth) Model: Default Opus 4.5

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.1.23

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

The issue appears to be a server-side tracking mismatch where Claude Code is reading a stale or incorrect usage state rather than the actual account allocation. This is not an isolated case — similar reports exist in issues #32544, #24727, and #5001 describing Claude Code reporting exhausted usage while the dashboard shows remaining capacity. Deleting %USERPROFILE%.claude.credentials.json and re-authenticating appeared to resolve the issue momentarily, but the error returned within minutes despite no significant usage occurring in that window. The fact that even logout and auth status commands return the "out of extra usage" error suggests the check is happening too early in the request lifecycle — before the command type is even evaluated. Non-API commands like logout should not be subject to usage limits at all. Request IDs for Anthropic engineers to trace:

req_011CZrDMXwnYCQM9SHrmQkgh req_011CZrDmdpRPoVXYYUr7us8v req_011CZrE5yT84qCm5uPXkpu5p req_011CZrFbdABrMWUGXek7Efum req_011CZrK7Uhsg1b1k57rZzZMb req_011CZrK8M9V41UGE9UBZZvsv req_011CZrKTRGoxDkKVLYzUHJSt

extent analysis

TL;DR

The most likely fix is to resolve the server-side tracking mismatch between Claude Code and the claude.ai/settings/usage dashboard, potentially by re-authenticating or waiting for the usage window to reset.

Guidance

  • Re-authenticate by deleting %USERPROFILE%\.claude\.credentials.json and running claude login again to see if the issue resolves momentarily, as it did in the reported case.
  • Verify the usage allocation on the claude.ai/settings/usage dashboard toconfirm that it shows remaining capacity, and check if the issue persists across different commands, including non-API commands like logout.
  • Consider waiting for the 5-hour usage window to reset, as the reported 5% consumption with 3 hours remaining might indicate a timing issue.
  • If the issue persists, provide the request IDs (req_011CZrDMXwnYCQM9SHrmQkgh, etc.) to Anthropic engineers for further tracing and diagnosis.

Example

No code snippet is provided, as the issue appears to be related to server-side tracking and authentication.

Notes

The issue might be related to a server-side bug or a synchronization issue between Claude Code and the Anthropic API, as similar reports exist in other issues. The fact that re-authenticating appeared to resolve the issue momentarily suggests a potential workaround.

Recommendation

Apply the workaround by re-authenticating and monitoring the usage allocation, as it may resolve the issue temporarily until a more permanent fix is available.

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