claude-code - 💡(How to fix) Fix macOS: Hardened Runtime blocks Apple Events from child processes (missing com.apple.security.automation.apple-events) [1 comments, 2 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#52712Fetched 2026-04-24 10:41:41
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Author
Timeline (top)
labeled ×4commented ×1

The Claude Code binary (com.anthropic.claude-code) is signed with Hardened Runtime (flags=0x10000(runtime)) but lacks the com.apple.security.automation.apple-events entitlement. This prevents any child process spawned by Claude Code from sending Apple Events to other applications.

Root Cause

When a Hardened Runtime binary spawns child processes, the children inherit the parent's entitlement restrictions. Without com.apple.security.automation.apple-events, macOS blocks all Apple Event dispatch from the entire process tree.

Current entitlements on the binary:

com.apple.security.cs.allow-jit = true
com.apple.security.cs.allow-unsigned-executable-memory = true
com.apple.security.cs.disable-library-validation = true
com.apple.security.device.audio-input = true

Missing:

com.apple.security.automation.apple-events = true

Fix Action

Fix

Add com.apple.security.automation.apple-events to the binary's entitlements plist and re-sign. This entitlement allows sending Apple Events to other apps, which macOS will still gate behind per-app TCC prompts (Accessibility, Automation permissions in System Settings), so the security model is preserved.

Code Example

com.apple.security.cs.allow-jit = true
com.apple.security.cs.allow-unsigned-executable-memory = true
com.apple.security.cs.disable-library-validation = true
com.apple.security.device.audio-input = true

---

com.apple.security.automation.apple-events = true
RAW_BUFFERClick to expand / collapse

Description

The Claude Code binary (com.anthropic.claude-code) is signed with Hardened Runtime (flags=0x10000(runtime)) but lacks the com.apple.security.automation.apple-events entitlement. This prevents any child process spawned by Claude Code from sending Apple Events to other applications.

Impact

Any MCP server or tool that uses AppleScript, JXA, or osascript fails silently or with permission errors when run from Claude Code's process tree. Affected use cases include:

  • OmniFocus MCP (omnifocus-mcp) — cannot read/write OmniFocus tasks via AppleScript
  • System Events — cannot query running applications, window positions, etc.
  • Finder automation — cannot open files, move items, etc.
  • Any custom MCP or Bash tool that shells out to osascript

The same MCP servers work correctly when run from a non-Hardened-Runtime parent (e.g., a plain terminal shell).

Root Cause

When a Hardened Runtime binary spawns child processes, the children inherit the parent's entitlement restrictions. Without com.apple.security.automation.apple-events, macOS blocks all Apple Event dispatch from the entire process tree.

Current entitlements on the binary:

com.apple.security.cs.allow-jit = true
com.apple.security.cs.allow-unsigned-executable-memory = true
com.apple.security.cs.disable-library-validation = true
com.apple.security.device.audio-input = true

Missing:

com.apple.security.automation.apple-events = true

Fix

Add com.apple.security.automation.apple-events to the binary's entitlements plist and re-sign. This entitlement allows sending Apple Events to other apps, which macOS will still gate behind per-app TCC prompts (Accessibility, Automation permissions in System Settings), so the security model is preserved.

Environment

  • Claude Code 2.1.119
  • macOS (Darwin 25.4.0, arm64)
  • Binary: com.anthropic.claude-code, TeamIdentifier Q6L2SF6YDW
  • Runtime Version 14.5.0

extent analysis

TL;DR

Add the com.apple.security.automation.apple-events entitlement to the Claude Code binary's entitlements plist and re-sign to enable Apple Event dispatch from child processes.

Guidance

  • Verify the current entitlements on the binary using the provided information to confirm the missing entitlement.
  • Add com.apple.security.automation.apple-events = true to the binary's entitlements plist.
  • Re-sign the binary with the updated entitlements to apply the changes.
  • Test the affected use cases (e.g., OmniFocus MCP, System Events, Finder automation) to ensure Apple Event dispatch is working as expected.

Example

No code snippet is necessary for this fix, as it involves updating the entitlements plist.

Notes

This fix assumes that adding the com.apple.security.automation.apple-events entitlement is sufficient to resolve the issue. However, it's essential to note that macOS may still prompt for per-app TCC prompts (Accessibility, Automation permissions in System Settings) to gate Apple Event dispatch.

Recommendation

Apply the workaround by adding the missing entitlement and re-signing the binary, as this directly addresses the identified root cause and preserves the security model.

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 macOS: Hardened Runtime blocks Apple Events from child processes (missing com.apple.security.automation.apple-events) [1 comments, 2 participants]