[BUG] Cowork/Code tab: exit code 126 on VM spawn — missing com.apple.vm.networking entitlement (M5 Max, macOS)

Resolved 💬 4 comments Opened Apr 11, 2026 by hassbring Closed May 28, 2026

Preflight Checklist

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

What's Wrong?

Every Cowork and Code tab session fails immediately with exit code 126. The claude binary inside the Linux VM (/usr/local/bin/claude) is spawned but exits within ~300ms every time. Claude Code in the terminal (v2.1.101) works perfectly.

Root cause identified: Claude.app is missing the com.apple.vm.networking entitlement.

Verification:
codesign -dv --entitlements - /Applications/Claude.app 2>&1 | grep -i "virtual\|network"
Output: [Key] com.apple.security.virtualization
com.apple.vm.networking is ABSENT

Without this entitlement, macOS blocks the VM's network bridge. The spawned claude binary exits 126 immediately because it cannot establish API connectivity from inside the VM.

Environment:

  • Machine: MacBook Pro M5 Max (Apple Silicon, ARM64)
  • macOS: latest
  • Claude Desktop: latest (fresh reinstall, vm_bundles fully deleted and re-downloaded)
  • Claude Code CLI: 2.1.101 (working in terminal)
  • Cowork VM SDK: 2.1.92
  • VM bundle hash: 5680b11bcdab215cccf07e0c0bd1bd9213b0c25d

Related: #40283 identifies the same missing com.apple.vm.networking entitlement as root cause for Cowork Dispatch failures. This issue has the same root cause but a more severe symptom — exit code 126 on every spawn, making Cowork and Code tab completely non-functional.

What Should Happen?

Cowork and Code tab sessions should start and run normally.

Error Messages/Logs

coworkd.log:
[process] started PID 3973
[process] direct child exited: code=126 signal=<nil>

cowork_vm_swift.log:
SDK installed successfully: version=2.1.92
API reachability: REACHABLE
Process spawned: command=/usr/local/bin/claude
(exits 126 within ~300ms)

Steps to Reproduce

  1. Open Claude Desktop on M5 Max
  2. Click Cowork or Code tab
  3. Start any session
  4. Session fails with "Claude Code process exited with code 126"
  5. Run: codesign -dv --entitlements - /Applications/Claude.app 2>&1 | grep -i "virtual\|network"
  6. Observe: only com.apple.security.virtualization is present — com.apple.vm.networking is absent

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.101 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

Fix required: Re-sign Claude.app with the com.apple.vm.networking entitlement alongside the existing com.apple.security.virtualization entitlement. This is a signing/packaging issue — no code changes needed.

Migrated from Intel Mac to M5 Max. Claude Code CLI works perfectly in terminal. Only Cowork and Code tab in the desktop app are affected.

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗