[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
5 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Same workaround as the other permission issues — auto-fix on session start:
My Claude says your issue has the same execute permission bug as #39931, #39954, #40009, #40050.
This was fixed in v2.1.86 — Plugin hook scripts (e.g., stop-hook.sh) now retain their execute permission when cached from the marketplace. 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.