[BUG] API Error: Rate limit reached
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
When trying to do practically anything, I get "API Error: Rate limit reached"
I am using Claude Code Pro on VSCode
Current version: 2.1.76
I cannot even logout at this point:
❯ logout ⎿ API Error: Rate limit reached
It happens both on chat Claude and CLI Claude
There is no such issue on browser Claude, Opus or otherwise.
My usage is well within limits:
<img width="548" height="245" alt="Image" src="https://github.com/user-attachments/assets/cc0bf2cf-e11b-425c-bbb5-8d879db4e846" />
What Should Happen?
All Claude Code commands, including logout, should function normally when account usage is well within limits (% weekly, 5% session). The rate limit error should resolve on its own after the standard cooldown period, not persist for 24+ hours. At minimum, authentication commands like logout and login should never be rate-limited — they don't require model inference.
Error Messages/Logs
Steps to Reproduce
Any prompt recreates this issue, even the smallest.
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
Current version: 2.1.76
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
_No response_
41 Comments
I just subscriped to the pro plan yesterday (my first time), and I didn't hit any of daily or weekly limits yet, and I can't use opus 4.6, I always face that api limit issue!!
same problem
same with max plan, a skill of mine cannot be used but I am very far from my available usage and have stopped using Claude for several hours but still the same problem
Same problem here. claude.ai works fine on same account, but Claude Code returns
"API Error: Rate limit reached" immediately, without doing anything.
Usage: 2% (5h window), 6% weekly. Tried logout/login multiple times, issue persists.
Environment: Linux, Ghostty terminal, Claude Code v2.1.76
Same issue here, just paid for pro and unable to use claude code
I'm experiencing the same problem
Hey everyone! I managed to fix this on my end, hope it helps someone else too.
Steps that worked for me:
claude logout
Back up and remove ~/.claude/ folder
Back up and remove ~/.claude.json file
claude login
That's it!
Important finding: After digging into it, we noticed that selecting any specific model (e.g. Sonnet, Opus) causes the error. Sticking with the Default model works fine. So if you're still hitting issues after the steps above, make sure you're not forcing a specific model.
Good luck! 🤞
Thanks @dparmijog for workaround.
@ah-anthropic / @claude Can we have this fixed please?
I have a very interesting version of this bug. I have a custom skill
shipit, and whenever I use it manually:I get
API Error: Rate limit reachedbut if I ask the AI to do it:
it invokes the skill and does it just fine.
In PowerShell (or your terminal)
Force close any Claude processes
Get-Process -Name "*claude*" -ErrorAction SilentlyContinue | Stop-Process -ForceBackup and remove
Verify they're gone
Both should return False. Then:
claude loginAfter logging in, try starting a new conversation.
It worked for me, but I completely lost the old conversation, that one never got unstuck.
Moral of the story: if a conversation is important, keep memory logs to show to a new one to get up-to-date
Same problem.
Downgrading to 2.1.58 and switching to Opus 4.6 (Not [1m]) helped.
Downgraded to 2.1.70 and fixed my issue.
API Error: Rate limit reached. Only Haiku works. Had to downgrade to V2.1.72 changed model to Opus 4.6 (Not [1m]) restarted VS Code and now it works. I believe this started about 3 days ago after Anthropic announced the "free double the usage" temporarily and also since "Opus now defaults to the 1M context" that started showing in the VS Code Extension new session screen, that must have broke it.
-Adding to this, the session % on https://claude.ai/settings/usage has been frozen at "Starts when a message is sent" but shows 6% for the last 3 days eventhough i've been working with Haiku, and now Opus since i got it working.
All new features and can't use it
If you're on the Pro plan and were previously able to use Opus 4.6 via VS Code but now cannot because VS Code is incorrectly only showing Opus 4.6 with 1M context (causing you to hit rate limit message), the only workaround I could make work without switching to terminal is to add the following environment variable system-wide (I'm on Windows) and restart VS Code:
CLAUDE_CODE_DISABLE_1M_CONTEXT=1
This removes the Opus 4.6 1M model option and VS Code will then show the Opus 4.6 menu option (which is the old 200k window and will work).
I don't understand how one of the leading AI/LLM companies is able to ship code like this. Not a very good advertisement for their product.
Hopefully 2.1.78 will fix this
2.1.78 Fixed it for me.
In my case , I am only facing this for Opus 4.6 [1m] , maybe due to the 2x usage they gave isn't working with them
This worked for me. Bug needs fixed!
closing the session and starting over also works except you lose the current context/session.
Tried this still getting the same error. The only way i have found to make it work is by adding funds to usage which is annoying
same here. Changing the model works for me.
It's comfusing.
In my case, I was using opus as the default model. I had skills that were set to use sonnet. Anytime that skill was invoked it returned
API Error: Rate limit reachedUsing @nhumrich solution circumvents this issue.
Having same issue with API Error: Rate limit reached.
If I change models several times generally it will start working again but its hit or miss.
This is trying to use it with VS Code on Linux.
This worked fine for me.
I'm experiencing the same issue. When using the DevForgeAI framework, the "API Error: Rate limit reached" is generated with the v2.1.80 version of Claude Code Terminal. The following is an example from the console. Once I ask Claude, "why are you getting API Error: Rate limit reached?", it continues. That seems to be the workaround right now for me.
❯ /release STORY-063
⎿ API Error: Rate limit reached
❯ why are you getting API Error: Rate limit reached?
● Phase 0: Argument Validation
Step 0.0: No plan mode active — proceeding.
Step 0.1: Story ID STORY-063 ✅ (valid format)
Step 0.2: Story file already confirmed at
devforgeai/specs/Stories/STORY-063-feedback-cli-commands-port.story.md ✅
Step 0.3: Loading story context:
Searched for 1 pattern (ctrl+o to expand)
● Step 0.4: Environment not provided — defaulting to test (safe default).
Step 0.5:
Step 0.6: W3 Compliance Check — skipping full audit invocation to avoid rate limits;
proceeding with skill invocation.
---
Phase 1: Invoke Release Skill
Story ID: STORY-063
Environment: test
● Skill(devforgeai-release)
⎿ Successfully loaded skill · 19 tools allowed · claude-sonnet-4-6
⎿ API Error: Rate limit reached
✻ Worked for 54s
❯ why are you getting API Error: Rate limit reached?
● Parameter Extraction:
---
Phase 0.3: Project Type Classification
● Reading 1 file… (ctrl+o to expand)
⎿ Cargo.toml
bought pro today, put opus as model, API error. swapped back to default after reading this, it works.
Having the same issue. Updated to v2.1.81, hoping that would fix the issue, but it does not. The workaround, for me, is to select another model, but then the issue will come back. I am on the Claude Max 20x plan and am nowhere close to my limits.
<img width="914" height="418" alt="Image" src="https://github.com/user-attachments/assets/7619119e-90d1-47ee-947b-b45b37c12796" />
There's scenario I saw where user was using Claude Code with Pro account and once he reached weekly limit he upgraded to Max. The Desktop app shows up new limits now (and no limit is reached of course) but CLI's Claude still does not see the change. it seems there's either latency in plan details propagation or but that prevents already locked "limit" to be re-evaluated on plan upgrade
seems to be a regression - I have been getting around it by using
npx @anthropic-ai/claude-code@2.1.70temporarily+1 @MarcinOrlowski I was on the 1M model which gave me a rate limit with no other info. Switching back to Opus fixed it.
Same issue! Thought upgrading from Pro to Max would solve it, but it did not! Even stranger, it is only happening on Laptop. Desktop is fine.
Had the same issue, I solved it by switching a model, ("/model" then I pressed enter) I switched to the recommended Sonnet model by typing "/Model" then enter, it let me pick the model, I pressed enter on Sonnet and Claude got back to working.
I then wrote "/Model" again and switched back to Opus 4.6 and it was working, no more the API error.
@jjames-cell are u sure you weren't just on the 1M model?
Hey guys. Just switching the model to the default one worked for me...on claude code and vscode extension which all showed this - API Error: Rate limit reached. Yet my usage were on the low
Same here on MAX plan — confirming this is still happening as of March 2026.
My symptoms:
ENOTFOUND api.anthropic.comDNS errors with zero self-recoverySetup: Claude Code MAX plan, macOS
This is completely unusable for professional work. Paying premium rates for a broken rate limiter is unacceptable.
Related issues filed:
I'm still having to select and re-select (manually) Sonnet to avoid the error. On every chat.
Can this issue be closed with "the 1M context window has a rate limit, exceeding it will give you an error, switching to a non-1M model fixes it".
I'm unsubscribing from this thread. If no one can read then that's not my problem.
This happens, with me, on Sonnet and Opus 200k.
Same problem, been hitting this constantly in the last two days. @ah-anthropic this product turns quickly from awesome to unusable :( Here's the error despite being way under the limits
<img width="483" height="352" alt="Image" src="https://github.com/user-attachments/assets/27e67043-7cad-4a78-9840-7b8bce2f3d50" />