[BUG] /doctor recommends adding ~/.local/bin to PATH even though actual binary is managed by Homebrew
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?
Due to a recent change on the recommended install method (<https://x.com/claudeai/status/1984304957353243061>), Mac users are recommended installing Claude Code using Homebrew: brew install --cask claude-code. This is documented at <https://docs.claude.com/en/docs/claude-code/quickstart> and <https://docs.claude.com/en/docs/claude-code/overview#homebrew>.
When installing Claude Code by this way, Homebrew runs the native installer, which creates ~/.local/bin/claude, and then Homebrew creates $(brew --prefix)/bin/claude which points to the current version of Claude, such as $(brew --prefix)/Caskroom/claude-code/2.0.31/claude.
With this setup, Homebrew recommends stopping auto-updater: https://github.com/Homebrew/homebrew-cask/blob/c2bd3932a3243252fc3f28d608c73d9624a1e5c9/Casks/c/claude-code.rb#L35-L41
Claude Code's auto-updater installs updates to~/.local/bin/claudeand not to Homebrew's location. It is recommended to disable the auto-updater with eitherDISABLE_AUTOUPDATER=1orclaude config set autoUpdates falseand usebrew upgrade --cask claude-code.
However, even if I disabled the auto-updater, Claude Code says that it's problem that I don't have ~/.local/bin in my PATH. Since I've installed Claude Code via Homebrew and I manage its version via Homebrew, my assumption is that the ~/.local/bin doesn't have to be included in PATH.
For instance, Claude Code's /doctor says:
Warning: Native installation exists but ~/.local/bin is not in your PATH
Fix: Run: echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc then open a new terminal or run: source ~/.zshrc
What Should Happen?
When setting DISABLE_AUTOUPDATER=1, Claude Code should ignore existence of ~/.local/bin in PATH.
Error Messages/Logs
Warning: Native installation exists but ~/.local/bin is not in your PATH
Fix: Run: echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc then open a new terminal or run: source ~/.zshrc
Steps to Reproduce
brew install --cask claude-codeDISABLE_AUTOUPDATER=1 claude/doctor
Claude Model
Sonnet (default)
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
2.0.31 (Claude Code)
Platform
AWS Bedrock
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗