[BUG] Desktop app sandbox network proxy ignores sandbox.network.allowedDomains from project .claude/settings.json, while CLI honors it correctly

Status Open
Reported on v2.1.220
Maintainer reply None cached
Activity 0 comments · opened Jul 30, 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?

I am seeing a problem with whitelisting hosts to be used by scripts running in the sandbox. What seems clearly wrong is that the behavior differs between the Claude Code CLI and the Claude desktop app (in the Code tab). This seems related to #37970 but is manifesting in Code rather than Cowork.

Claude prepared the following report, which I slightly edited for full accuracy.

-----

Environment: macOS (Darwin 25.5.0), Claude Code desktop app vs. CLI, same repo/session directory, tested after a full reboot.

Config in .claude/settings.json (project-level):

{
  "sandbox": {
    "network": {
      "allowedDomains": ["dblp.org", "api.sam.gov"]
    }
  }
}

No managed-settings.json present anywhere on the machine. ~/.claude/settings.json has no sandbox key.

What Should Happen?

Desktop app and CLI should resolve sandbox.network.allowedDomains identically from the same project settings file.

Actual: Desktop app's sandbox proxy blocks domains explicitly listed in the project allowlist; CLI allows them.

Error Messages/Logs

Steps to Reproduce

Open the same project in the desktop app and in the terminal claude CLI.
In the CLI, curl https://api.sam.gov/... succeeds — the domain is reachable through its sandbox proxy.
In the desktop app (same repo, same settings files, post-reboot, fresh proxy process each time — proxy port/auth token differs between attempts), the identical curl command fails:

< HTTP/1.1 403 Forbidden
< X-Proxy-Error: blocked-by-allowlist

This reproduces even for dblp.org, a domain that predates the session and was never edited during troubleshooting — ruling out a settings-file typo or a stale/orphaned process (proxy port changes each app relaunch/reboot).

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.220

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗