PaPoo
cover

Claude Desktop の Code タブが exit code 127 で落ちるときに見ておくこと

自分のケースかどうかを先に切り分けるなら、Claude Desktop の通常チャットは動くのに、Code タブだけが起動直後に失敗するかどうかです。Issue #83656#82587 では、どちらも Code タブの起動失敗が報告されていて、エラー文に Malformed Mach-o fileexit code 127 が出ています。前者では、Desktop が別途ダウンロードした claude バイナリの署名状態まで確認されています。

今回の issue 群で見えているのは、少なくとも「Claude Code 自体の機能不全」というより、Claude Desktop 側が起動する claude バイナリの読み込みに失敗している、という形です。#83656 の報告では、main の Claude.app 本体と helper は codesign -dv --verbose=4 で正しく署名・notarize されている一方、Desktop が個別に展開した次の場所のバイナリは未署名でした。

~/Library/Application Support/Claude/claude-code/<version>/claude.app/Contents/MacOS/claude

issue 本文には、そこで codesign -dv --verbose=4 を実行すると code object is not signed at all だったことが書かれています。つまり、少なくともこの報告例では、落ちている対象は Claude Desktop 本体ではなく、後から落としてきた Claude Code 側の実体です。

一方で、同じ症状でも原因はまだ一つに絞れていません。代表 issue に付いたコメントでは、以下の確認が求められています。

Is the `~/Library/Application Support/Claude/claude-code/<version>/claude.app/Contents/MacOS/claude` binary an incomplete download, e.g. are there any .partial siblings in that directory?

Any debug logs that mention the download bundle, located in `~/Library/Logs/Claude/main*.log`?

Running any AV / EDR tooling that may interfere with the download?

このうち、.partial の有無やログの内容、AV / EDR の干渉は、今回渡された情報だけでは分かりません。#83656 のコメント欄では「.partial は無かった」との返答は見えますが、それ以上の切り分け結果は提示されていません。

手元で確認できる範囲では、Claude Code CLI のインストール状態自体は壊れていませんでした。claude doctor は native 版を見ていて、Search: OK (bundled)Auto-updates: enabled と出ています。さらに、/usr/local/bin/claude に npm-global の残骸がある、という警告も出ています。

$ claude --version
2.1.207 (Claude Code)
$ claude doctor
Claude Code doctor

Running: native (2.1.207)
Commit: bc512d563325
Platform: darwin-arm64
Path: ~/.local/share/claude/versions/2.1.207
Config install method: native
Search: OK (bundled)
Auto-updates: enabled
Auto-update channel: latest
Last update attempt: none recorded

Multiple installations found
- npm-global at /usr/local/bin/claude
- native at ~/.local/bin/claude

Remote Control
Control this session from claude.ai/code or the Claude mobile app

1 warning found
- Leftover npm global installation at /usr/local/bin/claude
  Fix: Run: npm -g uninstall @anthropic-ai/claude-code

For a full setup checkup that can also fix issues, run /doctor in a Claude Code session.

ただし、この claude doctor の結果は、今回の exit code 127 を直接説明するものではありません。少なくとも、issue #83656 の報告は Claude Desktop のダウンロードしたバイナリ側の署名問題を指していて、CLI の通常インストールの健全性とは別筋です。

現時点で言えるのは、次のようなケースなら今回の症状と一致しやすい、ということです。

逆に、CLI の claude --versionclaude doctor が通るだけでは、この不具合の有無は判断できません。Desktop の Code タブが実際にどのバイナリを掴んでいるか、そこがポイントです。

いまのところ解決済みの手順は提示されていないので、断定できる対処はありません。確認できる材料が増えるなら、~/Library/Application Support/Claude/claude-code/<version>/claude.app/Contents/MacOS/claude の署名状態、同じディレクトリの .partial の有無、~/Library/Logs/Claude/main*.log の該当箇所を順に見るのが筋です。そこまで見ても原因が追えなければ、少なくとも今回の issue 群だけでは未解決のままです。


検証環境

claude --version : 2.1.207 (Claude Code)
OS          : Darwin 25.3.0 (arm64)
Python      : 3.14.2
検証日時    : 2026-08-20T09:48:49+09:00

参照した Issue(anthropics/claude-code): #83656, #82587, #77057

同じ著者の記事