[BUG] `Bash` network requests silently fail when no `WebFetch(domain:*)` permissions are configured - proxy not initialized

Resolved 💬 3 comments Opened Jan 17, 2026 by remijnoel-at Closed Jan 20, 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?

Network requests made via Bash (e.g., curl) silently fail with DNS resolution errors when no WebFetch(domain:xxx) permissions are configured in project settings. The sandbox is active but the HTTP/HTTPS proxy is not initialized, causing all network traffic to be blocked by Seatbelt without any user prompt or clear error message.

  • Claude Code version: 2.1.9
  • OS: macOS (Seatbelt sandbox)
  • Managed config: Yes (enterprise deployment)

What Should Happen?

When sandbox is enabled, network requests should either:

  1. Trigger a permission prompt for unknown domains, OR
  2. Fail with a clear error message explaining that network access requires more permissions

Error Messages/Logs

Network requests fail silently with generic DNS errors (`Could not resolve host`), with no indication that the proxy wasn't initialized.

Steps to Reproduce

# Project A: WITH WebFetch permission (proxy will be initialized)
mkdir -p "$REPRO_DIR/project-with-webfetch/.claude"
cat > "$REPRO_DIR/project-with-webfetch/.claude/settings.local.json" << 'EOF'
{
  "permissions": {
    "allow": [
      "WebFetch(domain:example.com)"
    ]
  }
}
EOF

# Project B: WITHOUT WebFetch permission (proxy will NOT be initialized)
mkdir -p "$REPRO_DIR/project-without-webfetch/.claude"
cat > "$REPRO_DIR/project-without-webfetch/.claude/settings.local.json" << 'EOF'
{
  "permissions": {
    "allow": [
      "Bash(curl:*)"
    ]
  }
}
EOF

Project Configurations

Project A: project-with-webfetch/.claude/settings.local.json

{
  "permissions": {
    "allow": [
      "WebFetch(domain:example.com)"
    ]
  }
}

Project B: project-without-webfetch/.claude/settings.local.json

{
  "permissions": {
    "allow": [
      "Bash(curl:*)"
    ]
  }
}

Test Commands

# Test Project A (WITH WebFetch permission)
cd "$REPRO_DIR/project-with-webfetch"
claude -p "run: env | grep PROXY" --allowedTools "Bash(env:*)"
# Expected: HTTP_PROXY, HTTPS_PROXY, etc. are SET

# Test Project B (WITHOUT WebFetch permission)
cd "$REPRO_DIR/project-without-webfetch"
claude -p "run: env | grep PROXY" --allowedTools "Bash(env:*)"
# Expected: NO proxy environment variables

# Test actual network request in Project B
cd "$REPRO_DIR/project-without-webfetch"
claude -p "run: curl -v https://httpbin.org/get" --allowedTools "Bash(curl:*)"
# Expected: Permission prompt
# Actual: "Could not resolve host: httpbin.org" (silent failure)

### Claude Model

Opus

### Is this a regression?

I don't know

### Last Working Version

_No response_

### Claude Code Version

2.1.9 (Claude Code)

### Platform

Anthropic API

### Operating System

macOS

### Terminal/Shell

iTerm2

### Additional Information

_No response_

View original on GitHub ↗

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