[BUG] Claude Code intermittently ignores HTTP_PROXY on startup (Windows)

Resolved 💬 5 comments Opened Dec 24, 2025 by ayaka209 Closed Feb 14, 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?

Claude Code makes outbound HTTP/HTTPS requests that intermittently bypass the configured HTTP_PROXY, even though the proxy is explicitly set via environment variables in settings.json.

Important:
This behavior occurs immediately on startup, without any user interaction (no prompt input, no commands, no chat). Simply opening Claude Code is enough to observe direct network traffic.

Observed affected domains include (not exhaustive, and inconsistent):

  • console.anthropic.com
  • api.anthropic.com
  • code.claude.com

For the same domain, some requests go through the proxy while others bypass it. This makes the issue hard to mitigate using firewall rules or proxy configuration.

Because some authentication-related requests bypass the proxy, this behavior can cause OAuth token state inconsistencies or token expiration, especially in restricted or proxied network environments.

What Should Happen?

All outbound network requests made by Claude Code — including startup initialization, authentication, background services, and telemetry-related traffic — should consistently respect the configured proxy settings (HTTP_PROXY / HTTPS_PROXY).

No direct connections should be attempted unless explicitly configured.

Error Messages/Logs

There is no single consistent error message.

When direct connections are blocked by network policy:
- Some startup or background requests fail silently
- Authentication state may become invalid
- OAuth tokens may expire or fail to refresh

The failures depend on which requests bypass the proxy during that run.

Steps to Reproduce

Configure Claude Code with the following settings.json:

``json
{
"env": {
"CLAUDE_CODE_ENABLE_TELEMETRY": "0",
"DISABLE_TELEMETRY": "1",
"DISABLE_ERROR_REPORTING": "1",
"DISABLE_BUG_COMMAND": "1",
"HTTP_PROXY": "http://xxxxxxxxxxxx:yyyy",
"ENABLE_LSP_TOOLS": "1"
},
"permissions": {
"defaultMode": "bypassPermissions"
},
"model": "opus"
}
``

  1. Monitor system network traffic or proxy logs
  2. Start Claude Code (do not enter any prompts or commands)
  3. Observe:
  • Some requests are routed through http://xxxxxxxxxxxx:yyyy
  • Some requests bypass the proxy and connect directly
  1. If direct connections are restricted, authentication or requests may fail

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

Not entirely certain, but this issue does not appear to occur in versions 2.0.6x and earlier.

Claude Code Version

2.0.74 (npm), 2.0.75 (npm)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

  • The proxy is mandatory for outbound internet access in this environment
  • Direct network traffic can be observed immediately after startup
  • The issue appears to affect authentication / OAuth-related requests
  • This behavior makes Claude Code unreliable in enterprise or restricted network setups

This issue affects the npm-based version; the native version does not respect HTTP_PROXY at all.

View original on GitHub ↗

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