Marketplace plugin sync strips execute permissions from .sh hook files
Resolved 💬 4 comments Opened Mar 27, 2026 by hysteric-lab Closed Apr 18, 2026
Bug
The marketplace plugin sync mechanism (GCS-based) downloads all files with 644 (rw-r--r--) permissions, stripping the POSIX execute bit from shell scripts. This causes Stop, SessionStart, and other command-type hooks to fail with:
Stop hook error: Failed with non-blocking status code: /bin/sh: .../stop-hook.sh: Permission denied
Reproduction
- Install any marketplace plugin that uses shell-based hooks (e.g.,
ralph-loop,learning-output-style) - Check permissions:
find ~/.claude/plugins/marketplaces/claude-plugins-official -name "*.sh" -exec ls -la {} \; - All
.shfiles showrw-r--r--(no execute bit) - Any hook configured as
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/stop-hook.sh"fails with permission denied
Affected files (current marketplace)
Every .sh file in the marketplace lacks +x:
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/skills/*/scripts/*.shmath-olympiad/skills/*/scripts/*.sh
Expected behavior
After marketplace sync, .sh files in hooks/ and scripts/ directories should have execute permissions (755 or rwxr-xr-x).
Workaround
find ~/.claude/plugins/marketplaces/claude-plugins-official -name "*.sh" -exec chmod +x {} \;
This must be re-run after every marketplace sync.
Suggested fix
After GCS download completes, run chmod +x on all .sh files, or at minimum on files referenced by hooks.json command entries.
Environment
- macOS (Darwin 24.6.0)
- Marketplace sync via
.gcs-shatracking
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗