[BUG] Claude Desktop's downloaded Code CLI binary (claude-code-vm/claude-code) is unsigned, causing exit 127 "Malformed Mach-o file"

Status Open
Reported on v2.1.219
Maintainer reply None cached
Activity 2 comments · opened Aug 3, 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?

Claude Desktop's Code tab fails to launch with:

Claude Code process exited with code 127. stderr: Failed to spawn process: Malformed Mach-o file
Failed to spawn process: Malformed Mach-o file

Investigation showed the main Claude.app bundle and its helpers are properly signed and notarized (verified with codesign -dv --verbose=4), but the Claude Code binary that Desktop downloads separately to ~/Library/Application Support/Claude/claude-code/<version>/claude.app/Contents/MacOS/claude is completely unsigned:

codesign -dv --verbose=4 ".../claude-code/2.1.219/claude.app/Contents/MacOS/claude"
→ code object is not signed at all

codesign --verify --deep --strict ".../claude-code/2.1.219/claude.app"
→ invalid or unsupported format for signature

Since this binary has no code signature at all, macOS's kernel rejects it under the hardened runtime (confirmed via Console.app: "load code signature error 2 for file 'claude'"), which Electron/Desktop then surfaces as the generic "Malformed Mach-o file" spawn error.

There is also a second binary at ~/Library/Application Support/Claude/claude-code-vm/<version>/claude, which is an ELF Linux/aarch64 executable (not Mach-O at all) — presumably meant to run inside a sandboxed VM (there's a vm_bundles/claudevm.bundle alongside it), but this is a separate observation from the primary unsigned-binary bug above.

What Should Happen?

Claude Desktop's Code tab should launch successfully. The Claude Code binary it downloads/installs should be properly code-signed and notarized, just like the main Claude.app bundle and its Helpers (disclaimer, etc.), so macOS's hardened runtime doesn't reject it.

Error Messages/Logs

Claude Code process exited with code 127. stderr: Failed to spawn process: Malformed Mach-o file
Failed to spawn process: Malformed Mach-o file

Console.app kernel log at time of failure:
proc 3234: load code signature error 2 for file "claude"
ASP: Unable to apply provenance sandbox: 268451845, 3234, /Applications/Claude.app/Contents/Helpers/disclaimer
proc 3235: load code signature error 2 for file "claude"
ASP: Unable to apply provenance sandbox: 268451845, 3235, /Applications/Claude.app/Contents/MacOS/Claude

Steps to Reproduce

  1. Install Claude Desktop on macOS (Apple Silicon)
  2. Open Claude Desktop, sign in
  3. Open the Code tab / attempt to start a Claude Code session
  4. Observe: "Claude Code process couldn't start" dialog with the error above
  5. Confirm root cause by running:

codesign -dv --verbose=4 "~/Library/Application Support/Claude/claude-code/<version>/claude.app/Contents/MacOS/claude"
→ reports "code object is not signed at all"

Claude Model

None

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.197 (Claude Code), 2.1.219 (Desktop)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Other

Additional Information

  • Homebrew-installed Claude Code CLI (/opt/homebrew/bin/claude) is unaffected — confirmed valid, properly-signed arm64 binary, works fine standalone.
  • Reinstalling Claude Desktop from scratch did not fix the issue.
  • Clearing ~/Library/Application Support/Claude/claude-code and claude-code-vm and relaunching did not fix the issue (Desktop re-downloaded the same unsigned binary).
  • This suggests the binary Desktop fetches for its internal Code tab is built/distributed without a code signing step, unlike the main app and Helpers.

View original on GitHub ↗

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