Plugin manager does not preserve execute permissions on hook scripts

Resolved 💬 5 comments Opened Mar 27, 2026 by ias-z Closed Apr 18, 2026

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

  1. Install a plugin that includes shell-based hooks (e.g., explanatory-output-style@claude-plugins-official or learning-output-style@claude-plugins-official)
  2. Start a new Claude Code session
  3. 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-official
  • learning-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)

View original on GitHub ↗

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