False installation mismatch warning for pnpm global installations
False "Installation config mismatch" warning for pnpm global installations
Environment
- Version: 2.1.4 (build 2026-01-10T22:23:05Z)
- OS: WSL2 / Linux
- Installation:
pnpm add -g @anthropic-ai/claude-code - Install path:
~/.local/share/pnpm/global/5/node_modules/@anthropic-ai/claude-code
Issue
After installing via pnpm, this warning appears on every launch:
⚠ Installation config mismatch: running unknown but config says global
Timeline:
- Fresh install → no warning
- Auto-update check runs (happens every 30min in background)
- Next launch → warning appears
- Reinstalling temporarily fixes it, but warning returns after next auto-update
Root Cause
1. Installation detection (ds() function) doesn't recognize pnpm
The function only checks these paths:
/usr/local/lib/node_modules/opt/homebrew/lib/node_modules- Paths containing
/npm/or/nvm/
pnpm uses different paths:
- Linux/WSL:
~/.local/share/pnpm/global/ - Windows:
%LOCALAPPDATA%/pnpm/global/
Since pnpm paths aren't checked, detection returns "unknown".
2. Auto-updater unconditionally saves installMethod: "global"
In the auto-update function (around $HA() implementation):
return h0((Y)=>({...Y,installMethod:"global"})),"success"
This runs every 30 minutes regardless of actual installation type.
3. Warning triggers on mismatch
In the diagnostics function (nZ9()):
if(Z && Z !== A.configInstallMethod)
Q.push(`Installation config mismatch: running ${A.installationType} but config says ${A.configInstallMethod}`)
Result:
- Runtime:
"unknown"(pnpm not detected) - Config:
"global"(saved by auto-updater) - Mismatch → warning
Why This Started in v2.1.4
This diagnostic check is new in 2.1.4. Previous versions (2.1.3) didn't validate installation type, so the underlying issue existed but was silent.
Expected Behavior
pnpm global installations should be detected as a valid installation type and not trigger warnings.
Proposed Fix
Add pnpm path detection in the ds() function:
// Current checks for npm/nvm
if(A.includes("/npm/") || A.includes("/nvm/"))
return "npm-global";
// Add pnpm detection
if(A.includes("/pnpm/"))
return "npm-global";
This covers:
- Linux:
~/.local/share/pnpm/global/... - Windows:
AppData/Local/pnpm/global/... - macOS:
~/Library/pnpm/global/...
Steps to Reproduce
pnpm add -g @anthropic-ai/claude-code- Launch claude → no warning
- Wait 30+ minutes (or until auto-update check runs)
- Launch claude → warning appears
Workaround
Add to ~/.claude.json:
{
"autoUpdaterStatus": "disabled"
}
delete ~/.claude.json:
{
"InstallMethod ": ~~~~~~~~~~~~ <- this line
}
This prevents the warning but disables auto-updates.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗