Plugin marketplace sync drops execute permissions on .sh files

Status Fixed / completed
Maintainer reply ✓ Yes — ashwin-ant
Activity 4 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.

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 ↗

4 Comments

github-actions[bot] · 6 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/38686
  2. https://github.com/anthropics/claude-code/issues/20432
  3. https://github.com/anthropics/claude-code/issues/39607

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

b-coman · 6 months ago

Subscribing — our plugins (ido4shape, ido4dev) rely on bash hook scripts (session-start.sh, phase-gate.sh, canvas-context.sh). This permission stripping would break all of them.

ashwin-ant collaborator · 6 months ago

This was fixed in v2.1.86 — Plugin marketplace sync now preserves execute permissions on .sh files extracted from the plugin archive. If you're still seeing this in the latest version, please comment with your version and repro and we'll reopen.

github-actions[bot] · 5 months ago

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.