Skip to content

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

Description

@dfaivre-pcs

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions