Diagnostics shows false PATH warning even when ~/.local/bin is properly configured
Resolved 💬 7 comments Opened Jan 31, 2026 by kimseokho1226 Closed Apr 26, 2026
Bug Description
claude --diagnostics shows the following warning:
Warning: Native installation exists but ~/.local/bin is not in your PATH
Fix: Run: echo 'export PATH="$HOME/.local/bin:$PATH"' >> your shell config file
However, ~/.local/bin is properly configured in shell config files and works correctly in login/interactive shells.
Environment
- OS: Synology DSM (Linux 4.4.302+)
- Shell: bash
- Claude Code: 2.1.25 (native installation)
Steps to Reproduce
- Configure
~/.local/binin PATH via.bashrcand.profile(using standardcaseguard for deduplication) - Verify it works:
bash -l -c 'which claude'→/home/user/.local/bin/claude - Run
claude --diagnostics - Observe the false PATH warning
Evidence That PATH Is Correctly Configured
.bashrc:
case ":$PATH:" in
*":$HOME/.local/bin:"*) ;;
*) export PATH="$HOME/.local/bin:$PATH" ;;
esac
.profile:
for _dir in "$HOME/.local/bin" "$HOME/bin" "/opt/bin" "/opt/sbin"; do
case ":$PATH:" in
*":$_dir:"*) ;;
*) export PATH="$_dir:$PATH" ;;
esac
done
Verification:
$ bash -l -c 'which claude'
/home/user/.local/bin/claude
$ which claude
/home/user/.local/bin/claude
$ claude --version
2.1.25 (Claude Code)
All working correctly — but diagnostics still reports the warning.
Root Cause
The diagnostics check appears to inspect PATH in a non-login, non-interactive shell context where .bashrc and .profile are not sourced. This causes a false positive warning even when the user's PATH is correctly configured for all practical use cases.
Expected Behavior
Diagnostics should either:
- Run the PATH check in a login shell context (
bash -l -c), or - Also check shell config files (
.bashrc,.profile,.bash_profile) for PATH entries, or - Downgrade the message to an informational note rather than a warning when
claudeis already resolvable
Actual Behavior
A warning is shown suggesting the user add ~/.local/bin to PATH, even though it's already there and working.
This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗