[BUG] Plugin .sh files lose execute permission on marketplace update

Status Fixed / completed
Reported on v2.1.85
Maintainer reply ✓ Yes — ashwin-ant
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.

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Plugin marketplace auto-updates reset file permissions on all .sh files to 644 (no execute bit).

This causes hook scripts to fail with "Permission denied" errors. The fix doesn't persist — permissions are lost again on each update.

What Should Happen?

Shell scripts distributed via the plugin marketplace should retain execute permissions after auto-updates. Either the git repo should track the execute bit, or the update process should chmod +x .sh files after syncing.

Error Messages/Logs

Error Messages/Logs:

Stop hook error: Failed with non-blocking status code: /bin/sh: /Users/[my_username]/.claude/plugins/marketplaces/claude-plugins-official/plugins/ralph-loop/hooks/stop-hook.sh: Permission denied

Steps to Reproduce

  1. Install any plugin with .sh hook scripts (e.g., ralph-loop)
  2. Wait for a marketplace auto-update (or trigger one)
  3. Observe that all .sh files in ~/.claude/plugins/ marketplaces/claude-plugins-official/ are now 644
  4. Any hook that references a .sh file fails with "Permission denied"

Workaround: find ~/.claude/plugins/marketplaces/claude-plugins-official -name "*.sh" -exec chmod +x {} +

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

Yes, this worked in a previous version

Claude Code Version

2.1.85 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

5 Comments

github-actions[bot] · 5 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/39777
  2. https://github.com/anthropics/claude-code/issues/39798
  3. https://github.com/anthropics/claude-code/issues/39802

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

yurukusa · 5 months ago

A Notification start hook can auto-fix stripped permissions:

find ~/.claude/hooks ~/.claude/plugins/*/hooks .claude/hooks -name '*.sh' ! -perm /111 -exec chmod +x {} \; 2>/dev/null
exit 0

Add to global ~/.claude/settings.json. Runs on every session start and restores execute permissions.

marlvinvu · 5 months ago

My Claude says your issue is similar to issue #39931.

ashwin-ant collaborator · 4 months ago

This was fixed in v2.1.86 — Plugin .sh files now retain their execute permission after a marketplace update. If you're still seeing this in the latest version, please comment with your version and repro and we'll reopen.

github-actions[bot] · 4 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.