[BUG] Edit tool removes executable permission from shell scripts
Resolved 💬 2 comments Opened Jan 23, 2026 by Daniel-Peder Closed Feb 28, 2026
Description
When using the Edit tool to modify a shell script that has executable permissions (chmod +x), the file loses its executable bit after the edit is applied.
Steps to Reproduce
- Have a shell script with executable permissions (e.g.,
bin/script.shwith mode 755) - Use the Edit tool to make a change to the file
- Check file permissions after edit
Expected Behavior
The Edit tool should preserve existing file permissions (including the executable bit).
Actual Behavior
The executable permission is stripped from the file after editing.
Environment
- Platform: Linux
- Claude Code version: latest
Additional Context
This is problematic for shell scripts, Makefiles, and other files that need to retain executable permissions.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗