Plugin manager doesn't preserve execute permissions on shell scripts

Resolved 💬 4 comments Opened Mar 25, 2026 by danajanezic Closed Mar 27, 2026

Bug Description

The Claude Code plugin manager doesn't preserve execute permissions when installing/updating plugins, causing hook shell scripts to fail with "Permission denied" errors.

Steps to Reproduce

  1. Install or update a plugin that contains shell script hooks (e.g., ralph-loop)
  2. Observe file permissions on hook scripts:

``bash
ls -l ~/.claude/plugins/marketplaces/claude-plugins-official/plugins/ralph-loop/hooks/stop-hook.sh
-rw-rw-r-- 1 user user 7533 Mar 25 09:14 stop-hook.sh
``

  1. Try to run Claude Code - hook execution fails with:

``
Stop hook error: Failed with non-blocking status code: /bin/sh: 1:
/home/user/.claude/plugins/marketplaces/claude-plugins-official/plugins/ralph-loop/hooks/stop-hook.sh:
Permission denied
``

Expected Behavior

Shell scripts in plugin directories should be installed with execute permissions (-rwxr-xr-x or at minimum -rwx------).

Current Behavior

Shell scripts are installed without execute bit (-rw-rw-r--), requiring manual chmod +x after every plugin update.

Affected Files

Running find ~/.claude/plugins -name "*.sh" -type f ! -perm -u+x shows many affected files:

  • */hooks/*.sh - Hook scripts that need to execute
  • */scripts/*.sh - Utility scripts referenced by plugins
  • */hooks-handlers/*.sh - Session start handlers

Workaround

Manually fix permissions after plugin updates:

find ~/.claude/plugins -name "*.sh" -type f ! -perm -u+x -exec chmod +x {} \;

Impact

  • Hooks fail silently or with errors on every session
  • Users must manually fix permissions after each plugin update
  • Creates friction in plugin development/testing workflow

Environment

  • OS: Linux (Ubuntu-based)
  • Claude Code version: Latest (as of 2026-03-25)
  • Affected plugins: ralph-loop (confirmed), likely others with hooks

Suggested Fix

The plugin manager should:

  1. Detect .sh files during installation
  2. Automatically apply execute permissions (chmod +x)
  3. OR preserve original permissions from plugin source
  4. OR use a manifest to specify which files need execute permissions

View original on GitHub ↗

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