claude-code - 💡(How to fix) Fix Cowork: "Failed to create bridge sockets after 5 attempts" on every new task (Claude Desktop 1.3036.0, Claude Code 2.1.111, macOS 26.3.1 ARM) [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#49369Fetched 2026-04-17 08:43:05
View on GitHub
Comments
1
Participants
2
Timeline
9
Reactions
0
Author
Participants
Timeline (top)
labeled ×4cross-referenced ×3closed ×1commented ×1

Every new cowork task fails within ~1 second of spawn with:

Error: Failed to create bridge sockets after 5 attempts

This looks related to #19503 (resume-only bug) and #23746 (1.1.2156 regression, closed as duplicate), but my repro differs: new tasks, not resumes, and allowedDomains=23 — so neither root cause there matches. Still happening on the latest Claude Desktop.

Error Message

Error: Failed to create bridge sockets after 5 attempts

Root Cause

This looks related to #19503 (resume-only bug) and #23746 (1.1.2156 regression, closed as duplicate), but my repro differs: new tasks, not resumes, and allowedDomains=23 — so neither root cause there matches. Still happening on the latest Claude Desktop.

Code Example

Error: Failed to create bridge sockets after 5 attempts

---

[Spawn:config] Creating spawn function for process=compassionate-wonderful-wozniak,
  isResume=false, mounts=7 (outputs, .claude, .claude/skills, .cowork-lib,
  .cowork-perm-req, .cowork-perm-resp, uploads), allowedDomains=23
[Spawn:create] ... cmd=/usr/local/bin/claude args=... --permission-prompt-tool stdio
  --allow-dangerously-skip-permissions ... cwd=/sessions/compassionate-wonderful-wozniak
[Spawn:vm] OAuth token approved with MITM proxy
[Spawn:vm] Spawn succeeded in 45ms
[vm-stderr ...] Error: Failed to create bridge sockets after 5 attempts
[Process:...] Exited, code=1, signal=null, duration=948ms, oom=false
RAW_BUFFERClick to expand / collapse

Summary

Every new cowork task fails within ~1 second of spawn with:

Error: Failed to create bridge sockets after 5 attempts

This looks related to #19503 (resume-only bug) and #23746 (1.1.2156 regression, closed as duplicate), but my repro differs: new tasks, not resumes, and allowedDomains=23 — so neither root cause there matches. Still happening on the latest Claude Desktop.

Environment

  • Claude Desktop: 1.3036.0
  • Claude Code (in-VM SDK): 2.1.111 (sha256 prefix 99376866bf7ec367)
  • macOS: 26.3.1 (ARM64 / Apple Silicon)
  • VM bundle version: 5680b11bcdab215cccf07e0c0bd1bd9213b0c25d

Repro

  1. Open Claude Desktop.
  2. Start a brand-new cowork task (no resume).
  3. Task exits ~1s later with the bridge-sockets error.

Reproduces 100% of the time across 5+ fresh VM boots.

Log evidence

From ~/Library/Logs/Claude/cowork_vm_node.log:

[Spawn:config] Creating spawn function for process=compassionate-wonderful-wozniak,
  isResume=false, mounts=7 (outputs, .claude, .claude/skills, .cowork-lib,
  .cowork-perm-req, .cowork-perm-resp, uploads), allowedDomains=23
[Spawn:create] ... cmd=/usr/local/bin/claude args=... --permission-prompt-tool stdio
  --allow-dangerously-skip-permissions ... cwd=/sessions/compassionate-wonderful-wozniak
[Spawn:vm] OAuth token approved with MITM proxy
[Spawn:vm] Spawn succeeded in 45ms
[vm-stderr ...] Error: Failed to create bridge sockets after 5 attempts
[Process:...] Exited, code=1, signal=null, duration=948ms, oom=false

VM side (coworkd.log) shows clean boot: gvisor network up, static IP assigned, MITM proxy started on /var/run/mitm-proxy.sock, OAuth token approved. Failure is entirely inside the spawned claude process.

Root of the error is Claude Code's own sandbox bridge setup (u57() in the bundled JS) — it spawns two socat processes for HTTP/SOCKS unix-to-TCP bridges at /tmp/claude-http-*.sock and /tmp/claude-socks-*.sock and polls 5× for them to appear. They never do.

What I've tried (no change)

  • Full quit + relaunch of Claude Desktop
  • Multiple fresh VM boots
  • Removing /tmp/claude-* on host
  • Confirmed new tasks only, no resume
  • Deleted `~/Library/Application Support/Claude/claude-code-vm/` (forces SDK re-download)
  • Deleted `~/Library/Application Support/Claude/vm_bundles/` (forces full rootfs re-download)

Neither reset changed anything — fails identically after re-download.

Happy to grab further diagnostics if there's something specific you'd like me to run inside the VM.

extent analysis

TL;DR

The issue is likely related to the sandbox bridge setup in Claude Code, where the socat processes for HTTP/SOCKS unix-to-TCP bridges are not being created, causing the "Failed to create bridge sockets" error.

Guidance

  • Investigate the u57() function in the bundled JS to understand the bridge setup process and why the socat processes are not being created.
  • Check the permissions and ownership of the /tmp directory to ensure that the claude process has the necessary permissions to create the socket files.
  • Verify that the socat command is installed and functional within the VM, as it is required for the bridge setup.
  • Consider adding additional logging or debugging statements to the u57() function to gain more insight into the issue.

Example

No code snippet is provided as the issue is related to a specific function (u57()) in the bundled JS, which is not publicly available.

Notes

The issue seems to be specific to the Claude Code's sandbox bridge setup and the socat processes. The fact that the error occurs only with new tasks and not with resumes, and that the allowedDomains=23 setting is mentioned, suggests that there might be a configuration or permission issue at play.

Recommendation

Apply a workaround by investigating the u57() function and the bridge setup process to identify the root cause of the issue, as the problem seems to be specific to the Claude Code's implementation.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix Cowork: "Failed to create bridge sockets after 5 attempts" on every new task (Claude Desktop 1.3036.0, Claude Code 2.1.111, macOS 26.3.1 ARM) [1 comments, 2 participants]