False installation mismatch warning for pnpm global installations

Resolved 💬 2 comments Opened Jan 12, 2026 by btxe Closed Feb 26, 2026

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:

  1. Fresh install → no warning
  2. Auto-update check runs (happens every 30min in background)
  3. Next launch → warning appears
  4. 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

  1. pnpm add -g @anthropic-ai/claude-code
  2. Launch claude → no warning
  3. Wait 30+ minutes (or until auto-update check runs)
  4. 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.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗