claude-code - 💡(How to fix) Fix [BUG] Cowork: "Failed to create bridge sockets after 5 attempts" on every session — macOS 26.4.1, Desktop 1.3036.0 [5 comments, 6 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#49374Fetched 2026-04-17 08:42:56
View on GitHub
Comments
5
Participants
6
Timeline
23
Reactions
1
Timeline (top)
cross-referenced ×10commented ×5labeled ×4subscribed ×3

Error Message

[vm-stderr] Error: Failed to create bridge sockets after 5 attempts 2026-04-16 21:55:55 [warn] [vm-stderr 0b751b7d] Error: Failed to create bridge sockets after 5 attempts

  • #23746 — same error signature after a Desktop auto-update; reporter's troubleshooting (socat install, TMPDIR cleanup, Mac restart) also did not resolve it
  • #19503 — same error on resume sessions, attributed to allowedDomains=0; in my case allowedDomains=24 and new sessions fail too
  • #11079 — same error on Linux due to TMPDIR; ruled out here (TMPDIR is fine)

Error Messages/Logs

[vm-stderr] Error: Failed to create bridge sockets after 5 attempts 2026-04-16 21:55:55 [warn] [vm-stderr 0b751b7d] Error: Failed to create bridge sockets after 5 attempts

  • #23746 — same error signature after a Desktop auto-update; reporter's troubleshooting (socat install, TMPDIR cleanup, Mac restart) also did not resolve it
  • #19503 — same error on resume sessions, attributed to allowedDomains=0; in my case allowedDomains=24 and new sessions fail too
  • #11079 — same error on Linux due to TMPDIR; ruled out here (TMPDIR is fine)
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

Preflight Checklist

  • I have searched existing issues and the closest match (#23746) is for a different version
  • This is a single bug report
  • I am using the latest version of Claude Desktop

Environment

  • Claude Desktop: 1.3036.0 (cf521c) 2026-04-16T16:17:33.000Z
  • OS: macOS 26.4.1 (25E253)
  • Architecture: arm64 (Apple Silicon)
  • Embedded Claude Code SDK: 2.1.111
  • VM bundle: 5680b11bcdab215cccf07e0c0bd1bd9213b0c25d
  • socat: 1.8.1.1 installed at /opt/homebrew/bin/socat and symlinked to /usr/local/bin/socat
  • TMPDIR: exists, writable (/var/folders/hb/.../T/)

What's Wrong

Every Cowork session — both new and resumed — crashes immediately after spawn with exit code 1. The VM boots successfully, the guest connects, the API is reachable, the SDK installs, and the claude process spawns inside the VM. Then ~1 second later it dies with:

[vm-stderr] Error: Failed to create bridge sockets after 5 attempts [Process] Exited, code=1, signal=null, duration=~1000ms, oom=false

The failure is 100% reproducible. Every spawn attempt fails identically.

Reproduction

  1. Open Claude Desktop 1.3036.0 on macOS 26.4.1 (Apple Silicon)
  2. Start any new Cowork session OR resume any existing session
  3. Send any message
  4. Session crashes within ~1 second with "Claude Code process exited with code 1" in the UI

Relevant log excerpt — cowork_vm_node.log

2026-04-16 21:55:41 [info] [VM:start] Beginning startup, bundlePath=.../vm_bundles/claudevm.bundle 2026-04-16 21:55:41 [info] [VM:start] Bundle version: 5680b11bcdab215cccf07e0c0bd1bd9213b0c25d 2026-04-16 21:55:41 [info] [VM:steps] vm_boot completed (101ms) 2026-04-16 21:55:45 [info] [VM:steps] guest_vsock_connect completed (4780ms) 2026-04-16 21:55:46 [info] [VM] Network status: CONNECTED 2026-04-16 21:55:47 [info] [VM] API reachability: REACHABLE 2026-04-16 21:55:47 [info] [VM:start] Startup complete, total time: 6137ms 2026-04-16 21:55:54 [info] [Spawn:create] id=0b751b7d-... name=practical-inspiring-allen cmd=/usr/local/bin/claude args=--output-format stream-json --verbose --input-format stream-json --max-thinking-tokens 31999 --effort medium --model claude-opus-4-7[1m] --permission-prompt-tool stdio ... cwd=/sessions/practical-inspiring-allen 2026-04-16 21:55:54 [info] [Spawn:vm] id=0b751b7d-... OAuth token approved with MITM proxy 2026-04-16 21:55:54 [info] [Spawn:vm] id=0b751b7d-... Spawn succeeded in 65ms 2026-04-16 21:55:55 [warn] [vm-stderr 0b751b7d] Error: Failed to create bridge sockets after 5 attempts 2026-04-16 21:55:55 [info] [Process:0b751b7d-...] Exited, code=1, signal=null, duration=971ms, oom=false

CycleHealth output (from main.log)

cycle_health: 'unhealthy', had_first_response: false, seconds_to_outcome: 2, unhealthy_reason: 'system_error', error_message: 'Claude Code process exited with code 1', error_category: 'process_crashed'

Troubleshooting Already Attempted (none resolved the issue)

  • Full quit (Cmd+Q) and relaunch — multiple times
  • Started fresh new sessions (not just resumes)
  • Tried different working folders
  • Cleared ~/Library/Application Support/Claude/claude-code-vm and ~/Library/Application Support/Claude/vm_bundles (both re-downloaded cleanly)
  • Killed all Claude/claude-code/vzgvisor processes before relaunch
  • Installed socat 1.8.1.1 via Homebrew
  • Symlinked /opt/homebrew/bin/socat to /usr/local/bin/socat (since GUI apps don't inherit shell PATH and launchctl getenv PATH returns empty)
  • Verified TMPDIR exists and is writable
  • Checked for stale socket files in /tmp and $TMPDIR — none present that would conflict

Expected Behavior

Cowork sessions should spawn the guest claude process and respond to messages, as in previous Desktop versions.

Actual Behavior

Every spawn fails ~1 second after Spawn succeeded with Failed to create bridge sockets after 5 attempts from vm-stderr. The claude binary inside the guest VM appears unable to create its sandbox bridge sockets, regardless of host-side socat availability.

Possibly Related Issues

  • #23746 — same error signature after a Desktop auto-update; reporter's troubleshooting (socat install, TMPDIR cleanup, Mac restart) also did not resolve it
  • #19503 — same error on resume sessions, attributed to allowedDomains=0; in my case allowedDomains=24 and new sessions fail too
  • #11079 — same error on Linux due to TMPDIR; ruled out here (TMPDIR is fine)
  • #46029 — most recent Cowork "exited with code 1" regression on Windows (1.1617.0)

The pattern of Desktop updates introducing this exact failure mode appears to be recurring.

Notes

  • The Claude binary inside the guest VM (per vm-stderr) is the source of the failure, not host-side socat
  • 5-retry bridge socket creation should probably emit what it tried to create and why it failed (errno, path) rather than just the retry count, to make this debuggable

What Should Happen?

<img width="537" height="353" alt="Image" src="https://github.com/user-attachments/assets/6b20c73a-15dc-40ad-a504-18447bcc6b27" />

Error Messages/Logs

Steps to Reproduce

Preflight Checklist

  • I have searched existing issues and the closest match (#23746) is for a different version
  • This is a single bug report
  • I am using the latest version of Claude Desktop

Environment

  • Claude Desktop: 1.3036.0 (cf521c) 2026-04-16T16:17:33.000Z
  • OS: macOS 26.4.1 (25E253)
  • Architecture: arm64 (Apple Silicon)
  • Embedded Claude Code SDK: 2.1.111
  • VM bundle: 5680b11bcdab215cccf07e0c0bd1bd9213b0c25d
  • socat: 1.8.1.1 installed at /opt/homebrew/bin/socat and symlinked to /usr/local/bin/socat
  • TMPDIR: exists, writable (/var/folders/hb/.../T/)

What's Wrong

Every Cowork session — both new and resumed — crashes immediately after spawn with exit code 1. The VM boots successfully, the guest connects, the API is reachable, the SDK installs, and the claude process spawns inside the VM. Then ~1 second later it dies with:

[vm-stderr] Error: Failed to create bridge sockets after 5 attempts [Process] Exited, code=1, signal=null, duration=~1000ms, oom=false

The failure is 100% reproducible. Every spawn attempt fails identically.

Reproduction

  1. Open Claude Desktop 1.3036.0 on macOS 26.4.1 (Apple Silicon)
  2. Start any new Cowork session OR resume any existing session
  3. Send any message
  4. Session crashes within ~1 second with "Claude Code process exited with code 1" in the UI

Relevant log excerpt — cowork_vm_node.log

2026-04-16 21:55:41 [info] [VM:start] Beginning startup, bundlePath=.../vm_bundles/claudevm.bundle 2026-04-16 21:55:41 [info] [VM:start] Bundle version: 5680b11bcdab215cccf07e0c0bd1bd9213b0c25d 2026-04-16 21:55:41 [info] [VM:steps] vm_boot completed (101ms) 2026-04-16 21:55:45 [info] [VM:steps] guest_vsock_connect completed (4780ms) 2026-04-16 21:55:46 [info] [VM] Network status: CONNECTED 2026-04-16 21:55:47 [info] [VM] API reachability: REACHABLE 2026-04-16 21:55:47 [info] [VM:start] Startup complete, total time: 6137ms 2026-04-16 21:55:54 [info] [Spawn:create] id=0b751b7d-... name=practical-inspiring-allen cmd=/usr/local/bin/claude args=--output-format stream-json --verbose --input-format stream-json --max-thinking-tokens 31999 --effort medium --model claude-opus-4-7[1m] --permission-prompt-tool stdio ... cwd=/sessions/practical-inspiring-allen 2026-04-16 21:55:54 [info] [Spawn:vm] id=0b751b7d-... OAuth token approved with MITM proxy 2026-04-16 21:55:54 [info] [Spawn:vm] id=0b751b7d-... Spawn succeeded in 65ms 2026-04-16 21:55:55 [warn] [vm-stderr 0b751b7d] Error: Failed to create bridge sockets after 5 attempts 2026-04-16 21:55:55 [info] [Process:0b751b7d-...] Exited, code=1, signal=null, duration=971ms, oom=false

CycleHealth output (from main.log)

cycle_health: 'unhealthy', had_first_response: false, seconds_to_outcome: 2, unhealthy_reason: 'system_error', error_message: 'Claude Code process exited with code 1', error_category: 'process_crashed'

Troubleshooting Already Attempted (none resolved the issue)

  • Full quit (Cmd+Q) and relaunch — multiple times
  • Started fresh new sessions (not just resumes)
  • Tried different working folders
  • Cleared ~/Library/Application Support/Claude/claude-code-vm and ~/Library/Application Support/Claude/vm_bundles (both re-downloaded cleanly)
  • Killed all Claude/claude-code/vzgvisor processes before relaunch
  • Installed socat 1.8.1.1 via Homebrew
  • Symlinked /opt/homebrew/bin/socat to /usr/local/bin/socat (since GUI apps don't inherit shell PATH and launchctl getenv PATH returns empty)
  • Verified TMPDIR exists and is writable
  • Checked for stale socket files in /tmp and $TMPDIR — none present that would conflict

Expected Behavior

Cowork sessions should spawn the guest claude process and respond to messages, as in previous Desktop versions.

Actual Behavior

Every spawn fails ~1 second after Spawn succeeded with Failed to create bridge sockets after 5 attempts from vm-stderr. The claude binary inside the guest VM appears unable to create its sandbox bridge sockets, regardless of host-side socat availability.

Possibly Related Issues

  • #23746 — same error signature after a Desktop auto-update; reporter's troubleshooting (socat install, TMPDIR cleanup, Mac restart) also did not resolve it
  • #19503 — same error on resume sessions, attributed to allowedDomains=0; in my case allowedDomains=24 and new sessions fail too
  • #11079 — same error on Linux due to TMPDIR; ruled out here (TMPDIR is fine)
  • #46029 — most recent Cowork "exited with code 1" regression on Windows (1.1617.0)

The pattern of Desktop updates introducing this exact failure mode appears to be recurring.

Notes

  • The Claude binary inside the guest VM (per vm-stderr) is the source of the failure, not host-side socat
  • 5-retry bridge socket creation should probably emit what it tried to create and why it failed (errno, path) rather than just the retry count, to make this debuggable

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

Claude 1.3036.0 (cf521c) 2026-04-16T16:17:33.000Z

Platform

Other

Operating System

macOS

Terminal/Shell

IntelliJ IDEA terminal

Additional Information

No response

extent analysis

TL;DR

The issue is likely related to the claude binary inside the guest VM failing to create bridge sockets, and a potential workaround could be to investigate and modify the socket creation process or the VM's network configuration.

Guidance

  • Investigate the claude binary's socket creation process to determine why it's failing to create bridge sockets after 5 attempts.
  • Check the VM's network configuration to ensure it's properly set up to allow the claude binary to create bridge sockets.
  • Consider modifying the allowedDomains setting, as issue #19503 suggests this may be related to the problem.
  • Review the vm-stderr logs to see if there are any additional error messages that could provide more insight into the issue.

Example

No code example is provided as the issue is related to a specific binary and VM configuration, and without more information, it's difficult to provide a specific code snippet.

Notes

The issue appears to be related to a regression introduced in a recent Desktop update, and the pattern of this failure mode recurring after updates suggests that there may be an underlying issue with the update process or the claude binary itself.

Recommendation

Apply a workaround by investigating and modifying the socket creation process or the VM's network configuration, as the root cause of the issue is not immediately clear and may require further debugging.

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 [BUG] Cowork: "Failed to create bridge sockets after 5 attempts" on every session — macOS 26.4.1, Desktop 1.3036.0 [5 comments, 6 participants]