You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CLI returns "API Error: Rate limit reached" on every command including logout (native binary, Max plan) #27336
Claude Code CLI v2.1.49 (native binary install) immediately returns "API Error: Rate limit reached" on every command, including claude logout. The CLI is completely unusable.
Claude Code Desktop app works fine on the same machine and account.
Environment
Claude Code version: v2.1.49 (native binary install via curl -fsSL https://claude.ai/install.sh | sh)
Plan: Claude Max (Opus 4.6, 1M context)
OS: macOS 26.3 (Build 25D125)
Architecture: Apple Silicon (M1 Pro, arm64)
Shell: Zsh with oh-my-zsh
Steps to Reproduce
Open terminal
Run claude → "API Error: Rate limit reached"
Run claude logout → "API Error: Rate limit reached"
Any command triggers the same error immediately.
Expected Behavior
claude should start an interactive session
claude logout should not make API calls that can be rate-limited
Actual Behavior
Every command, including logout, returns "API Error: Rate limit reached" before doing anything useful.
Troubleshooting Attempted
claude logout → same rate limit error
Checked ~/.claude/.credentials.json → file does not exist (auth is in macOS Keychain)
Checked for stale ANTHROPIC_API_KEY env var → none set
Desktop app works fine with the same account
Additional Context
No .credentials.json file in ~/.claude/ (expected for Keychain-based auth)
The error appears instantly, not after extended usage
This has persisted across sessions — it's not a temporary rate limit
Reacted by Henry Decléty, VERDAN DEPO, maik-pedroza, cronicabelica, Aseem Bansal, David Kunz, Artem Brykin, PaulPlay, sinclairjake, Saad Bin Saeed and 3 more
This was resolved for me — the issue was caused by selecting the sonnet 1M model, which isn't available on the Claude Max plan. Instead of returning a clear "model not available" error, the CLI returns "API Error: Rate limit reached," which is misleading. The fix was switching to a supported model. Leaving this open as the error message should be improved — a model availability error shouldn't surface as a rate limit error.
Reacted by Aseem Bansal, choco_hunter, David Kunz, quangtran16t3 and Monster Techno
Reacted by Matt Garrett, Aseem Bansal and JoaoTheCoder
Same issue here, im using Max plan and I was running opus in 1m context window until rate limited. 200k models work fine for me in CLI. I did not find anything when the rate limit is reset for this exact model as the dashboard does not show the Claude Code limits I assume...
This was resolved for me — the issue was caused by selecting the sonnet 1M model, which isn't available on the Claude Max plan. Instead of returning a clear "model not available" error, the CLI returns "API Error: Rate limit reached," which is misleading. The fix was switching to a supported model. Leaving this open as the error message should be improved — a model availability error shouldn't surface as a rate limit error.这个问题后来解决了——问题是因为选择了Sonnet 1M型号,而Claude Max套餐没有这个型号。它没有返回明确的“型号不可用”错误,而是返回“API 错误:速率上限已达”,这具有误导性。解决办法是切换到支持的型号。保持开放状态,错误信息应当改进——模型可用性错误不应以速率限制错误的形式出现。
This helped me; I chose the OPUS 1m plan, which wasn't supported by my MAX 5X plan.
New Installation :
npm install -g @anthropic-ai/claude-code
Problem was that claude used API based account on claude.com instead of my max plan on claude.ai
Logging in and out didn't change anything, but finally reinstalling solved the problem.
Regards,
Michal
Reacted by PaulPlay, Saad Bin Saeed and Oleg Frolov
Was resolved for me with a /logout and then restarting claude cli. Only restart did not resolve it.
This happened to me after I downgraded from max to pro
This was fixed in v2.1.88 — Fixed misleading "Rate limit reached" message when the API returned an entitlement error (e.g. 1M context without Extra Usage) — now shows the actual error with actionable hints (/extra-usage or /model to switch). If you're still seeing this in the latest version, please comment with your version and repro and we'll reopen.
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.
Activity
github-actions commentedon Feb 21, 2026
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Marviel commentedon Feb 21, 2026
This just happened to me as well.
EDIT:
This was resolved for me — the issue was caused by selecting the sonnet 1M model, which isn't available on the Claude Max plan. Instead of returning a clear "model not available" error, the CLI returns "API Error: Rate limit reached," which is misleading. The fix was switching to a supported model. Leaving this open as the error message should be improved — a model availability error shouldn't surface as a rate limit error.
ShakataGaNai commentedon Feb 21, 2026
Same. But I'm on standard Opus.
depoledna commentedon Feb 22, 2026
Same issue here, im using Max plan and I was running opus in 1m context window until rate limited. 200k models work fine for me in CLI. I did not find anything when the rate limit is reset for this exact model as the dashboard does not show the Claude Code limits I assume...
jizhi0v0 commentedon Feb 25, 2026
This helped me; I chose the OPUS 1m plan, which wasn't supported by my MAX 5X plan.
nromey commentedon Mar 3, 2026
I'm now receiving this error. I was working just fine throughout the day, I'm way under my limits and now get the error. Very odd indeed.
MichalKantor commentedon Mar 10, 2026
SOLVED
I had same issue - only in CLI in cursor on mac.
Solved by
but claude still works in terminal
It showed more installations so:
rm -f ~/.local/bin/claude
rm -rf ~/.local/share/claude
rm -rf ~/.claude
(eventually: bun uninstall -g @anthropic-ai/claude-code)
npm install -g @anthropic-ai/claude-code
Problem was that claude used API based account on claude.com instead of my max plan on claude.ai
Logging in and out didn't change anything, but finally reinstalling solved the problem.
Regards,
Michal
ssolders commentedon Mar 24, 2026
Was resolved for me with a
/logoutand then restarting claude cli. Only restart did not resolve it.This happened to me after I downgraded from max to pro
fix: LLM 호출 오류 처리 및 rate_limit_event 패치
ashwin-ant commentedon Apr 19, 2026
This was fixed in v2.1.88 — Fixed misleading "Rate limit reached" message when the API returned an entitlement error (e.g. 1M context without Extra Usage) — now shows the actual error with actionable hints (/extra-usage or /model to switch). If you're still seeing this in the latest version, please comment with your version and repro and we'll reopen.
github-actions commentedon Apr 26, 2026
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.