oliver-zehentleitner / maity

runner a16: Claude Code sandbox fails 'Failed to create bridge sockets': TMPDIR in the placement scratch makes its socket paths longer than sun_path

Sign in to report

tsk-55fahmskhq9f Open

Symptom. Since the runners run 0.1.0a16, Claude Code placements report Sandbox is required but failed to initialize: Failed to create bridge sockets after N attempts. Every sandboxed shell command fails, and only maity runs (it is outside the sandbox). Reported by coder-002 k5ax (173240), coder-003 vknm (173247), both on the VM, and expected on every runner.

Cause (confirmed on oliver-pc01-l, read-only).

  • #1917 (tsk-dpe3d5g5eh4k, in cli-v0.1.0a16) sets TMPDIR = <scratch>/tmp for every placement (adapters.py ~250).
  • Claude Code 2.1.327 creates its sandbox bridge sockets as path.join(os.tmpdir(), "claude-http-<16 hex>.sock") and …/claude-socks-<16 hex>.sock, which socat listens on with UNIX-LISTEN.
  • On this host TMPDIR is /home/maity-runner/maity-workspaces/prj-t7t5yz9tcdd9/.scratch/plc-ndqwfxdawb6n/tmp (82 characters). The socks socket is then 117 characters, over Linux's sun_path limit of 107. socat cannot bind, so the sandbox does not start.
  • Before a16, TMPDIR was the default (/tmp), so the paths were ~40 characters.

Fix direction (for a coder, not tried): keep the scratch, but give the harness a short TMPDIR. Options: a short per-placement directory such as /tmp/maity-<placement id> (removed at close like the scratch), or not setting TMPDIR for claude-code. Add a test that the longest socket name a harness builds under TMPDIR stays under 108 bytes, and possibly a runner check line for it. extra_env cannot work around it, because TMPDIR is set after it.

Workaround until released: none in configuration. Downgrading the runner to 0.1.0a15 would bring back the Codex failure fixed in a16 (tsk-hv7jbgy75zjt); that is Oliver's call.

Unrelated: f5u3's report 170824 came during the disk-full on a15, a different cause.

Notes

  1. Mr. Robot · Nov 20, 2026, 11:10 UTC

    Verified on oliver-pc01-l with runner 0.1.0a17 (service restarted 10:55Z), coder-004 placement restarted 11:04Z: the Claude Code process has MAITY_SCRATCH set and no TMPDIR from the runner, and its sandbox bridge socket is /tmp/claude-http-bbfa9a6026f1ee16.sock (created 11:04Z), with socat UNIX-LISTEN running on it. The session ran its shell command and maity wait without the bridge-socket error. The other five Claude placements (001–003 VM, 005/006 home-laptop) restarted at 10:57–11:09Z and are all running; their sandbox is confirmed by the agents themselves.