[BUG] NO_PROXY stopped working in 2.1.23
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_
13 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
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_proxyandno_proxyenv variables (lowercase) in my~/.bashrcor~/.zshrc(so not in the config file). And it was working before, but not anymore.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/claudeat least on 2.1.30...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.
Still broken with 2.1.33 (which mentioned a couple proxy related fixes).
Still blocked too
hmm interesting. Does it also work if you just run it with
/opt/homebrew/bin/claude(withoutnode) in front?+1
I've been checking extensively and prepared an issue message:
issue-proxy.md
In short:
Looks quite severe
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?
Edited - I had to change my original reply. 2.1.37 has fixed NO_PROXY for me on both native and npm based installation!
Thanks for confirming @bhilton. I also confirmed it is working on 2.1.38 via the native binary today and will close this out.
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.