[BUG] NO_PROXY stopped working in 2.1.23

Status Fixed / completed
Reported on v2.1.23
Maintainer reply None cached
Activity 13 comments · opened Feb 3, 2026 · closed Feb 10, 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?

Starting in 2.1.23 and continuing through 2.1.29 my NO_PROXY settings are being ignored and the proxy is being used for my ANTHROPIC_BASE_URL.

{
"env": {
"CLAUDE_CODE_ENABLE_TELEMETRY": "0",
"ANTHROPIC_MODEL": "anthropic.claude-sonnet-4-5-20250929-v1:0",
"ANTHROPIC_BASE_URL": "https://my-litelllm-endpoint.example.com",
"DISABLE_AUTOUPDATER": "1",
"ANTHROPIC_AUTH_TOKEN": "litellm token",
"NO_PROXY": "127.0.0.1,.example.com",
"HTTPS_PROXY": "http://myproxy.somedomain.com:8080/",
"HTTP_PROXY": "http://myproxy.somedomain.com:8080/",
"DISABLE_INSTALLATION_CHECKS": "1"
}
}

With 2.1.22 and before traffic to my ANTHROPIC_BASE_URL would not pass through the proxy because I included .example.com in my NO_PROXY settings. Starting with 2.1.23, the proxy is used when trying to connect to my ANTHROPIC_BASE_URL .

What Should Happen?

Claude Code should not use the PROXY when the ANTHROPIC_BASE_URL's domain is in NO_PROXY.

Error Messages/Logs

I get errors from my proxy

Steps to Reproduce

With a LiteLLM endpoint setup your proxy and exclude that endpoint from your proxy via NO_PROXY. You will see that the proxy is being used for accessing the ANTHROPIC_BASE_URL

{
"env": {
"CLAUDE_CODE_ENABLE_TELEMETRY": "0",
"ANTHROPIC_MODEL": "anthropic.claude-sonnet-4-5-20250929-v1:0",
"ANTHROPIC_BASE_URL": "https://my-litelllm-endpoint.example.com",
"DISABLE_AUTOUPDATER": "1",
"ANTHROPIC_AUTH_TOKEN": "litellm token",
"NO_PROXY": "127.0.0.1,.example.com",
"HTTPS_PROXY": "http://myproxy.somedomain.com:8080/",
"HTTP_PROXY": "http://myproxy.somedomain.com:8080/",
"DISABLE_INSTALLATION_CHECKS": "1"
}
}

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.1.22

Claude Code Version

2.1.29 (Claude Code)

Platform

Other

Operating System

Ubuntu/Debian Linux

Terminal/Shell

VS Code integrated terminal

Additional Information

_No response_

View original on GitHub ↗

13 Comments

github-actions[bot] · 6 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/22004
  2. https://github.com/anthropics/claude-code/issues/8179
  3. https://github.com/anthropics/claude-code/issues/11660

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

saidelike · 6 months ago

Same problem here and confirmed 2.1.22 was working but 2.1.23 and 2.1.29 are not. Workaround is to disable proxy entirely but then claude can't access external websites (if needed).

NOTE: in my case I had set http_proxy,https_proxy and no_proxy env variables (lowercase) in my ~/.bashrc or ~/.zshrc (so not in the config file). And it was working before, but not anymore.

wi-adam · 6 months ago

I don't have an explanation of why this fixes it but on my mac if I install Claude Code via npm I can get NO_PROXY working by running node /opt/homebrew/bin/claude at least on 2.1.30...

primerano · 6 months ago

I just confirmed the issue still exists in 2.1.31.

For now, I am unsetting my proxy variables but I think that will defeat some CC tools that may try to access the internet as web requests must go through the proxy.

bhilton · 6 months ago

Still broken with 2.1.33 (which mentioned a couple proxy related fixes).

djanito · 6 months ago

Still blocked too

saidelike · 6 months ago
I don't have an explanation of _why_ this fixes it but on my mac if I install Claude Code via npm I can get NO_PROXY working by running node /opt/homebrew/bin/claude at least on 2.1.30...

hmm interesting. Does it also work if you just run it with /opt/homebrew/bin/claude (without node) in front?

jmarucha · 6 months ago

+1

I've been checking extensively and prepared an issue message:

issue-proxy.md

In short:

  • it stops working after 2.1.22
  • this is not a problem with "*", ".example.com" (dot-prefixed thing) or notation like "127.0.0.1/8"
  • it works with node.js

Looks quite severe

primerano · 6 months ago

Still broken in 2.1.37

primerano · 6 months ago
Still broken in 2.1.37

Wait. i think I had a different error. This may be fixed in 2.1.37. Can someone else confirm?

bhilton · 6 months ago

Edited - I had to change my original reply. 2.1.37 has fixed NO_PROXY for me on both native and npm based installation!

primerano · 6 months ago

Thanks for confirming @bhilton. I also confirmed it is working on 2.1.38 via the native binary today and will close this out.

github-actions[bot] · 6 months 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.