False-positive "installMethod is native" warning after removing native install — Homebrew binary fires on every start
Describe the bug
After removing a previously-installed native Claude Code alongside a Homebrew install, the Homebrew binary emits a false-positive error on every launch:
installMethod is native, but claude command not found at /home/<user>/.local/bin/claude
Claude Code works correctly. The error is cosmetic but unfixable without manual intervention.
---
Steps to reproduce
- Install Claude Code via Homebrew:
brew install claude-code - Install Claude Code natively alongside (via
claude installor npm) - Run native version — native installer writes
installMethod: "native"to~/.local/share/claude/state - Upgrade Homebrew — Homebrew version becomes active
- Remove native install including
~/.local/share/claude/state folder - Run
claudeorclaude -r→ error fires on every start
---
Root cause
The Homebrew cask never sets installMethod. When the native state folder is deleted (step 5), installMethod becomes undefined. The startup check treats undefined as "possibly native" and runs the native path validation on every launch, producing a permanent false positive.
Three install paths write installMethod — Homebrew is not one of them:
- Native installer →
"native" - npm local →
"local" - npm global →
"global" - Homebrew → (nothing)
Confirmed by binary analysis (v2.1.49 ELF) and exhaustive config file search. installMethod is absent from all config files after native removal:
~/.claude/settings.json— not found~/.claude/.credentials.json— only key:claudeAiOauth~/.claude/history.jsonl— not found~/.local/share/claude/— deleted with native install
---
Behavior change after cleanup
| Launch method | Native still installed | After native removed |
|---------------|----------------------|----------------------|
| claude | Error hidden (TUI redraw overwrites stderr) | Error visible |
| claude -r | Error visible | Error visible |
---
Environment
- OS: Bluefin (immutable Fedora 42), Linux 6.16.8-200.fc42.x86_64
- Install method: Homebrew (
brew install claude-code) - Versions: documented on 2.1.47, confirmed present in 2.1.49 (latest as of 2026-02-20)
- No native install present after cleanup
---
Expected behavior
No warning after native install is fully removed. Homebrew install should be recognized as non-native without requiring a state file.
---
Suggested fix
Treat installMethod === undefined as non-native (safe default) rather than "possibly native". Only run the native binary check when installMethod is explicitly set to "native".
Alternatively: Homebrew cask post-install step writes installMethod: "homebrew" to reclaim ownership after native removal.
---
Workaround
mkdir -p ~/.local/bin
ln -s /home/linuxbrew/.linuxbrew/bin/claude ~/.local/bin/claude
🤖 Generated with Claude Code
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗