Plugin installer strips execute permissions from .sh files
Status Fixed / completed
Reported on v2.1.85
Maintainer reply ✓ Yes — ashwin-ant
Workaround ✓ Mentioned in description ↑
Activity 4 comments · opened Mar 27, 2026 · closed Apr 18, 2026
💡 Likely answer: A maintainer (ashwin-ant, collaborator)
responded on this thread — see the highlighted reply below.
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.sh— actively breaks Stop hooklearning-output-style/hooks-handlers/session-start.sh— breaks SessionStart hookexplanatory-output-style/hooks-handlers/session-start.sh— breaks SessionStart hook- 12 more in
plugin-dev/andmath-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)
4 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
A
Notificationstart hook can auto-fix stripped permissions:Add to global
~/.claude/settings.json. Runs on every session start and restores execute permissions.This was fixed in v2.1.86 — The plugin installer now preserves execute permissions on .sh files extracted from the plugin archive. If you're still seeing this in the latest version, please comment with your version and repro and we'll reopen.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.