[BUG] Unable to use HTTP proxy settings

Status Fixed / completed
Maintainer reply ✓ Yes — ant-kurt
Activity 8 comments · opened Aug 27, 2025 · closed Aug 27, 2025
💡 Likely answer: A maintainer (ant-kurt, collaborator) responded on this thread — see the highlighted reply below.

Environment

  • Platform (select one):
  • [ ] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [x] Other: Claude Code Overrides via env
  • Claude CLI version: 1.0.93
  • Operating System: Ubuntu 22.04
  • Terminal: Windows Terminal

Bug Description

After configuring HTTP_PROXY/HTTPS_PROXY in Claude Code v1.0.93, network requests fail to go through the proxy and the following warning is emitted on every run:

(node:19595) [UNDICI-EHPA] Warning: EnvHttpProxyAgent is experimental, expect them to change at any time. (Use `node --trace-warnings ...` to show where the warning was created)

The same proxy settings work correctly in v1.0.92 without any warnings.

Steps to Reproduce

  1. Install or update to Claude Code CLI v1.0.93.
  2. Set environment variable HTTP_PROXY (or HTTPS_PROXY) to a valid proxy URL.
  3. Run any Claude client command that makes an HTTP request (e.g. claude chat --model code-v1).

Expected Behavior

Network requests should be routed through the configured proxy and no experimental-agent warnings should appear.

Actual Behavior

  • Requests do not use the proxy (no outbound network traffic through the proxy).
  • The [UNDICI-EHPA] Warning: EnvHttpProxyAgent is experimental… warning is logged on startup.

Additional Context

  • Downgrading to Claude Code CLI v1.0.92 with the same proxy environment variables restores expected behavior and suppresses the warning.
  • Possible root cause: v1.0.93 switched to Undici’s experimental EnvHttpProxyAgent, which may not properly read environment variables and emits warnings.
  • A workaround is to manually configure a stable ProxyAgent via code or pin back to v1.0.92.

View original on GitHub ↗

8 Comments

ant-kurt collaborator · 1 year ago

Hi @zhatlas - we're not able to reproduce this internally. Can you share more about your proxy configuration?

Note that we did add NO_PROXY support in 1.0.93, please confirm that isn't interfering.

Note that the EnvHttpProxyAgent warning shouldn't be an issue, and we will make this go away.

zhatlas · 1 year ago

Hi, @ant-kurt Indeed, it was because support for NO_PROXY was added. I now understand the reason; this issue has already been resolved.

johnmiroki · 1 year ago

@zhatlas can you please share how you resolved it? Appreciate it!

zhatlas · 1 year ago

@johnmiroki I use https://api.deepseek.com/anthropic as my Claude code driver model. To connect to certain Anthropics websites, I configured a global HTTP proxy for Claude code. However, I don't want https://api.deepseek.com/anthropic to go through this global proxy, so I added this URL to the NO_PROXY list. In previous versions of Claude code, NO_PROXY was not supported, so the NO_PROXY setting I configured was ineffective, and Claude code could still function properly. Now, version 1.0.93 supports NO_PROXY, so https://api.deepseek.com/anthropic no longer goes through the proxy. On my system environment, without the proxy, it cannot connect to the internet, so I had to remove https://api.deepseek.com/anthropic from the NO_PROXY list to resolve this issue. After doing this, all connections made when running Claude code will go through the HTTP proxy I've set up.

johnmiroki · 1 year ago

@zhatlas Thanks for such detailed analysis! In my case, it's either the proxy is down, or an enterprise NO_PROXY policy is at play

zhatlas · 1 year ago

@ant-kurt Version 1.0.96, the EnvHttpProxyAgent warning will still appear.

ant-kurt collaborator · 1 year ago

^ Should be addressed in the next release.

github-actions[bot] · 1 year ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.