[Bug] Plugin cache unknown/ directory loses execute permissions on shell scripts

Resolved 💬 2 comments Opened Mar 26, 2026 by guptesachin Closed Mar 27, 2026

Bug Description
When Claude Code creates the unknown/ version of plugin cache directories under ~/.claude/plugins/cache/, shell scripts lose their execute permission (+x). The versioned cache directories (e.g., 61c0597779bd/, da61886c07a4/) have correct
permissions, but the unknown/ copy does not.

This causes SessionStart:resume hook error messages displayed in the terminal on every session resume, and Permission denied errors in stop hooks on every assistant response.

Reproduction steps:

  1. Enable plugins that have shell-based hooks (e.g., learning-output-style, explanatory-output-style, ralph-loop)
  2. Start a Claude Code session
  3. Resume the session (or start a new one in the same project)
  4. Observe "SessionStart:resume hook error" displayed in the terminal

Evidence — permission comparison:

Versioned directory (correct):
-rwxr-xr-x ralph-loop/61c0597779bd/hooks/stop-hook.sh

unknown/ directory (broken):
-rw-r--r-- ralph-loop/unknown/hooks/stop-hook.sh
-rw-r--r-- learning-output-style/unknown/hooks-handlers/session-start.sh
-rw-r--r-- explanatory-output-style/unknown/hooks-handlers/session-start.sh
-rw-r--r-- ralph-loop/unknown/scripts/setup-ralph-loop.sh

Affected plugins (all from claude-plugins-official):

┌──────────────────────────┬──────────────┬─────────────────────────────────┐
│ Plugin │ Hook type │ Script path │
├──────────────────────────┼──────────────┼─────────────────────────────────┤
│ learning-output-style │ SessionStart │ hooks-handlers/session-start.sh │
├──────────────────────────┼──────────────┼─────────────────────────────────┤
│ explanatory-output-style │ SessionStart │ hooks-handlers/session-start.sh │
├──────────────────────────┼──────────────┼─────────────────────────────────┤
│ ralph-loop │ Stop │ hooks/stop-hook.sh │
├──────────────────────────┼──────────────┼─────────────────────────────────┤
│ ralph-loop │ Setup │ scripts/setup-ralph-loop.sh │
└──────────────────────────┴──────────────┴─────────────────────────────────┘

Observed errors:

  1. Terminal displays SessionStart:resume hook error (×2) on every session resume…

Note: Content was truncated.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗