False positive diagnostic warning: PATH contains ~/.local/bin but system shows it as missing
Bug Report
Description
The system diagnostic shows a false positive warning about ~/.local/bin not being in PATH, even though it is correctly configured and working.
Diagnostic Message
⚠ Native installation exists but ~/.local/bin is not in your PATH. Run:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc && source ~/.zshrc
Environment
- OS: macOS (Darwin)
- Claude Code Version: 2.1.19 (also tested on 2.1.17)
- Shell: zsh with Oh My Zsh
- Installation Method: Native installation
Verification Steps
- .zshrc Configuration (Line 8):
``bash``
export PATH="$HOME/.local/bin:$PATH"
- Current PATH Verification:
``bash``
echo $PATH
# Output includes: /Users/ip9202/.local/bin
- Binary Verification:
```bash
which claude
# Output: /Users/ip9202/.local/bin/claude
claude --version
# Output: 2.1.19 (Claude Code)
```
- Symlink Verification:
``bash``
ls -la ~/.local/bin/claude
# Output: lrwxr-xr-x@ 1 ip9202 staff 49 -> /Users/ip9202/.local/share/claude/versions/2.1.19
Expected Behavior
No diagnostic warning should be shown since ~/.local/bin is correctly in PATH and the claude command works normally.
Actual Behavior
The diagnostic warning persistsently appears on every session start, even though:
- PATH is correctly configured in .zshrc
- Current session PATH includes ~/.local/bin
- claude command executes successfully
- Symlink is properly set up
Impact
- Low functional impact (everything works correctly)
- High noise impact (false positive warning on every session)
- User confusion about installation status
Timeline
- This issue appeared after automatic update to version 2.1.19 (installed 2025-01-24 08:37)
- Previous version (earlier today) worked without this warning
- Downgrading to 2.1.17 did not resolve the issue
Hypothesis
The diagnostic check logic may be:
- Checking PATH in an isolated environment without sourcing .zshrc
- Using a different method to verify PATH than the actual shell session
- Caching old diagnostic results
- Checking for a specific PATH format rather than actual availability
Additional Context
The issue suggests that the system diagnostic runs in a different environment than the actual shell session, or there's a bug in how PATH is verified.
---
Environment Details:
# PATH output
echo $PATH
/Users/ip9202/.local/bin:/opt/homebrew/bin:...[truncated]
# .zshrc status
ls -la ~/.zshrc
-rw-r--r--@ 1 ip9202 staff 4449 Jan 24 14:11 /Users/ip9202/.zshrc
# Claude binary
file ~/.local/bin/claude
/Users/ip9202/.local/bin/claude: Mach-O 64-bit executable arm64This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗