[BUG] Plugin .sh files lose execute permission on marketplace update
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
- Install any plugin with .sh hook scripts (e.g., ralph-loop)
- Wait for a marketplace auto-update (or trigger one)
- Observe that all .sh files in ~/.claude/plugins/ marketplaces/claude-plugins-official/ are now 644
- 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_
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗