[BUG] sandbox: allowAllUnixSockets does not cover network-bind — tsx and other IPC servers fail with EPERM

Resolved 💬 4 comments Opened Mar 31, 2026 by nicad Closed Jun 1, 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?

npx tsx script.ts inside sandbox fails with Error: listen EPERM: operation not permitted /tmp/tsx-<UID>/<PID>.pipe

this is a problem with allowing named pipes from within the sandbox, nothing but unsandboxing tsx works.

What Should Happen?

Root cause: The generated Seatbelt profile includes socket(AF_UNIX) + connect permissions when allowAllUnixSockets: true, but not network-bind (local unix-socket), which is required for any process that acts as an IPC server (not just a client)
Fix: Add (allow network-bind (local unix-socket)) and (allow network-inbound (local unix-socket)) to the generated profile when allowAllUnixSockets: true
Reference: Codex hit the same issue and fixed it in openai/codex#12702

Error Messages/Logs

Steps to Reproduce

cat > test.ts <<'EOF'
console.log("tsx ok", process.pid)
EOF

configure claude to use its sandbox then: claude -p "run this command: tsx test.ts"

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.88 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

iTerm2

Additional Information

_No response_

View original on GitHub ↗

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