[BUG] API Error: Rate limit reached

Open 💬 41 comments Opened Mar 14, 2026 by DimokratisK

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_

View original on GitHub ↗

41 Comments

Usef-ahmed · 4 months ago

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!!

Red4Hack · 4 months ago

same problem

Marc-Antoine-K · 4 months ago

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

dparmijog · 4 months ago

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

anniechung916 · 4 months ago

Same issue here, just paid for pro and unable to use claude code

larshp · 4 months ago

I'm experiencing the same problem

dparmijog · 4 months ago

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! 🤞

dliedke · 4 months ago

Thanks @dparmijog for workaround.

@ah-anthropic / @claude Can we have this fixed please?

nhumrich · 4 months ago

I have a very interesting version of this bug. I have a custom skill shipit, and whenever I use it manually:

/shipit

I get API Error: Rate limit reached

but if I ask the AI to do it:

run /shipit

it invokes the skill and does it just fine.

DimokratisK · 4 months ago

In PowerShell (or your terminal)

Force close any Claude processes

Get-Process -Name "*claude*" -ErrorAction SilentlyContinue | Stop-Process -Force

Backup and remove

Move-Item "$env:USERPROFILE\.claude" "$env:USERPROFILE\.claude_backup" -Force
Move-Item "$env:USERPROFILE\.claude.json" "$env:USERPROFILE\.claude.json.backup" -Force

Verify they're gone

Test-Path "$env:USERPROFILE\.claude"
Test-Path "$env:USERPROFILE\.claude.json"

Both should return False. Then:
claude login
After 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

mksmv4 · 4 months ago

Same problem.

Downgrading to 2.1.58 and switching to Opus 4.6 (Not [1m]) helped.

Scriptodude · 4 months ago

Downgraded to 2.1.70 and fixed my issue.

Sk8aaron · 4 months ago

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.

dliedke · 4 months ago

All new features and can't use it

mwarden · 4 months ago

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).

holdit · 4 months ago

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.

dliedke · 4 months ago

Hopefully 2.1.78 will fix this

Sk8aaron · 4 months ago

2.1.78 Fixed it for me.

devv-shayan · 4 months ago

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

nickschurch · 4 months ago
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! 🤞

This worked for me. Bug needs fixed!

gessha · 4 months ago

closing the session and starting over also works except you lose the current context/session.

hngpt52 · 3 months ago
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! 🤞

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

victorzhu30 · 3 months ago

same here. Changing the model works for me.
It's comfusing.

Notmeomg · 3 months ago

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 reached

Using @nhumrich solution circumvents this issue.

PikkonMG · 3 months ago

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.

DimokratisK · 3 months ago
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).

This worked fine for me.

bankielewicz · 3 months ago

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:

  • ✓ Story ID: STORY-063
  • ✓ Environment: test
  • ✓ Status: QA Approved (release gate satisfied)

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:

  • Story ID: STORY-063
  • Environment: test
  • Story Status: QA Approved ✅

---
Phase 0.3: Project Type Classification

● Reading 1 file… (ctrl+o to expand)
⎿ Cargo.toml

KonssnoK · 3 months ago

bought pro today, put opus as model, API error. swapped back to default after reading this, it works.

jdpierce21 · 3 months ago

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" />

MarcinOrlowski · 3 months ago

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

giulioco · 3 months ago

seems to be a regression - I have been getting around it by using npx @anthropic-ai/claude-code@2.1.70 temporarily

van-sprundel · 3 months ago

+1 @MarcinOrlowski I was on the 1M model which gave me a rate limit with no other info. Switching back to Opus fixed it.

debsonline · 3 months ago

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.

jjames-cell · 3 months ago

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.

van-sprundel · 3 months ago

@jjames-cell are u sure you weren't just on the 1M model?

MikeTeddyOmondi · 3 months ago

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

jalano0i9u8y7-lab · 3 months ago

Same here on MAX plan — confirming this is still happening as of March 2026.

My symptoms:

  • Session counter hits limit at only 17% of session window elapsed
  • - Weekly usage was only at 31% when blocked
  • - - The counter is clearly inflated / broken — not reflecting actual token consumption
  • - - - Additionally getting 10+ consecutive ENOTFOUND api.anthropic.com DNS errors with zero self-recovery

Setup: 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:

  • Detailed bug report: #40745 - Also confirmed in: #38350, #40532, #40445, #40535
  • This appears to be a widespread regression since ~March 22 affecting MAX/Pro plan users simultaneously. Anthropic needs to fix the session counter logic and provide compensation for lost productivity.
debsonline · 3 months ago

I'm still having to select and re-select (manually) Sonnet to avoid the error. On every chat.

van-sprundel · 3 months ago

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.

jdpierce21 · 3 months ago
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.

michalKopec · 3 months ago

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" />