[BUG] `installMethod` config setting ignored when `~/.local/bin/` exists
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
When Claude Code is installed system-wide (e.g., /usr/local/bin/claude) and I set "installMethod": "system" in ~/.claude.json, Claude Code ignores this setting and displays a warning about native installation.
The warning appears in the Claude Code UI status bar whenever ~/.local/bin/ directory exists (even for unrelated purposes like pipx or user scripts) and there is no ~/.local/bin/claude file.
What Should Happen?
Claude Code should respect the installMethod setting in ~/.claude.json. When explicitly set to "system", it should not check for native installation paths or display native installation warnings.
Error Messages/Logs
installMethod is native, but claude command not found at /home/user/.local/bin/claude
This message appears in the UI status bar despite `~/.claude.json` containing:
{
"installMethod": "system",
...
}
Steps to Reproduce
- Have Claude Code installed system-wide:
``bash``
which claude
# Output: /usr/local/bin/claude
- Authenticate with Claude (creates
~/.claude.json):
``bash``
claude
- Set
installMethodto"system"in config:
``bash``
jq '.installMethod = "system"' ~/.claude.json > /tmp/c.json && mv /tmp/c.json ~/.claude.json
- Verify the config is correct:
``bash``
jq '.installMethod' ~/.claude.json
# Output: "system"
- Create
~/.local/bin/for some other purpose (e.g., pipx, user scripts):
``bash``
mkdir -p ~/.local/bin
touch ~/.local/bin/my-other-tool
- Launch Claude Code:
``bash``
claude
- Bug: Warning appears in UI despite
installMethod=system:
````
installMethod is native, but claude command not found at /home/user/.local/bin/claude
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.3 (Claude Code)
Platform
Other
Operating System
Ubuntu/Debian Linux
Terminal/Shell
Other
Additional Information
Root cause analysis:
Claude Code appears to have two independent checks:
- Config-based: Reads
installMethodfrom~/.claude.json - Detection-based: Scans for
~/.local/bin/directory existence
The detection-based check overrides the config setting. When it detects ~/.local/bin/ exists, it assumes a native installation was intended and checks for ~/.local/bin/claude, ignoring the explicit "installMethod": "system" setting.
Workaround:
Create a symlink to satisfy the detection:
ln -sf /usr/local/bin/claude ~/.local/bin/claude
Suggested fix:
When installMethod is explicitly set to "system" in ~/.claude.json:
- Skip native installation path detection
- Don't check for
~/.local/bin/claude - Don't display native installation warnings
The config setting should be authoritative when explicitly set by the user.
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗