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

Resolved 💬 2 comments Opened May 31, 2026 by breun Closed Jul 3, 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.158)
  ├ Commit: 96d5f49347b9
  ├ 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
(...)

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.158 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗

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