[BUG] Claude code seems to set proxy for commands in the "excludedCommands" sandbox settings

Resolved 💬 5 comments Opened Nov 22, 2025 by ed-irl Closed Jan 27, 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?

It appears that Claude Code sets proxy mode (I assume via environment variables) for commands that are excluded from sandboxing via the excludedCommands setting. I only observe this when sandboxing is enabled. I have to disable the sandbox to be able to use these commands if I don't want them using the proxy.

This is not generally a problem, but I have some code that requires a https connection and throws an error if an http proxy is enabled.

What Should Happen?

Claude code should not set the proxy for commands in the sandbox excluded list when the sandbox is enabled.

Alternatively, it could manage a local self-signed certificate and run the proxy as https.

Error Messages/Logs

Steps to Reproduce

  • Turn on sandbox
  • Add a command that will reject non-https proxies to the excluded list
  • Prompt claude code to run the command
  • The command will fail

Claude Model

Sonnet (default)

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

2.0.50 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

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