[Plugin: ralph-loop] stop-hook.sh loses execute permission when cached
Bug Description
The ralph-loop plugin's stop-hook.sh loses its execute permission when copied to the plugin cache directory, causing a Permission denied error on every session stop.
Error Message
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
The source file at plugins/marketplaces/.../ralph-loop/hooks/stop-hook.sh and most cached copies have rwxr-xr-x (755) permissions, but some cached copies (e.g., under unknown/) are created with rw-r--r-- (644), missing the execute bit.
Cached file locations observed:
| Path | Permissions |
|------|-------------|
| .../cache/.../61c0597779bd/hooks/stop-hook.sh | rwxr-xr-x ✅ |
| .../cache/.../b10b583de281/hooks/stop-hook.sh | rwxr-xr-x ✅ |
| .../cache/.../unknown/hooks/stop-hook.sh | rw-r--r-- ❌ |
Expected Behavior
All cached copies of hook scripts should preserve the execute permission from the source file.
Workaround
Manually add execute permission:
find ~/.claude -name "stop-hook.sh" -path "*/ralph-loop/*" ! -perm -u+x -exec chmod +x {} \;
Environment
- macOS (Darwin 25.3.0)
- Claude Code CLI
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗