[BUG] ERR_BAD_REQUEST on startup — authorization menu never appears
Resolved 💬 3 comments Opened Apr 2, 2026 by nektowebai Closed Apr 5, 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?
Bug: ERR_BAD_REQUEST on startup — authorization menu never appears
Environment:
- OS: Windows 11
- Node.js: v22
- Claude Code: v2.1.90
Problem:
Claude Code fails immediately on startup with the following error, before the login menu even appears:
Unable to connect to Anthropic services
Failed to connect to api.anthropic.com: ERR_BAD_REQUEST
What I tried:
- Reinstalled Claude Code multiple times
- Reinstalled Node.js
- Cleared all config files (~/.claude)
- Removed ANTHROPIC_API_KEY environment variable
- Tried with and without VPN
- Tried from mobile hotspot
- Ran as Administrator
Key finding:
Node.js itself can reach the API fine:
node -e "const https = require('https'); https.get('https://api.anthropic.com/v1/models', {headers: {'x-api-key': 'test'}}, (r) => console.log('Status:', r.statusCode)).on('error', (e) => console.log('Error:', e.message))"
Returns: Status: 403 (expected — means network is working)
So the issue is specific to how Claude Code makes its initial request, not the network or Node.js itself.
What Should Happen?
The login menu should appear, allowing me to choose between Claude.ai Subscription, Anthropic Console, or Bedrock/Foundry.
Error Messages/Logs
Steps to Reproduce
- Install Claude Code: npm install -g @anthropic-ai/claude-code
- Run: claude
- Error appears immediately, login menu never shows
Claude Model
Sonnet (default)
Is this a regression?
Yes, this worked in a previous version
Last Working Version
2.1.90
Claude Code Version
2.1.90
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
VS Code integrated terminal
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗