[Plugin: ralph-loop] stop-hook.sh loses execute permission when cached

Status Fixed / completed
Maintainer reply ✓ Yes — ashwin-ant
Activity 5 comments · opened Mar 28, 2026 · closed Apr 18, 2026
💡 Likely answer: A maintainer (ashwin-ant, collaborator) responded on this thread — see the highlighted reply below.

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

View original on GitHub ↗

5 Comments

github-actions[bot] · 6 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/39802
  2. https://github.com/anthropics/claude-code/issues/39993
  3. https://github.com/anthropics/claude-code/issues/40009

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

yurukusa · 6 months ago

Same workaround as the other permission issues — auto-fix on session start:

find ~/.claude -name '*.sh' ! -perm /111 -exec chmod +x {} \; 2>/dev/null
exit 0
marlvinvu · 6 months ago

My Claude says your issue has the same execute permission bug as #39931, #39954, #40009, #40050.

ashwin-ant collaborator · 6 months ago

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.

github-actions[bot] · 5 months ago

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.