Plugin hook scripts lose execute permission in 'unknown' cache path
Status Fixed / completed
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.
Description
Plugin hook scripts (shell scripts) lose their execute permission when cached via the unknown version path, causing Permission denied errors at runtime.
Steps to reproduce
- Have a plugin with a hook script (e.g.,
ralph-loopwithstop-hook.sh) - Wait for the plugin cache to sync — the
unknownversion path writes the file without the executable bit - When the marketplace directory syncs from this cache, the hook script is no longer executable
- Hook invocation fails with:
/bin/sh: .../stop-hook.sh: Permission denied
Evidence
Three cache versions of the same file show the issue:
# Versioned caches — correct (+x)
-rwxr-xr-x stop-hook.sh (cache/.../d53f6ca4cdb0/hooks/)
-rwxr-xr-x stop-hook.sh (cache/.../b10b583de281/hooks/)
# 'unknown' cache — missing +x
-rw-r--r-- stop-hook.sh (cache/.../unknown/hooks/)
The marketplace copy inherits the broken permissions from the unknown cache:
-rw-r--r-- .../marketplaces/claude-plugins-official/plugins/ralph-loop/hooks/stop-hook.sh
Workaround
chmod +x ~/.claude/plugins/marketplaces/claude-plugins-official/plugins/ralph-loop/hooks/stop-hook.sh
Recurs on next plugin update that goes through the unknown path.
Expected behavior
The plugin cache should preserve file permissions (specifically the executable bit) when writing to the unknown version path, matching the behavior of the versioned cache paths.
Environment
- macOS (Darwin 25.3.0)
- Claude Code (latest as of 2026-03-27)
4 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Auto-fix with Notification start hook:
This was fixed in v2.1.86 — Plugin hook scripts now retain their execute permission across all plugin cache and extraction paths. 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.