[Bug] Homebrew installation creates incorrect symlinks

Resolved 💬 5 comments Opened Nov 7, 2025 by FF-GardenFn Closed Jan 12, 2026

why do we have to do this ? ide not enough ? lol anyways on macOS using Homebrew, the claude binary in /opt/homebrew/bin points into Homebrew-owned paths that conflict with a global npm installation of @anthropic-ai/claude-code.

overtime this is leading to incorrect / stale symlinks
root-owned directories under /opt/homebrew/lib/node_modules/@anthropic-ai
repeated ✗ Auto-update failed · Try claude doctor or npm i -g @anthropic-ai/claude-code
claude doctor reporting it is running from npm-global while being invoked via the Homebrew claude shim

been cleaning this up by hand (removing Homebrew-owned module dirs and reinstalling globally), but this keeps recurring and is fragile.

macOS (Homebrew under /opt/homebrew)
Installed claude-code via Homebrew at least once in the past
Currently running @anthropic-ai/claude-code 2.0.35 via global npm
which claude → /opt/homebrew/bin/claude
Terminal: PyCharm / zsh

manual purge i am using
sudo bash -c 'rm -rf /opt/homebrew/lib/node_modules/@anthropic-ai/claude-code \
/opt/homebrew/lib/node_modules/@anthropic-ai/.claude-code-* && \
npm i -g --force @anthropic-ai/claude-code' && hash -r

temporarily fixes things, but recreates root-owned dirs and is clearly not ideal.

NOTE: if all my ide logs were actually sent the plugin manifest errors shown in the logs are from my own experimental plugins. To reiterate the core usability issue is that the Homebrew-installed shim plus npm-global install create an inconsistent, brittle setup that claude can’t reliably self-heal.

thanks

View original on GitHub ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗