CLI shows 'Rate limit reached' despite very low usage — VS Code extension works fine

Resolved 💬 4 comments Opened Mar 17, 2026 by hitesh9320 Closed Apr 15, 2026

Bug Description

The CLI consistently returns API Error: Rate limit reached on every message (even a simple "hi"), while the VS Code extension works perfectly on the same account. This has been happening for over a week with no resolution.

Steps to Reproduce

  1. Open terminal and run claude
  2. Send any message (e.g., "hi")
  3. Immediately get: API Error: Rate limit reached
  4. Open VS Code with Claude Code extension — works fine on the same account

Environment

  • Claude Code version: 2.1.77
  • OS: macOS 15.3 (Darwin 24.3.0, Apple Silicon)
  • Shell: zsh
  • Auth: Claude.ai OAuth (no ANTHROPIC_API_KEY set, no custom API base URL)

What I've Tried

  • /logout and re-authenticated — still rate limited
  • rm ~/.claude.json to clear cached tokens — still rate limited
  • Verified no ANTHROPIC_API_KEY or ANTHROPIC_BASE_URL env vars are set
  • Verified env | grep -i anthropic returns nothing
  • Config looks normal (checked via /config)
  • Usage is very low — nowhere near the 5-hour or weekly limits

Expected Behavior

CLI should work the same as the VS Code extension since both use the same account and subscription.

Actual Behavior

❯ hi
  ⎿  API Error: Rate limit reached

This happens on every single message, immediately, for over a week straight.

Additional Context

  • The VS Code extension sets CLAUDE_CODE_SSE_PORT but no other Claude/Anthropic env vars are present
  • No proxy or custom configuration
  • This feels like a server-side rate limit tracking issue since all client-side fixes have been exhausted

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗