Diagnostic tool incorrectly flags standalone installation as problematic when using Homebrew Cask

Resolved 💬 3 comments Opened Oct 31, 2025 by skywalke34 Closed Nov 4, 2025

Description

The claude doctor diagnostic tool reports a misleading warning about multiple installations when Claude Code is installed via Homebrew Cask. The warning suggests there's a \"leftover npm global installation\" that should be removed, but this is incorrect.

Steps to Reproduce

  1. Install Claude Code via Homebrew Cask: brew install --cask claude-code
  2. Run claude doctor
  3. Observe the warning about multiple installations

Current Behavior

Diagnostics
 └ Currently running: native (2.0.30)
 └ Path: /opt/homebrew/bin/claude
 └ Invoked: /opt/homebrew/Caskroom/claude-code/2.0.30/claude
 └ Config install method: native
 └ Auto-updates enabled: default (true)
 └ Search: OK (bundled)
 Warning: Multiple installations found
 └ npm-global at /opt/homebrew/bin/claude
 └ native at /Users/tracywalker/.local/bin/claude
 Warning: Leftover npm global installation at /opt/homebrew/bin/claude
 Fix: Run: npm -g uninstall @anthropic-ai/claude-code

Investigation Results

  1. /opt/homebrew/bin/claude is NOT an npm installation - it's a symlink to the Homebrew Cask installation
  2. The standalone installation at ~/.local/share/claude/ is automatically maintained by Claude Code's update mechanism
  3. When the standalone installation is deleted, Claude Code immediately recreates it (within seconds)
  4. There is no npm package installed globally (verified with npm list -g --depth=0)

Expected Behavior

The diagnostic tool should:

  1. Recognize that /opt/homebrew/bin/claude is part of the Homebrew Cask installation, not an npm installation
  2. Understand that the standalone installation in ~/.local/share/claude/ is part of normal operation (for auto-updates)
  3. Not suggest running npm -g uninstall when there's no npm package installed
  4. Either not flag this as a warning, or provide a more accurate message explaining this is expected behavior

Environment

  • OS: macOS (Apple M1)
  • Claude Code version: 2.0.30
  • Installation method: Homebrew Cask
  • Shell: bash/zsh

Additional Context

This appears to be by design - Claude Code maintains the standalone installation for its auto-update mechanism even when installed via Homebrew Cask. The diagnostic warning is confusing and suggests action that isn't necessary or helpful.

Authored by T. Walker - DefectDojo

View original on GitHub ↗

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