Plugin manager doesn't preserve execute permissions on shell scripts
Bug Description
The Claude Code plugin manager doesn't preserve execute permissions when installing/updating plugins, causing hook shell scripts to fail with "Permission denied" errors.
Steps to Reproduce
- Install or update a plugin that contains shell script hooks (e.g., ralph-loop)
- Observe file permissions on hook scripts:
``bash``
ls -l ~/.claude/plugins/marketplaces/claude-plugins-official/plugins/ralph-loop/hooks/stop-hook.sh
-rw-rw-r-- 1 user user 7533 Mar 25 09:14 stop-hook.sh
- Try to run Claude Code - hook execution fails with:
````
Stop hook error: Failed with non-blocking status code: /bin/sh: 1:
/home/user/.claude/plugins/marketplaces/claude-plugins-official/plugins/ralph-loop/hooks/stop-hook.sh:
Permission denied
Expected Behavior
Shell scripts in plugin directories should be installed with execute permissions (-rwxr-xr-x or at minimum -rwx------).
Current Behavior
Shell scripts are installed without execute bit (-rw-rw-r--), requiring manual chmod +x after every plugin update.
Affected Files
Running find ~/.claude/plugins -name "*.sh" -type f ! -perm -u+x shows many affected files:
*/hooks/*.sh- Hook scripts that need to execute*/scripts/*.sh- Utility scripts referenced by plugins*/hooks-handlers/*.sh- Session start handlers
Workaround
Manually fix permissions after plugin updates:
find ~/.claude/plugins -name "*.sh" -type f ! -perm -u+x -exec chmod +x {} \;
Impact
- Hooks fail silently or with errors on every session
- Users must manually fix permissions after each plugin update
- Creates friction in plugin development/testing workflow
Environment
- OS: Linux (Ubuntu-based)
- Claude Code version: Latest (as of 2026-03-25)
- Affected plugins: ralph-loop (confirmed), likely others with hooks
Suggested Fix
The plugin manager should:
- Detect
.shfiles during installation - Automatically apply execute permissions (
chmod +x) - OR preserve original permissions from plugin source
- OR use a manifest to specify which files need execute permissions
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗