[BUG] claude recommends adding non-existent directory to PATH

Resolved 💬 3 comments Opened Apr 26, 2026 by breun Closed May 28, 2026

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?

Claude Code tells me that I should add ~/.local/bin to my PATH, even though that directory does not exist and the directory that claude is in, is already in my PATH:

~ ❯ claude doctor

──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
  Diagnostics
  ├ Currently running: native (2.1.120)
  ├ Commit: 080f07fb4224
  ├ Platform: darwin-arm64
  ├ Path: /opt/local/share/claude-code/claude
  ├ Config install method: native
  └ Search: OK (bundled)

  ⚠ Native installation exists but ~/.local/bin is not in your PATH
    └ Run: echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc then open a new terminal or run: source ~/.zshrc
  ⚠ Leftover npm global installation at /opt/local/bin/claude
    └ Run: npm -g uninstall @anthropic-ai/claude-code

  Updates
  ├ Auto-updates: disabled (set by env: DISABLE_UPDATES)
  ├ Auto-update channel: latest
  ├ Stable version: 2.1.112
  └ Latest version: 2.1.119

  Still having issues? Run /feedback to report details.

  Press Enter to continue · f to fix with Claude

What Should Happen?

Claude should not recommend adding a directory to the PATH when that directory doesn't exist or doesn't contain the claude binary.

Error Messages/Logs

Steps to Reproduce

  1. Put the native claude binary in any directory in your PATH which isn't ~/.local/bin. (Package managers like Homebrew and MacPorts will also do this.)
  2. Run claude doctor.

Claude Model

None

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.120

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗

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