Startup PATH check warns even when ~/.local/bin is correctly configured in zsh

Resolved 💬 7 comments Opened Feb 9, 2026 by eekfonky Closed Apr 18, 2026

Description

Every time I start Claude Code, I see this warning:

Native installation exists but ~/.local/bin is not in your PATH. Run:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc && source ~/.zshrc

The path is correctly configured. ~/.local/bin is added to PATH in three places:

  • ~/.zshenvexport PATH="$HOME/.local/bin:$PATH"
  • ~/.zprofileexport PATH="$HOME/.local/bin:$PATH"
  • ~/.zshrc[[ ":$PATH:" != *":$HOME/.local/bin:"* ]] && PATH="$HOME/.local/bin:$PATH"

Additionally, /etc/environment includes ~/.local/bin in the system PATH.

Evidence

Spawning any zsh subprocess correctly picks up the path:

$ zsh -c 'echo $PATH'
/home/user/.local/bin:/home/user/Code/flutter/bin:/home/user/.cargo/bin:...

Tracing zsh startup confirms .zshenv adds it:

+/home/user/.zshenv:3> export PATH=/home/user/.local/bin:...

However, Claude Code's own process runs with a minimal PATH that's missing ~/.local/bin (and other user paths like ~/.cargo/bin, /snap/bin, etc.):

/home/user/.nvm/versions/node/v22.20.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

Expected behaviour

The startup PATH check should either:

  1. Evaluate the user's actual shell environment (e.g., zsh -c 'echo $PATH') rather than inspecting the process's inherited PATH, or
  2. Not warn when the native binary is clearly working (since I'm running Claude Code via the native binary at ~/.local/bin/claude)

Environment

  • OS: Ubuntu (Linux 6.17.0-14-generic)
  • Shell: zsh 5.9 with Oh My Zsh
  • Claude Code: 2.1.37 (native install at ~/.local/bin/claude)

View original on GitHub ↗

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