[BUG] Session randomly dies with "API Error: Rate limit reached" despite near-zero usage
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?
Mid-session, Claude Code starts throwing API Error: Rate limit reached on every message in an active chat. Usage is at 2% session / 41% weekly — nowhere near any limit.
Restarting VS Code doesn't help. The specific chat is permanently broken. The only fix is opening a new chat — which means losing all session context.
This has happened multiple times. I lost days of work context because of this bug. There's no warning, no graceful degradation — the session just dies with a misleading error message.
Expected behavior: Either the session continues working, or the error message is accurate and reflects the real cause.
Actual behavior: Misleading rate limit error on a chat that never recovers, forcing a new session and complete loss of context.
Environment:
macOS
VS Code with Claude Code extension
Auth: Claude.ai Pro subscription
What Should Happen?
Either the session continues working, or the error message is accurate and reflects the real cause. Sessions should not permanently die mid-work with a misleading error.
Error Messages/Logs
No relevant logs found — Claude Code extension does not appear in the VS Code Output panel dropdown.
Steps to Reproduce
Start a long working session in Claude Code (VS Code extension)
Auth: Claude.ai Pro subscription, usage at ~2% session / ~41% weekly
Mid-session, every message starts returning "API Error: Rate limit reached"
Restarting VS Code does not fix it
The only workaround is opening a new chat — losing all session context permanently
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
1.x.x (unknown)
Claude Code Version
1.x.x (unknown)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
VS Code integrated terminal
Additional Information
_No response_
This issue has 8 comments on GitHub. Read the full discussion on GitHub ↗