CLI returns "API Error: Rate limit reached" on every command including logout (native binary, Max plan)
Status Fixed / completed
Maintainer reply ✓ Yes — ashwin-ant
Activity 10 comments · opened Feb 21, 2026 · closed Apr 19, 2026
💡 Likely answer: A maintainer (ashwin-ant, collaborator)
responded on this thread — see the highlighted reply below.
Bug Description
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
claudeshould start an interactive sessionclaude logoutshould 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_KEYenv var → none set - Desktop app works fine with the same account
Additional Context
- No
.credentials.jsonfile 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
10 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
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.
Same. But I'm on standard Opus.
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 helped me; I chose the OPUS 1m plan, which wasn't supported by my MAX 5X plan.
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.
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
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
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.