Claude Code incorrectly prompts to fix permissions on correctly configured Bun global packages
Claude Code keeps prompting me to fix permissions on my global Bun packages directory, even though the
permissions are already correctly set.
Environment:
- OS: macOS
- Using Bun instead of npm
- Claude Code installed via Bun (
bun install -g @anthropic-ai/claude-code)
Current Setup:
My global Bun packages have the correct ownership and permissions:
❯ ls -lah ~/.bun/
total 0
drwxr-xr-x@ 4 klohto staff 128B Feb 26 08:57 .
drwxr-x---+ 69 klohto staff 2.2K Feb 26 09:57 ..
drwxr-xr-x@ 4 klohto staff 128B Feb 26 09:45 bin
drwxr-xr-x@ 4 klohto staff 128B Feb 26 09:15 install
All directories are owned by me and have proper read/write access.
Expected Behavior:
Claude Code should recognize that permissions are already correctly set and not prompt to fix them.
Actual Behavior:
Claude Code repeatedly prompts me to fix permissions, suggesting I need to run a command like:
sudo chown -R $USER:$(id -gn) $(npm -g config get prefix) && sudo chmod -R u+w $(npm -g config get prefix)
This appears to be a bug where Claude Code is either not checking permissions correctly or is specifically
looking for npm paths even when Bun is being used.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗