Plugin marketplace hooks: .sh files missing execute permission on macOS Sequoia
Description
Shell scripts (.sh) installed via the claude-plugins-official marketplace lack execute permissions on macOS Sequoia (Darwin 25.4.0, Apple Silicon). This causes "Permission denied" errors when Claude Code tries to execute plugin hooks.
Steps to Reproduce
- Install the
ralph-loopplugin from the official marketplace - Start or stop a Claude Code session
- The stop hook fails with:
Stop hook error: Failed with non-blocking status code: /bin/sh:
/Users/<user>/.claude/plugins/marketplaces/claude-plugins-official/plugins/ralph-loop/hooks/stop-hook.sh: Permission denied
Root Cause
All .sh files in claude-plugins-official are installed with -rw-r--r-- (644) instead of -rwxr-xr-x (755). The same plugins in the older claude-code-plugins marketplace have correct permissions.
Additionally, macOS Sequoia applies the com.apple.provenance extended attribute to downloaded files, which persists even after chmod +x and cannot be removed with xattr -d or xattr -cr. This attribute may further block execution.
Affected files (all .sh in claude-plugins-official):
ralph-loop/hooks/stop-hook.shralph-loop/scripts/setup-ralph-loop.shlearning-output-style/hooks-handlers/session-start.shexplanatory-output-style/hooks-handlers/session-start.shplugin-dev/(multiple scripts)math-olympiad/(multiple scripts)
Workaround
Run chmod +x on all .sh files in the marketplace directory:
find ~/.claude/plugins/marketplaces/claude-plugins-official -name "*.sh" -exec chmod +x {} \;
Note: this needs to be re-applied after marketplace updates.
Suggested Fix
Two possible approaches:
- Preserve execute permissions when installing/cloning plugin repositories (ensure
git clonerespects filemode) - Invoke scripts via
bash $scriptinstead of direct execution in hooks — this bypasses both the missing +x permission andcom.apple.provenancerestrictions
Environment
- macOS Sequoia (Darwin 25.4.0)
- Apple Silicon (M4)
- Claude Code CLI (latest)
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗