[BUG] Claude Code tab fails to launch: "Malformed Mach-o file" exit code 127 on Apple Silicon M3 Pro

Status Open
Reported on v2.1.220
Maintainer reply None cached
Activity 1 comment · opened Jul 30, 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?

The Claude Code tab inside Claude Desktop fails to launch with the error "Malformed Mach-o file" and exit code 127. This started after the most recent Claude Desktop update, roughly a few days ago, and has been persistent since then across multiple restarts and reinstalls. The regular chat interface in Desktop works fine, only the integrated Claude Code tab is affected.

Steps to reproduce:

  1. Open Claude Desktop
  2. Click on the Claude Code tab
  3. Observe the launch failure

Actual behavior:
Process fails to start with "Malformed Mach-o file" and exit code 127.

Environment:

  • Mac: Apple Silicon M3 Pro
  • Claude Desktop installed from claude.ai (not the App Store)
  • Regression started after the most recent Desktop update

Troubleshooting already attempted:

  • Restarting Claude Desktop (Cmd+Q, not just closing the window): no effect
  • Fully reinstalling Claude Desktop from claude.ai/download: no effect, since the claude-code-vm folder persists across reinstalls
  • Deleting/renaming the claude-code-vm folder to force a fresh binary download: Desktop deterministically re-downloads the same broken binary
  • Running file on the binaries inside ~/Library/Application Support/Claude finds at least one binary reported as ELF (Linux) format instead of Mach-O (macOS), which appears to be the root cause: Desktop seems to be fetching a Linux ARM binary instead of a macOS one
  • Installed a working Claude Code binary manually via curl -fsSL https://claude.ai/install.sh | bash, confirmed as valid Mach-O arm64 (version 2.1.220), and running it directly in Terminal works without issue

This strongly suggests the bug is isolated to Claude Desktop's bundling/download logic for the Claude Code tab, not Claude Code itself.

Workaround found:
Running claude directly from Terminal (bypassing the Desktop-integrated Claude Code tab entirely) works correctly. This is currently my only way to use Claude Code while this bug persists.

What Should Happen?

The Claude Code tab should launch normally, as it did before the last Desktop update.

Error Messages/Logs

Process fails to start with "Malformed Mach-o file" and exit code 127.

Steps to Reproduce

  1. Open Claude Desktop
  2. Click on the Claude Code tab
  3. Observe the launch failure

Claude Model

Not sure / Multiple models

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.1.210

Claude Code Version

2.1.220

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

  • Restarting Claude Desktop (Cmd+Q, not just closing the window): no effect
  • Fully reinstalling Claude Desktop from claude.ai/download: no effect, since the claude-code-vm folder persists across reinstalls
  • Deleting/renaming the claude-code-vm folder to force a fresh binary download: Desktop deterministically re-downloads the same broken binary
  • Running file on the binaries inside ~/Library/Application Support/Claude finds at least one binary reported as ELF (Linux) format instead of Mach-O (macOS), which appears to be the root cause: Desktop seems to be fetching a Linux ARM binary instead of a macOS one
  • Installed a working Claude Code binary manually via curl -fsSL https://claude.ai/install.sh | bash, confirmed as valid Mach-O arm64 (version 2.1.220), and running it directly in Terminal works without issue

This strongly suggests the bug is isolated to Claude Desktop's bundling/download logic for the Claude Code tab, not Claude Code itself.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗