claude-code - 💡(How to fix) Fix [BUG] Cowork: Failed to create bridge sockets after 5 attempts on every task [3 comments, 3 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#49349Fetched 2026-04-17 08:43:43
View on GitHub
Comments
3
Participants
3
Timeline
17
Reactions
1
Author
Timeline (top)
cross-referenced ×9labeled ×4commented ×3closed ×1

Error Message

Error surfaced in UI: Claude Code process exited with code 1

Underlying error from ~/Library/Logs/Claude/cowork_vm_node.log:

2026-04-16 14:23:05 [info] [Spawn:create] id=d26112e8-d6de-403c-99f7-1ae26f2b133c name=tender-kind-hypatia 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 ... 2026-04-16 14:23:05 [info] [Spawn:vm] id=d26112e8-d6de-403c-99f7-1ae26f2b133c OAuth token approved with MITM proxy 2026-04-16 14:23:05 [info] [Process:d26112e8-d6de-403c-99f7-1ae26f2b133c] Spawn confirmed, flushing 2 buffered stdin chunks 2026-04-16 14:23:05 [info] [Spawn:vm] id=d26112e8-d6de-403c-99f7-1ae26f2b133c Spawn succeeded in 174ms 2026-04-16 14:23:06 [warn] [vm-stderr d26112e8] Error: Failed to create bridge sockets after 5 attempts 2026-04-16 14:23:06 [info] [Process:d26112e8-d6de-403c-99f7-1ae26f2b133c] Exited, code=1, signal=null, duration=1268ms, oom=false 2026-04-16 14:23:06 [info] [Process:d26112e8-d6de-403c-99f7-1ae26f2b133c] Cleaned up, remaining active=0

VM startup log (completes successfully before the bridge socket failure): 2026-04-16 14:23:02 [info] [VM] Network status: CONNECTED 2026-04-16 14:23:04 [info] [VM] API reachability: REACHABLE 2026-04-16 14:23:04 [info] [VM:start] Startup complete, total time: 9171ms

Root Cause

Not sure if that's the same root cause or a separate VM networking issue.

Code Example

Error surfaced in UI:
Claude Code process exited with code 1

Underlying error from ~/Library/Logs/Claude/cowork_vm_node.log:

2026-04-16 14:23:05 [info] [Spawn:create] id=d26112e8-d6de-403c-99f7-1ae26f2b133c name=tender-kind-hypatia 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 ...
2026-04-16 14:23:05 [info] [Spawn:vm] id=d26112e8-d6de-403c-99f7-1ae26f2b133c OAuth token approved with MITM proxy
2026-04-16 14:23:05 [info] [Process:d26112e8-d6de-403c-99f7-1ae26f2b133c] Spawn confirmed, flushing 2 buffered stdin chunks
2026-04-16 14:23:05 [info] [Spawn:vm] id=d26112e8-d6de-403c-99f7-1ae26f2b133c Spawn succeeded in 174ms
2026-04-16 14:23:06 [warn] [vm-stderr d26112e8] Error: Failed to create bridge sockets after 5 attempts
2026-04-16 14:23:06 [info] [Process:d26112e8-d6de-403c-99f7-1ae26f2b133c] Exited, code=1, signal=null, duration=1268ms, oom=false
2026-04-16 14:23:06 [info] [Process:d26112e8-d6de-403c-99f7-1ae26f2b133c] Cleaned up, remaining active=0

VM startup log (completes successfully before the bridge socket failure):
2026-04-16 14:23:02 [info] [VM] Network status: CONNECTED
2026-04-16 14:23:04 [info] [VM] API reachability: REACHABLE
2026-04-16 14:23:04 [info] [VM:start] Startup complete, total time: 9171ms
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?

Cowork fails on every new task — including trivial ones like "what is 2+2" — with the error:

Error: Failed to create bridge sockets after 5 attempts Claude Code process exited with code 1

The crash happens immediately after process spawn, with a duration of ~900–1300ms. It affects both manually started tasks and scheduled tasks (my weekly scheduled task has been failing in the background as well).

Related to #23746 and #19503, which describe the same error.

Log excerpt from ~/Library/Logs/Claude/cowork_vm_node.log:

2026-04-16 14:23:05 [info] [Spawn:create] id=d26112e8-d6de-403c-99f7-1ae26f2b133c name=tender-kind-hypatia cmd=/usr/local/bin/claude args=--output-format stream-json --verbose --input-format stream-json ... 2026-04-16 14:23:05 [info] [Spawn:vm] id=d26112e8-d6de-403c-99f7-1ae26f2b133c OAuth token approved with MITM proxy 2026-04-16 14:23:05 [info] [Process:d26112e8-d6de-403c-99f7-1ae26f2b133c] Spawn confirmed, flushing 2 buffered stdin chunks 2026-04-16 14:23:05 [info] [Spawn:vm] id=d26112e8-d6de-403c-99f7-1ae26f2b133c Spawn succeeded in 174ms 2026-04-16 14:23:06 [warn] [vm-stderr d26112e8] Error: Failed to create bridge sockets after 5 attempts 2026-04-16 14:23:06 [info] [Process:d26112e8-d6de-403c-99f7-1ae26f2b133c] Exited, code=1, signal=null, duration=1268ms, oom=false

VM startup itself succeeds — network is CONNECTED, API reachability is REACHABLE, SDK installs fine. The failure is specifically in the bridge socket creation step inside the VM, right after Claude Code spawns.

One earlier scheduled run also failed with a different but likely related error:

API Error: 587 {"error":"coworkd_upstream_failed","category":"dns_failure","detail":"dial tcp: lookup api.anthropic.com on 172.16.10.1:53: no such host"}

Not sure if that's the same root cause or a separate VM networking issue.

What Should Happen?

Cowork tasks should execute successfully. A new task with a trivial prompt like "what is 2+2" should return a response, not crash with "Claude Code process exited with code 1".

Error Messages/Logs

Error surfaced in UI:
Claude Code process exited with code 1

Underlying error from ~/Library/Logs/Claude/cowork_vm_node.log:

2026-04-16 14:23:05 [info] [Spawn:create] id=d26112e8-d6de-403c-99f7-1ae26f2b133c name=tender-kind-hypatia 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 ...
2026-04-16 14:23:05 [info] [Spawn:vm] id=d26112e8-d6de-403c-99f7-1ae26f2b133c OAuth token approved with MITM proxy
2026-04-16 14:23:05 [info] [Process:d26112e8-d6de-403c-99f7-1ae26f2b133c] Spawn confirmed, flushing 2 buffered stdin chunks
2026-04-16 14:23:05 [info] [Spawn:vm] id=d26112e8-d6de-403c-99f7-1ae26f2b133c Spawn succeeded in 174ms
2026-04-16 14:23:06 [warn] [vm-stderr d26112e8] Error: Failed to create bridge sockets after 5 attempts
2026-04-16 14:23:06 [info] [Process:d26112e8-d6de-403c-99f7-1ae26f2b133c] Exited, code=1, signal=null, duration=1268ms, oom=false
2026-04-16 14:23:06 [info] [Process:d26112e8-d6de-403c-99f7-1ae26f2b133c] Cleaned up, remaining active=0

VM startup log (completes successfully before the bridge socket failure):
2026-04-16 14:23:02 [info] [VM] Network status: CONNECTED
2026-04-16 14:23:04 [info] [VM] API reachability: REACHABLE
2026-04-16 14:23:04 [info] [VM:start] Startup complete, total time: 9171ms

Steps to Reproduce

  1. Open Claude Desktop
  2. Switch to Cowork
  3. Start a new task with any prompt (e.g. "what is 2+2")
  4. Task immediately fails with "Something went wrong — Claude Code process exited with code 1"
  5. Same error on every retry, every new task, regardless of prompt content

Claude Model

Not sure / Multiple models

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

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

What I tried:

  • Reinstalled Claude Desktop entirely
  • Deleted the Cowork VM bundle (rm -rf ~/Library/Application Support/Claude/vm_bundles) and let it re-download/rebuild
  • Verified TMPDIR is set and writable
  • Installed socat on host via Homebrew (brew install socat)
  • Symlinked /opt/homebrew/bin/socat → /usr/local/bin/socat
  • Fully quit and relaunched Claude between each attempt
  • Switched from Legacy Model to Opus 4.7

None of these resolved the bridge socket creation failure. The error appears to originate inside the VM sandbox, not on the host.

extent analysis

TL;DR

The most likely fix for the "Failed to create bridge sockets after 5 attempts" error in Claude Code is to investigate and resolve the underlying networking issue within the VM, potentially related to DNS resolution or socket creation.

Guidance

  1. Verify DNS resolution: Check if the DNS server 172.16.10.1:53 is reachable and functioning correctly, as the error message suggests a DNS failure.
  2. Investigate VM networking: Since the error occurs within the VM sandbox, inspect the VM's network configuration and ensure it is properly connected to the host and the external network.
  3. Check socket creation: Look into the specifics of socket creation within the VM and how it interacts with the host, as the error message specifically mentions bridge socket creation failure.
  4. Review related issues: Examine the related issues #23746 and #19503 for any potential clues or fixes that might apply to this scenario.

Example

No specific code snippet can be provided without more context, but ensuring that the DNS server is correctly configured and reachable might involve checking the VM's network settings or the host's DNS configuration.

Notes

The exact cause of the issue is unclear, and more investigation is needed to determine the root cause. The provided information suggests a networking issue within the VM, but without further details, it's challenging to provide a definitive fix.

Recommendation

Apply a workaround by investigating and potentially adjusting the DNS resolution or socket creation within the VM, as the error seems to be related to these aspects. This approach is chosen because the issue appears to be specific to the VM's networking configuration, and adjusting these settings might resolve the bridge socket creation failure.

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