[BUG] settings.json Proxy Configuration Doesn't Work for Claude (But CLI Does)

Status Closed — not planned
Reported on v2.1.25
Maintainer reply None cached
Activity 13 comments · opened Jan 30, 2026 · closed Mar 28, 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?

My app needs to have no proxy to work.
If I do this in ~/.claude/settings.json

{
  "env": {
    "ANTHROPIC_BASE_URL": "<base-url>",
    "ANTHROPIC_AUTH_TOKEN": "<token>",
    "CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS": "1",
    "CLAUDE_CODE_TELEMETRY_DISABLED": "1",
    "https_proxy": "",
    "HTTP_PROXY": "",
    "http_proxy": "",
    "HTTPS_PROXY": ""
  },
  "model": "haiku"
}

Claude blocks. It takes the proxy that is in my bashrc.

Now, if I do this:

HTTPS_PROXY="" HTTP_PROXY="" https_proxy="" http_proxy="" claude

Claude works.
I should note that I tried NO_PROXY="*", and it doesn't work.

What Should Happen?

Claude should be able to reach my base URL without a proxy, just like it does when we pass proxy arguments with the command.

Error Messages/Logs

❯ bonjour
⎿  API Error: Connection error. (after several minutes)

Steps to Reproduce

Steps to Reproduce

Prerequisites:

  • A proxy is configured in your system bashrc (e.g., export https_proxy=...)
  • Your API URL works without the proxy (e.g., curl --proxy "" https://<base-url> succeeds)

Test 1 - settings.json (FAILS):

{
  "env": {
    "ANTHROPIC_BASE_URL": "<base-url>",
    "https_proxy": "",
    "HTTP_PROXY": "",
    "http_proxy": "",
    "HTTPS_PROXY": ""
  }
}

Result: Claude blocks

Test 2 - CLI (WORKS):

HTTPS_PROXY="" HTTP_PROXY="" https_proxy="" http_proxy="" claude

Result: Claude connects successfully

Expected: Both methods should work the same way.

Claude Model

None

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.25

Platform

Other

Operating System

Other Linux

Terminal/Shell

WSL (Windows Subsystem for Linux)

Additional Information

❯ /doctor
Diagnostics └ Currently running: native (2.1.25)
└ Path: /home/<user>/.local/share/claude/versions/2.1.25
└ Invoked: /home/<user>/.local/share/claude/versions/2.1.25
└ Config install method: native
└ Search: OK (bundled)

Updates
└ Auto-updates: enabled
└ Auto-update channel: latest
└ Stable version: 2.1.7
└ Latest version: 2.1.25

Version Locks
└ 2.1.25: PID 180758 (running)

View original on GitHub ↗

13 Comments

github-actions[bot] · 7 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/11660
  2. https://github.com/anthropics/claude-code/issues/14165
  3. https://github.com/anthropics/claude-code/issues/15212

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

CallisteH · 7 months ago

Ok I installed claude from the binary. Maybe the is the problem.. I'm ready to close exept if someone confirms the bug with others installs ?

I will try with npm later and if yes, it's a duplicate of https://github.com/anthropics/claude-code/issues/14165

bhilton · 7 months ago

Confirming I am seeing this as well. Regardless of how it is provided (bash env or settings.json env) versions newer than 2.1.22 do not honor NO_PROXY.

CallisteH · 7 months ago
Confirming I am seeing this as well. Regardless of how it is provided (bash env or settings.json env) versions newer than 2.1.22 do not honor NO_PROXY.

Do you have Claude's installation via the binary? Or npm ?

bhilton · 7 months ago
> Confirming I am seeing this as well. Regardless of how it is provided (bash env or settings.json env) versions newer than 2.1.22 do not honor NO_PROXY. Do you have Claude's installation via the binary? Or npm ?

This is the binary install. It is affecting everyone on our team.

bhilton · 7 months ago
> > Confirming I am seeing this as well. Regardless of how it is provided (bash env or settings.json env) versions newer than 2.1.22 do not honor NO_PROXY. > > > Do you have Claude's installation via the binary? Or npm ? This is the binary install. It is affecting everyone on our team.

The issue is still present with the recently released 2.1.29, FYI.

CallisteH · 6 months ago

ok thanks for your reply @bhilton
So for now the workaround is to run claude with env vars in the command directly

HTTPS_PROXY="" HTTP_PROXY="" https_proxy="" http_proxy="" NO_PROXY="*" claude

bhilton · 6 months ago
ok thanks for your reply @bhilton So for now the workaround is to run claude with env vars in the command directly HTTPS_PROXY="" HTTP_PROXY="" https_proxy="" http_proxy="" NO_PROXY="*" claude

Sorry, I think this Issue may be discussing two different problems.

  1. settings.json may not support disabling proxy settings such as HTTP_PROXY by setting them to the empty string (not an issue that is affecting me, but may be real)
  2. NO_PROXY does not work anymore regardless of how I supply it (env var, settings.json, direct from the cli as you typed - which is actually just setting an env var anyway). Our team has had to remain on 2.1.22 in order to use NO_PROXY.
saidelike · 6 months ago
primerano · 6 months ago

Are people still seeing this on 2.1.38+?

2.1.38 fixed one proxy issue for me but I still need to set env variables before running the Claude binary to ensure everything works.

I think the problem is that some underlying libraries will read the proxy variables when Claude starts up and those libraries are not impacted by the changes that Claude Code makes based on the settings.json envs. They already set their internal variables for the proxy and won't reload from the environment.

saidelike · 6 months ago

I don't have this problem anymore (claude 2.1.62)

github-actions[bot] · 5 months ago

Closing for now — inactive for too long. Please open a new issue if this is still relevant.

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