Plugin installer strips execute permissions from .sh files

Resolved 💬 4 comments Opened Mar 27, 2026 by nimesh-kumar-sh Closed Apr 18, 2026

Summary

When Claude Code downloads plugins from GitHub marketplaces, all files lose their git file mode — scripts committed as 100755 (executable) are installed as 100644 (not executable). This causes Permission denied errors for any hook that directly executes a .sh script.

Reproduction

# Check git mode in the repo — correctly 100755:
gh api "repos/anthropics/claude-plugins-official/git/trees/HEAD?recursive=1" \
  | jq '.tree[] | select(.path | contains("stop-hook")) | {path, mode}'
# {"path": "plugins/ralph-loop/hooks/stop-hook.sh", "mode": "100755"}

# Check installed file — stripped to 644:
ls -la ~/.claude/plugins/marketplaces/claude-plugins-official/plugins/ralph-loop/hooks/stop-hook.sh
# -rw-r--r-- ... stop-hook.sh

# Result on Stop hook:
# Stop hook error: Permission denied

Impact

15 .sh files across claude-plugins-official are affected:

  • ralph-loop/hooks/stop-hook.shactively breaks Stop hook
  • learning-output-style/hooks-handlers/session-start.sh — breaks SessionStart hook
  • explanatory-output-style/hooks-handlers/session-start.sh — breaks SessionStart hook
  • 12 more in plugin-dev/ and math-olympiad/ skills

Suggested Fix

After downloading/extracting plugin files, restore execute permissions for files that had 100755 mode in the git tree. Alternatively, chmod +x any .sh files in hook directories.

Workaround

Plugin authors can work around this by invoking scripts via bash "$script" instead of executing directly in their hooks.json commands.

Environment

  • Claude Code 2.1.85
  • macOS Darwin 25.3.0 (arm64)

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗