Plugin marketplace sync drops execute permissions on .sh files

Resolved 💬 4 comments Opened Mar 27, 2026 by klueless-io Closed Apr 18, 2026

Summary

Every time a Claude Code session starts, the plugin marketplace sync copies .sh files into ~/.claude/plugins/marketplaces/ but drops the Unix execute bit — files end up 644 instead of 755. This causes hook scripts to fail with "Permission denied".

Reproduction

  1. Install any plugin with shell hook scripts (e.g. ralph-loop with a stop hook)
  2. Run chmod +x on the .sh files in ~/.claude/plugins/marketplaces/.../hooks/
  3. Start a new Claude Code session
  4. Observe all .sh files are now 644 again (execute bit stripped)
  5. Hook fails: /bin/sh: .../stop-hook.sh: Permission denied

Details

  • Affected path: ~/.claude/plugins/marketplaces/<marketplace>/plugins/<plugin>/ — all .sh files
  • Cache version: The SHA-versioned cache entries in ~/.claude/plugins/cache/ sometimes retain 755, but the marketplace working copy does not
  • Scope: Not limited to one plugin — observed across ralph-loop, plugin-dev, learning-output-style, math-olympiad, explanatory-output-style, and others (17 scripts total)
  • Timestamps: All affected files share the same timestamp matching session start, confirming the sync is the cause
  • Workaround: find ~/.claude/plugins/marketplaces -name "*.sh" -exec chmod +x {} + after each session start

Expected behaviour

The marketplace sync should preserve Unix file mode bits (specifically the execute bit) when copying scripts from cache to the marketplaces directory.

Environment

  • macOS (Darwin 25.3.0, Apple Silicon)
  • Claude Code v2.1.83+
  • First observed ~2026-03-26, confirmed reproducible across sessions

View original on GitHub ↗

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