[BUG] Unable to obtain key behind corporate proxy
Resolved 💬 2 comments Opened Jun 10, 2025 by scottmac-stripe Closed Jun 12, 2025
Environment
- Platform (select one):
- [x ] Anthropic API
- Claude CLI version: 1.0.15 (Claude Code)
- Operating System: Ubuntu 22.04.2 LTS
- Terminal: iTerm 2
Bug Description
When behind a corporate proxy the Anthropic Console login flow fails to obtain a key. If i set a key manually using apiKeyHelper and echo a key back then everything works as expected behind the proxy.
<!-- A clear and concise description of the bug -->
Steps to Reproduce
- https_proxy=http://trusted-egress-proxy.service:8080 ./claude
- Open browser challenge manually
- Paste resulting key
Expected Behavior
Obtain Key
Actual Behavior
OAuth error: Failed to create API key: The socket connection was closed unexpectedly. For more information, pass verbose: true in the second argument to fetch()
Additional Context
My guess is one of the network calls is missing setting the proxy
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗