claude-code - 💡(How to fix) Fix [BUG] Failed to create bridge sockets after 5 attempts" — every session exits code 1 on Claude Desktop 1.3036.0 [2 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#49549Fetched 2026-04-17 08:38:00
View on GitHub
Comments
2
Participants
2
Timeline
8
Reactions
0
Timeline (top)
labeled ×5commented ×2closed ×1

Error Message

2026-04-16 14:18:46 [info] [VM:start] Beginning startup, bundlePath=.../vm_bundles/claudevm.bundle 2026-04-16 14:18:46 [info] [VM:start] Bundle version: 5680b11bcdab215cccf07e0c0bd1bd9213b0c25d 2026-04-16 14:18:46 [info] [VM:start] VM instance ID: df123b50-3f2f-41de-9d2e-ca63213f492d 2026-04-16 14:18:49 [info] [VM:steps] download_and_sdk_prepare completed (3184ms) 2026-04-16 14:18:55 [info] [VM] Network status: CONNECTED 2026-04-16 14:18:55 [info] [VM] Guest connection changed: true 2026-04-16 14:18:56 [info] [VM:steps] sdk_install completed (346ms) 2026-04-16 14:18:56 [info] [VM:start] Startup complete, total time: 9704ms 2026-04-16 14:19:06 [info] [VM] API reachability: REACHABLE

2026-04-16 14:22:18 [info] [Spawn:config] Creating spawn function for process=admiring-confident-lamport, isResume=true, mounts=11, allowedDomains=4 2026-04-16 14:22:18 [info] [Spawn:create] 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-6 --permission-prompt-tool stdio --resume 56698465-66c8-41fc-99af-b6ea3db6d54c [plus allowed tools list] --setting-sources=user --permission-mode default --allow-dangerously-skip-permissions --include-partial-messages --plugin-dir /sessions/.../.remote-plugins/plugin_01FH9TqiaHWhhAGSQo7UCTZt --plugin-dir /sessions/.../.remote-plugins/plugin_01MKcJsEAmPJswuCytbMJYZJ --plugin-dir /sessions/.../.remote-plugins/plugin_01XH8yMVJbQydrVkX6WgLvck --replay-user-messages 2026-04-16 14:22:18 [info] [Spawn:vm] OAuth token approved with MITM proxy 2026-04-16 14:22:18 [info] [Spawn:vm] Spawn succeeded in 48ms 2026-04-16 14:22:19 [warn] [vm-stderr] Error: Failed to create bridge sockets after 5 attempts 2026-04-16 14:22:19 [info] [Process] Exited, code=1, signal=null, duration=1050ms, oom=false

Code Example

2026-04-16 14:18:46 [info] [VM:start] Beginning startup, bundlePath=.../vm_bundles/claudevm.bundle
2026-04-16 14:18:46 [info] [VM:start] Bundle version: 5680b11bcdab215cccf07e0c0bd1bd9213b0c25d
2026-04-16 14:18:46 [info] [VM:start] VM instance ID: df123b50-3f2f-41de-9d2e-ca63213f492d
2026-04-16 14:18:49 [info] [VM:steps] download_and_sdk_prepare completed (3184ms)
2026-04-16 14:18:55 [info] [VM] Network status: CONNECTED
2026-04-16 14:18:55 [info] [VM] Guest connection changed: true
2026-04-16 14:18:56 [info] [VM:steps] sdk_install completed (346ms)
2026-04-16 14:18:56 [info] [VM:start] Startup complete, total time: 9704ms
2026-04-16 14:19:06 [info] [VM] API reachability: REACHABLE

2026-04-16 14:22:18 [info] [Spawn:config] Creating spawn function for process=admiring-confident-lamport, 
  isResume=true, mounts=11, allowedDomains=4
2026-04-16 14:22:18 [info] [Spawn:create] 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-6 
  --permission-prompt-tool stdio --resume 56698465-66c8-41fc-99af-b6ea3db6d54c [plus allowed tools list] 
  --setting-sources=user --permission-mode default --allow-dangerously-skip-permissions 
  --include-partial-messages --plugin-dir /sessions/.../.remote-plugins/plugin_01FH9TqiaHWhhAGSQo7UCTZt 
  --plugin-dir /sessions/.../.remote-plugins/plugin_01MKcJsEAmPJswuCytbMJYZJ 
  --plugin-dir /sessions/.../.remote-plugins/plugin_01XH8yMVJbQydrVkX6WgLvck --replay-user-messages
2026-04-16 14:22:18 [info] [Spawn:vm] OAuth token approved with MITM proxy
2026-04-16 14:22:18 [info] [Spawn:vm] Spawn succeeded in 48ms
2026-04-16 14:22:19 [warn] [vm-stderr] Error: Failed to create bridge sockets after 5 attempts
2026-04-16 14:22:19 [info] [Process] Exited, code=1, signal=null, duration=1050ms, oom=false
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?

Every agent session in Claude Desktop fails instantly with exit code 1. The error "Failed to create bridge sockets after 5 attempts" appears in cowork_vm_node.log within ~1 second of process spawn. Affects both new and resumed sessions, scheduled tasks, and manually-triggered agents. Claude Desktop is fully non-functional for agent use. Claude.ai in browser works normally.

What Should Happen?

When I trigger an agent in Claude Desktop (either manually or via a scheduled task), the agent should spawn successfully, establish its sandbox bridge sockets, and begin processing the task — returning output as expected.

Instead, the Claude Code process spawns, then dies within ~1 second with "Failed to create bridge sockets after 5 attempts" and exit code 1 before producing any output. No agent can run.

Expected: Agent sessions start, run to completion, and return results. Actual: Every session exits with code 1 immediately after spawn.

Error Messages/Logs

2026-04-16 14:18:46 [info] [VM:start] Beginning startup, bundlePath=.../vm_bundles/claudevm.bundle
2026-04-16 14:18:46 [info] [VM:start] Bundle version: 5680b11bcdab215cccf07e0c0bd1bd9213b0c25d
2026-04-16 14:18:46 [info] [VM:start] VM instance ID: df123b50-3f2f-41de-9d2e-ca63213f492d
2026-04-16 14:18:49 [info] [VM:steps] download_and_sdk_prepare completed (3184ms)
2026-04-16 14:18:55 [info] [VM] Network status: CONNECTED
2026-04-16 14:18:55 [info] [VM] Guest connection changed: true
2026-04-16 14:18:56 [info] [VM:steps] sdk_install completed (346ms)
2026-04-16 14:18:56 [info] [VM:start] Startup complete, total time: 9704ms
2026-04-16 14:19:06 [info] [VM] API reachability: REACHABLE

2026-04-16 14:22:18 [info] [Spawn:config] Creating spawn function for process=admiring-confident-lamport, 
  isResume=true, mounts=11, allowedDomains=4
2026-04-16 14:22:18 [info] [Spawn:create] 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-6 
  --permission-prompt-tool stdio --resume 56698465-66c8-41fc-99af-b6ea3db6d54c [plus allowed tools list] 
  --setting-sources=user --permission-mode default --allow-dangerously-skip-permissions 
  --include-partial-messages --plugin-dir /sessions/.../.remote-plugins/plugin_01FH9TqiaHWhhAGSQo7UCTZt 
  --plugin-dir /sessions/.../.remote-plugins/plugin_01MKcJsEAmPJswuCytbMJYZJ 
  --plugin-dir /sessions/.../.remote-plugins/plugin_01XH8yMVJbQydrVkX6WgLvck --replay-user-messages
2026-04-16 14:22:18 [info] [Spawn:vm] OAuth token approved with MITM proxy
2026-04-16 14:22:18 [info] [Spawn:vm] Spawn succeeded in 48ms
2026-04-16 14:22:19 [warn] [vm-stderr] Error: Failed to create bridge sockets after 5 attempts
2026-04-16 14:22:19 [info] [Process] Exited, code=1, signal=null, duration=1050ms, oom=false

Steps to Reproduce

  1. Open Claude Desktop (v1.3036.0 on macOS Tahoe 26.3.1, M2)
  2. Trigger any agent session — manually open an agent, or wait for a scheduled task
  3. Observe: session shows "working" briefly, then fails
  4. Check ~/Library/Logs/Claude/cowork_vm_node.log
  5. See "Failed to create bridge sockets after 5 attempts" followed by "Exited, code=1"

Reproduces 100% of the time across:

  • New sessions (isResume=false)
  • Resumed sessions (isResume=true)
  • Scheduled tasks
  • Manual agent launches
  • Fresh binary download (cleared ~/Library/Application Support/Claude/claude-code/)
  • After full macOS reboot

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

Unknown — was working earlier this morning

Claude Code Version

2.1.111

Platform

Other

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

Bug: "Failed to create bridge sockets after 5 attempts" — every agent session exits code 1

Environment

  • Claude Desktop version: 1.3036.0
  • Claude Code binary (bundled): 2.1.111
  • macOS: Tahoe 26.3.1
  • Hardware: MacBook Air M2 (2022, Apple Silicon arm64)
  • Shell: zsh
  • Subscription: [add yours — Pro/Max/Team/Free]

What's broken

Every agent session in Claude Desktop fails instantly with exit code 1, within ~1 second of spawning. Affects BOTH new sessions and resumed sessions, BOTH scheduled tasks and manual agents. No agent can run at all.

Error (from ~/Library/Logs/Claude/cowork_vm_node.log)

[Spawn:vm] OAuth token approved with MITM proxy [Spawn:vm] Spawn succeeded in 48ms [vm-stderr] Error: Failed to create bridge sockets after 5 attempts [Process] Exited, code=1, signal=null, duration=1050ms, oom=false

The VM itself boots cleanly (guest connected, network reachable, SDK installed). The crash happens in the binary's sandbox bridge setup after successful spawn.

Full log excerpt (relevant window)

2026-04-16 14:18:46 [info] [VM:start] Beginning startup, bundle version 5680b11bcdab215cccf07e0c0bd1bd9213b0c25d 2026-04-16 14:18:56 [info] [VM:start] Startup complete, total time: 9704ms 2026-04-16 14:19:06 [info] [VM] API reachability: REACHABLE 2026-04-16 14:22:18 [info] [Spawn:config] Creating spawn function for process=admiring-confident-lamport, isResume=true, mounts=11, allowedDomains=4 2026-04-16 14:22:18 [info] [Spawn:vm] OAuth token approved with MITM proxy 2026-04-16 14:22:18 [info] [Spawn:vm] Spawn succeeded in 48ms 2026-04-16 14:22:19 [warn] [vm-stderr] Error: Failed to create bridge sockets after 5 attempts 2026-04-16 14:22:19 [info] [Process] Exited, code=1, signal=null, duration=1050ms, oom=false

Troubleshooting already performed (none resolved the issue)

  • Cleared ~/Library/Application Support/Claude/claude-code/ — forced fresh binary redownload (same 2.1.111)
  • Cleared ~/Library/Application Support/Claude/claude-code-vm/
  • Cleared stale /tmp/claude-* folders
  • Cleared 13 stale com.anthropic.claudefordesktop.ShipIt.* folders from TMPDIR
  • Cleared claude-hostloop-plugins from TMPDIR
  • Full macOS reboot
  • Verified no ANTHROPIC_API_KEY, ANTHROPIC_BASE_URL, or ANTHROPIC_AUTH_TOKEN env vars set
  • Verified no Claude/Anthropic references in .zshrc, .zshenv, .zprofile, .bash_profile, .bashrc
  • Verified TMPDIR exists and is writable (/var/folders/lz/.../T/)
  • Confirmed local-agent-mode-sessions/ data is intact (213 persisted sessions load correctly)

Related existing issues

  • #19503 — Cowork 'Failed to create bridge sockets' error on session resume
  • #23746 — Failed to create bridge sockets on every new task after auto-update
  • #11079 — Sandbox Error: Failed to create bridge sockets when TMPDIR is non-existent or non-writable (doesn't apply — TMPDIR is fine here)
  • #40540 — Desktop App: Claude Code crashes with exit code 1 - SDK flag incompatibility

Impact

Claude Desktop is completely non-functional for agent use on this machine. Cannot run manual agents, scheduled tasks, or resumed sessions. Claude.ai web works fine — this is specific to Desktop's local agent VM.

Additional context

  • Plugins installed: 3 remote plugins with MCP servers (slack, notion, asana, linear, atlassian, ms365, canva, figma, and others — all being "shadowed with no-ops to prevent SDK double-load" per logs)
  • Fresh binary 2.1.111 after cache clear still exhibits the bug
  • Problem persists across full macOS reboot
  • socat is NOT installed on the host (but per issue #19503 the bridge sockets are created inside the VM guest, not on the host, so this shouldn't matter)

extent analysis

TL;DR

The most likely fix for the "Failed to create bridge sockets after 5 attempts" error in Claude Desktop is to investigate and resolve potential issues with the sandbox bridge setup, possibly related to plugin configuration or VM networking.

Guidance

  1. Review plugin configuration: Examine the 3 remote plugins installed, particularly their MCP servers, to ensure they are not interfering with the bridge socket creation.
  2. Check VM networking: Verify that the VM has proper network connectivity and that the API reachability check is successful, as indicated in the logs.
  3. Investigate sandbox setup: Look into the sandbox bridge setup process to identify potential issues, such as incorrect configuration or missing dependencies.
  4. Compare with working versions: If possible, compare the current setup with a previous working version to identify any changes that might be causing the issue.
  5. Check for known issues: Review the related existing issues (#19503, #23746, #11079, #40540) to see if any of the solutions or workarounds apply to this case.

Example

No specific code snippet is provided, as the issue seems to be related to the Claude Desktop application and its interaction with the VM and plugins.

Notes

The issue seems to be specific to the Claude Desktop application and its local agent VM, as the web version (Claude.ai) works fine. The problem persists across a full macOS reboot, and the fresh binary download does not resolve the issue.

Recommendation

Apply a workaround by temporarily disabling the plugins or modifying their configuration to see if it resolves the issue, as the problem might be related to plugin interference with the bridge socket creation.

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