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

  1. Configure ~/.local/bin in PATH via .bashrc and .profile (using standard case guard for deduplication)
  2. Verify it works: bash -l -c 'which claude'/home/user/.local/bin/claude
  3. Run claude --diagnostics
  4. 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:

  1. Run the PATH check in a login shell context (bash -l -c), or
  2. Also check shell config files (.bashrc, .profile, .bash_profile) for PATH entries, or
  3. Downgrade the message to an informational note rather than a warning when claude is already resolvable

Actual Behavior

A warning is shown suggesting the user add ~/.local/bin to PATH, even though it's already there and working.

View original on GitHub ↗

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