claude-code - 💡(How to fix) Fix preview_start fails with spawn disclaimer ENOENT on macOS 26.2 (embedded claude-code 2.1.111) [1 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#52684Fetched 2026-04-24 10:42:30
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Author
Participants
Timeline (top)
labeled ×4

mcp__Claude_Preview__preview_start consistently fails with:

spawn /Applications/Claude.app/Contents/Helpers/disclaimer ENOENT

…even though that binary exists, is correctly codesigned, and runs fine when invoked directly from a shell. Reproducible across every .claude/launch.json config I've tried (python3, npx, npm), regardless of whether runtimeExecutable is a PATH-resolved command or an absolute path, regardless of cwd.

Error Message

Deleting the 2.1.111/ directory and letting Claude Desktop re-download produces the same bundle layout. Symlinking /Applications/Claude.app/Contents/Helpers into the embedded bundle at Contents/Helpers does not change the preview_start error — preview_start already hardcodes the absolute /Applications/Claude.app/... path, so the embedded Helpers absence is likely a red herring. ENOENT on spawn() when the file demonstrably exists, is executable, and is invokable from a normal shell is the classic fingerprint of macOS kernel-level exec denial (TCC, sandbox, or entitlement mismatch) — macOS masks the real error as ENOENT. But none of the visible entitlements explain which policy would be denying it. launch.json content, full error traces, codesign dumps, dtruss of a failing spawn, etc. Let me know what would help.

Root Cause

Possibly related (but not the root cause): the embedded claude.app bundle at ~/Library/Application Support/Claude/claude-code/2.1.111/claude.app/Contents/ ships without a Helpers/ subdirectory:

Fix Action

Workaround

For pre-commit visual spot-checks, dropping to bash + python3 -m http.server on a temp fixture dir + manual browser load. Works but loses preview_screenshot / preview_inspect.

Code Example

spawn /Applications/Claude.app/Contents/Helpers/disclaimer ENOENT

---

{
  "name": "static-server",
  "runtimeExecutable": "/opt/homebrew/bin/python3",
  "runtimeArgs": ["-m", "http.server", "4545"],
  "port": 4545,
  "cwd": "."
}

---

Contents/
├── CodeResources
├── Info.plist
├── MacOS
└── _CodeSignature    ← no Helpers/
RAW_BUFFERClick to expand / collapse

Summary

mcp__Claude_Preview__preview_start consistently fails with:

spawn /Applications/Claude.app/Contents/Helpers/disclaimer ENOENT

…even though that binary exists, is correctly codesigned, and runs fine when invoked directly from a shell. Reproducible across every .claude/launch.json config I've tried (python3, npx, npm), regardless of whether runtimeExecutable is a PATH-resolved command or an absolute path, regardless of cwd.

Environment

  • macOS: 26.2 (25C56), arm64
  • Claude Desktop: 1.3883.0
  • Embedded claude-code bundle: 2.1.111 (at ~/Library/Application Support/Claude/claude-code/2.1.111/)
  • Native claude-code CLI: 2.1.119 (at ~/.local/bin/claude, separate install, not what's running here — CLAUDE_CODE_ENTRYPOINT=claude-desktop)

Reproduction

Any .claude/launch.json entry will do. Example:

{
  "name": "static-server",
  "runtimeExecutable": "/opt/homebrew/bin/python3",
  "runtimeArgs": ["-m", "http.server", "4545"],
  "port": 4545,
  "cwd": "."
}

Call preview_start → ENOENT.

Diagnostics gathered

disclaimer binary is healthy:

  • Exists: -rwxr-xr-x 135600 bytes at /Applications/Claude.app/Contents/Helpers/disclaimer
  • file: Mach-O universal binary with 2 architectures: [x86_64] [arm64]
  • codesign -dvvv: signed by Anthropic PBC (Team Q6L2SF6YDW), hardened runtime enabled, Developer ID Application cert, Apple-timestamped 2026-04-21.
  • otool -L: only dep is /usr/lib/libSystem.B.dylib
  • Direct exec works: disclaimer /bin/echo hellohello
  • xattr: only com.apple.provenance / com.apple.macl — nothing quarantine-related

Claude Desktop / Claude Code entitlements:

Neither has com.apple.security.app-sandbox. Claude Code's entitlements are just cs.allow-jit, cs.allow-unsigned-executable-memory, cs.disable-library-validation, device.audio-input. So classic App Sandbox denial is out.

Possibly related (but not the root cause): the embedded claude.app bundle at ~/Library/Application Support/Claude/claude-code/2.1.111/claude.app/Contents/ ships without a Helpers/ subdirectory:

Contents/
├── CodeResources
├── Info.plist
├── MacOS
└── _CodeSignature    ← no Helpers/

Deleting the 2.1.111/ directory and letting Claude Desktop re-download produces the same bundle layout. Symlinking /Applications/Claude.app/Contents/Helpers into the embedded bundle at Contents/Helpers does not change the preview_start error — preview_start already hardcodes the absolute /Applications/Claude.app/... path, so the embedded Helpers absence is likely a red herring.

Why it looks like a sandbox-masked denial

ENOENT on spawn() when the file demonstrably exists, is executable, and is invokable from a normal shell is the classic fingerprint of macOS kernel-level exec denial (TCC, sandbox, or entitlement mismatch) — macOS masks the real error as ENOENT. But none of the visible entitlements explain which policy would be denying it.

What I'd expect the fix to look like

Either:

  1. preview_start shouldn't be spawning via the desktop-app-bundle disclaimer at all from the embedded claude-code — it should use a helper bundled alongside the claude-code binary (which means shipping Helpers/ inside the embedded bundle).
  2. Or the disclaimer call path needs an env/entitlement adjustment so the cross-bundle exec actually resolves.

Workaround

For pre-commit visual spot-checks, dropping to bash + python3 -m http.server on a temp fixture dir + manual browser load. Works but loses preview_screenshot / preview_inspect.

Happy to share more

launch.json content, full error traces, codesign dumps, dtruss of a failing spawn, etc. Let me know what would help.

extent analysis

TL;DR

The most likely fix involves adjusting the preview_start spawn to use a helper bundled alongside the claude-code binary or modifying the disclaimer call path with environment or entitlement adjustments.

Guidance

  • Investigate why preview_start is spawning the desktop-app-bundle disclaimer instead of a helper bundled with the claude-code binary.
  • Check if adding the Helpers/ directory to the embedded claude.app bundle resolves the issue.
  • Review the entitlements of Claude Desktop and Claude Code to ensure they are correctly configured for cross-bundle execution.
  • Consider using a temporary workaround, such as dropping to bash and using python3 -m http.server, until a permanent fix is found.

Example

No code snippet is provided as the issue seems to be related to the application's configuration and entitlements rather than a specific code error.

Notes

The absence of the Helpers/ directory in the embedded claude.app bundle may be a red herring, as the preview_start error already hardcodes the absolute path to the disclaimer binary.

Recommendation

Apply a workaround, such as using a temporary bash and python3 -m http.server solution, until the root cause of the preview_start error can be determined and a permanent fix can be implemented. This will allow for continued development and testing while the issue is being resolved.

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

claude-code - 💡(How to fix) Fix preview_start fails with spawn disclaimer ENOENT on macOS 26.2 (embedded claude-code 2.1.111) [1 participants]