[BUG] Config mismatch warning with custom npm global installation path

Resolved 💬 3 comments Opened Aug 2, 2025 by ghostintheshell-192 Closed Aug 15, 2025

Environment

  • Platform (select one):
  • [x] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [ ] Other: <!-- specify -->
  • Claude CLI version: 1.0.67 (Claude Code)
  • Operating System: Debian 12
  • Terminal: GNOME Terminal
  • Installation path: /data/repos/.npm-global/bin/claude
  • npm prefix: custom directory (not default ~/.npm)

Bug Description

/status shows "Config mismatch: running unknown but config says global" when using custom npm prefix directory

Steps to Reproduce

  1. Set custom npm prefix: npm config set prefix /custom/path/.npm-global
  2. Install Claude Code globally: npm install -g @anthropic-ai/claude-code
  3. Run /status
  4. See warning in System Diagnostics

Expected Behavior

Should detect installation method correctly or not show confusing warning

Actual Behavior

/status command shows, under system diagnostics:

 System Diagnostics • /doctor
 ⚠  Config mismatch: running unknown but config says global

Additional Context

Claude works perfectly, warning is cosmetic but confusing for users

View original on GitHub ↗

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