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

Resolved 💬 13 comments Opened Jan 30, 2026 by CallisteH 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 ↗

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