[BUG] Rate limiter not functioning correctly "API Error: Rate limit reached" when spawning more that one agent

Status Closed — not planned
Reported on v2.1.81
Maintainer reply None cached
Activity 16 comments · opened Mar 28, 2026 · closed May 26, 2026

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?

The rate limiter is broken. This is an issue across multiple accounts. "API Error: Rate limit reached" Claude can no longer spawn multiple agents without getting this error. We have been using claude code for a year and this just started today.

<img width="747" height="597" alt="Image" src="https://github.com/user-attachments/assets/d4f064d6-c2c9-4422-88a6-205fbdea6817" />

What Should Happen?

There bug needs to be fixed or the "new" parameters need to be revised so claude code is usable again

Error Messages/Logs

Steps to Reproduce

do any complex or multi-agent work or multiple sessions using the same account

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.81

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Xterm

Additional Information

We have replicated this on two different accounts. It seems that any heavy usage is triggering this bug

View original on GitHub ↗

16 Comments

github-actions[bot] · 5 months ago

Found 1 possible duplicate issue:

  1. https://github.com/anthropics/claude-code/issues/38123

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

rwp65 · 5 months ago

This also happens without an agent spawning I just restarted and now at 2.1.86 with the same issue.

<img width="838" height="549" alt="Image" src="https://github.com/user-attachments/assets/df1b2e18-9c78-47cc-937e-9b7766d67f55" />

devchris · 5 months ago

I'm getting API Error: Rate limit reached even when I'm not spawning a second agent. I have Max 20x and I was using it the first time today and I immediately got API Error: Rate limit reached ... This is frustrating

<img width="1018" height="584" alt="Image" src="https://github.com/user-attachments/assets/993bfec3-43e3-4ef1-867e-927f5ff66154" />

rwp65 · 5 months ago

Still broken. Where is the response from Anthropic on this critical bug?

andrewroth · 5 months ago

I'm getting this as well.

andrewroth · 5 months ago

It's frustrating there's no status update -- are we just a small minority getting this error? "All Systems Operational" is not right.

newcomerd33-wq · 5 months ago

@andrewroth @devchris @rwp65 I had the same issue and was even getting charged additional extra usage fees while having 99% of my 20xMax Plan available after weekly reset. For whatever reason, the only thing that worked was using the /model command to switch my model and it went back to using my actual plan.

rwp65 · 5 months ago

@newcomerd33-wq - what model were you using and what model did you switch to? I have found Opus is a much better model for our work and I don't want to change. However, this limit issue makes Claude Code unusable. Did you try to switch back to see if it is still an issue?

andrewroth · 5 months ago

No amount of switching models helps me.

rwp65 · 5 months ago

Anthropic - any response to this issue. it is still a bug.

marlvinvu · 5 months ago

My Claude says your issue shares the same rate limit pattern as #38239, #37917, #39465, #39938, #40079, #40085, #40128. Your case adds a specific trigger: multi-agent spawning. Linking so Anthropic sees the full scope of this rate limit problem.

marlvinvu · 5 months ago

A user in #40584 may have found the root cause for your rate limit issue. Two findings:

  1. The "Rate limit reached" error is generated CLIENT-SIDE by Claude Code, not by the Anthropic API. Evidence: model: "<synthetic>", input_tokens: 0, output_tokens: 0 — no request was ever sent to the API. The client-side rate limiter counts the entire context size against the token budget, so large/long sessions get permanently blocked even when the API is fully available.
  2. The client-side rate limiter MULTIPLIES estimated context tokens by the number of concurrent requests. So 3 subagents × 400K context = 1.2M tokens counted against budget — even though the context is cached and shared. This means as your session grows, fewer concurrent agents can run before hitting the false limit.

See #40584 for the full analysis with log evidence from two independent occurrences.

rwp65 · 4 months ago

WHERE IS THE RESPONSE FROM ANTHROPIC????????????

seanmamasde · 4 months ago
A user in #40584 may have found the root cause for your rate limit issue. Two findings: 1. The "Rate limit reached" error is generated CLIENT-SIDE by Claude Code, not by the Anthropic API. Evidence: model: "", input_tokens: 0, output_tokens: 0 — no request was ever sent to the API. The client-side rate limiter counts the entire context size against the token budget, so large/long sessions get permanently blocked even when the API is fully available. 2. The client-side rate limiter MULTIPLIES estimated context tokens by the number of concurrent requests. So 3 subagents × 400K context = 1.2M tokens counted against budget — even though the context is cached and shared. This means as your session grows, fewer concurrent agents can run before hitting the false limit. See #40584 for the full analysis with log evidence from two independent occurrences.

I could somewhat verify cause 1 from my experience. existing long sessions got hit with rate limit error, but new sessions worked fine.

github-actions[bot] · 3 months ago

Closing for now — inactive for too long. Please open a new issue if this is still relevant.

github-actions[bot] · 1 month ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.