[BUG] sandbox.network.allow hosts still prompt for network access

Resolved 💬 2 comments Opened Feb 28, 2026 by dfaivre-pcs Closed Feb 28, 2026

Description

Hosts listed in sandbox.network.allow in project .claude/settings.json are not respected — Claude Code still prompts with the "Network request outside of sandbox" dialog.

Version

Claude Code 2.1.63 (Opus)
Platform: Linux (WSL2), bash

Setup

Project .claude/settings.json:

{
  "sandbox": {
    "enabled": true,
    "autoAllowBashIfSandboxed": true,
    "network": {
      "allow": [
        "api.github.com"
      ]
    }
  }
}

Steps to reproduce

  1. Restart Claude Code (confirmed settings are loaded)
  2. Run any gh CLI command that hits api.github.com (e.g., gh api repos/anthropics/claude-code --jq '.full_name')
  3. Result: Prompted with:

```
Network request outside of sandbox

Host: api.github.com

Do you want to allow this connection?

  1. Yes
  2. Yes, and don't ask again for api.github.com
  3. No, and tell Claude what to do differently (esc)

```

Expected behavior

api.github.com is in sandbox.network.allow — it should be allowed without prompting.

Actual behavior

Prompted every time. Selecting "No" results in Forbidden errors. The allow list has no effect.

View original on GitHub ↗

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