False positive warning about PATH installation when using shell alias

Status Open
Maintainer reply None cached
Activity 15 comments · opened Jul 1, 2025

Environment

  • [x] Anthropic API
  • [ ] Other: Local installation

Claude CLI version: 1.0.38

Operating System: macOS (Darwin 23.6.0)

Terminal: zsh

Bug Description
Claude Code displays a false positive warning about the local installation not being accessible via PATH, even when the alias is properly configured and functional.

Steps to Reproduce

  1. Install Claude Code locally using the installer
  2. Configure shell alias as instructed: alias claude="/Users/username/.claude/local/claude"
  3. Restart shell or source configuration file
  4. Run claude update command - it works correctly
  5. Observe warning message displayed

Expected Behavior
No warning should be displayed when the alias is properly configured and the claude command is accessible.

Actual Behavior
The following warning appears:

Warning: Local installation not accessible via PATH
Fix: Alias already configured but not active. Restart shell or run: source /Users/mleveck/.zshrc

However, running which claude confirms the alias is active:

claude: aliased to /Users/mleveck/.claude/local/claude

Additional Context
The installation checker appears to only verify the binary exists in standard PATH locations and doesn't account for shell aliases. This creates confusion since the suggested fix (restarting shell/sourcing config) has already been completed and the alias is functional.

The warning is purely cosmetic - Claude Code works correctly despite the message.

View original on GitHub ↗

15 Comments

mattlbrr · 1 year ago

Seems fixed now. Closing.

magnusriga · 1 year ago

@mattlbrr I am seeing the same, on the latest version:

Claude CLI Diagnostic Currently running: npm-local (1.0.43) Path: /home/nfu/.nvm/versions/node/v24.2.0/bin/node Invoked: /home/nfu/.claude/local/node_modules/.bin/claude Auto-updates: Yes Config install method: local Config auto-updates: true Warning: Local installation not accessible via PATH Fix: Create alias: alias claude="~/.claude/local/claude" Press Enter to continue…
which claude
/home/nfu/.claude/local/claude

echo $PATH
/home/nfu/.claude/local:/home/nfu/.nvm/versions/node/v24.2.0/bin

Note: Including the alias makes no difference on my end, I only have one version installed (the local one).

harlan-union · 1 year ago

I get this too:

$ claude doctor      

 Claude CLI Diagnostic
 Currently running: npm-local (1.0.43)
 Path: /Users/dev/.nvm/versions/node/v22.17.0/bin/node
 Invoked: /Users/dev/.claude/local/node_modules/.bin/claude
 Auto-updates: Yes
 Config install method: local
 Config auto-updates: true
 Warning: Local installation not accessible via PATH
 Fix: Create alias: alias claude="~/.claude/local/claude"
 Press Enter to continue…
$ alias claude       
claude=/Users/dev/.claude/local/claude
$ which -a claude    
claude: aliased to /Users/dev/.claude/local/claude
mecampbellsoup · 1 year ago

Also seeing this.

2651 ± which claude
/Users/mcampbell/.claude/local/claude

2652 ± claude doctor

 Claude CLI Diagnostic
 Currently running: npm-local (1.0.45)
 Path: /Users/mcampbell/.nvm/versions/node/v24.3.0/bin/node
 Invoked: /Users/mcampbell/.claude/local/node_modules/.bin/claude
 Auto-updates: Yes
 Config install method: local
 Config auto-updates: true
 Warning: Local installation not accessible via PATH
 Fix: Create alias: alias claude="~/.claude/local/claude"
 Press Enter to continue…
mattlbrr · 1 year ago

reopening because of all the other people facing this with newer versions

ThroughIris · 1 year ago

getting same issue (removed name from path) :
Claude CLI Diagnostic
Currently running: npm-local (1.0.53)
Path: /usr/local/bin/node
Invoked: /Users/********/.claude/local/node_modules/.bin/claude
Config install method: local
Auto-updates enabled: true
Warning: Local installation not accessible via PATH
Fix: Create alias: alias claude="~/.claude/local/claude"

barlevalon · 1 year ago

Had this too. Only thing that shut this warning up was adding alias claude='~/.claude/local/claude' to my .bashrc _exactly_, with ~, not $HOME, and not the absolute path.

brendancsmith · 1 year ago
Had this too. Only thing that shut this warning up was adding alias claude='~/.claude/local/claude' to my .bashrc _exactly_, with ~, not $HOME, and not the absolute path.

This is quite unacceptable to enforce. It's simple enough to check if a file is in the $PATH directories...

def file_in_path(filename):
    for directory in os.environ["PATH"].split(os.pathsep):
        full_path = os.path.join(directory, filename)
        if os.path.isfile(full_path):
            return True
    return False
github-actions[bot] · 1 year ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/5159
  2. https://github.com/anthropics/claude-code/issues/5712
  3. https://github.com/anthropics/claude-code/issues/2986

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

github-actions[bot] · 8 months ago

This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

robertedvin · 8 months ago

I have the same issue

zazu-22 · 8 months ago

I also have this issue. Using Ghostty as well.

TheEdgeOfRage · 8 months ago

I have installed claude code on Arch from the AUR. To fix the issue, I just linked /usr/bin/claude to ~/.local/bin/claude:

mkdir -p $HOME/.local/bin
ln -s /usr/bin/claude $HOME/.local/bin/claude

This shuts up the warning, even if you don't run claude from .local/bin. The file just has to exist.

mandofever78 · 8 months ago

Same issue here using Ghostty + Fish

fredcooke · 7 months ago

Obnoxious change, Anthropic:

got told to run claude install
claude install stuck it in ~/.local/bin/claude pointing to ~/.local/share/claude/versions/<> or something
hash -d claude
claude
warns me it's not in the path
it's not going to be in the path - don't want a standard user owned install dir on my path - major security risk - I have a folder for this purpose and I put things there that I want on my path explicitly.
added a symlink from my folder/claude to the same path in the .local/share dir chain
claude
warns me again

Please provide an option to turn off this warning - it's intrusive and irritating at best. Look at all of the above people unhappy about it - for every one writing something here publicly 10000 others are thinking the same thing.

Socks up Anthropic, you dropped the ball on this one.

Here's what your product had to say on the matter:

Unfortunately, from what I can see in the docs and issues, there doesn't appear to be a config option to disable this warning. The binary just checks if it's in standard PATH locations and complains if it isn't - it doesn't consider that you might have deliberately set it up differently.
Your options are basically:

* Live with it (annoying)
* Add the path it wants to PATH (which you don't want for security reasons)
* File an issue or comment on #2824 requesting a --no-path-warning flag or a config option like "suppressPathWarning": true

For the record a flag is not acceptable - it needs to work cleanly from just claude