Plugin manager does not preserve execute permissions on hook scripts
Status Fixed / completed
Maintainer reply ✓ Yes — ashwin-ant
Workaround ✓ Mentioned in thread ↓
Activity 5 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 installed via claude plugin install are missing execute permissions (-rw-r--r-- instead of -rwxr-xr-x), causing SessionStart hooks to fail with exit code 126 (permission denied).
Reproduction
- Install a plugin that includes shell-based hooks (e.g.,
explanatory-output-style@claude-plugins-officialorlearning-output-style@claude-plugins-official) - Start a new Claude Code session
- Observe
SessionStart:startup hook error
Root cause
The plugin manager writes hook scripts to ~/.claude/plugins/marketplaces/ without the execute bit set. The cached copies (under ~/.claude/plugins/cache/) from earlier installs do have +x, suggesting this is a regression in the install/update path — likely the marketplace sync or file extraction step strips execute permissions.
Evidence:
# Cached (older, working):
-rwxr-xr-x .../cache/.../session-start.sh (Mar 20-24)
# Marketplace (current, broken):
-rw-r--r-- .../marketplaces/.../session-start.sh (Mar 28)
Affected plugins
explanatory-output-style@claude-plugins-officiallearning-output-style@claude-plugins-official- Potentially any plugin with shell hook scripts
Workaround
chmod +x ~/.claude/plugins/marketplaces/claude-plugins-official/plugins/*/hooks-handlers/*.sh
Note: This workaround may need to be reapplied after plugin updates.
Environment
- macOS (Darwin 25.2.0)
- Claude Code CLI (latest)
5 Comments
Same workaround as #40280 — a
SessionStarthook that auto-fixes permissions:This runs before any other hooks fire, so it fixes the permission-denied error before it can occur. Works on both macOS and Linux.
A Notification start hook can automatically fix execute permissions on hook scripts:
Runs at every session start — automatically restores
+xpermission on any hook script that lost it during plugin install/update.My Claude says your issue is similar to issues #39931, #39954, and #40009. Let Anthropic pay more attention to this recurring problem.
This was fixed in v2.1.86 — The plugin manager now preserves execute permissions on hook scripts across all 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.