The install directory is not on your PATH
The native installer (curl -fsSL https://claude.ai/install.sh | bash, or irm https://claude.ai/install.ps1 | iex on Windows) puts a launcher at ~/.local/bin/claude, a symlink into ~/.local/share/claude/versions/. On Windows it is %USERPROFILE%\.local\bin\claude.exe. The installer warns Native installation exists but ~/.local/bin is not in your PATH and prints the fix, but it does not edit your PATH itself, so plenty of default profiles never add that folder.
The terminal is older than the PATH change
A shell reads its PATH once, when it starts. A window that was already open keeps the old value, and a terminal inside VS Code or another editor inherits the PATH the editor started with. Fixing your profile and typing claude in the same old window fails exactly the way it did before.
The PATH line went into a file your shell never reads
zsh, the macOS default, reads ~/.zshrc. bash on Linux reads ~/.bashrc. Terminal on macOS starts bash as a login shell, which reads ~/.bash_profile and ignores ~/.bashrc. A correct line in the wrong file does nothing. Run echo $0 to see which shell you are actually in.
An npm install put it in the npm global bin
With npm install -g @anthropic-ai/claude-code the command lands in npm's global bin, which is $(npm prefix -g)/bin on macOS and Linux and the prefix folder itself on Windows, where it is a claude.cmd shim. If that folder is not on PATH, the package installed and the command is still missing.
nvm switched Node versions under you
Under nvm every Node version has its own global packages. Install claude with npm while one version is active, run nvm use to another, and the command disappears with the old version's bin directory. The native install avoids this: Anthropic's setup docs say the installed binary does not invoke Node at all.
The shell still remembers the old location
After moving from npm to the native installer, or uninstalling one copy, bash keeps a cache of where it last found each command. It then tries the old path and fails with No such file or directory naming a file that is gone, even though a working claude is on PATH. hash -r in bash or rehash in zsh clears it.
Installed in one environment, run in another
On Windows, PowerShell, CMD, Git Bash and WSL are not one environment. PowerShell, CMD and Git Bash share the Windows user PATH, but Git Bash only reads it when the window opens. WSL is a separate Linux system with its own home directory, so a Windows install is invisible there and it needs its own install from inside WSL.
A service has a different PATH than your terminal
Anything started by systemd, launchd or a Windows service inherits a minimal environment and never reads .bashrc or .zshrc. The same machine then runs the CLI by hand and fails to spawn it from the service, which reads as an install problem and is not one.