[BUG] Plugin npm install hangs indefinitely with no timeout or error when install path is invalid, causing silent memory exhaustion

Resolved 💬 3 comments Opened Feb 12, 2026 by FilipeJesus Closed Mar 13, 2026

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 detects a plugin needs reinstalling and the npm install process fails (e.g., due to an invalid installPath in ~/.claude/plugins/installed_plugins.json), it hangs indefinitely without producing any error, warning, or output.

Each new Claude Code session spawns another hanging npm install process. These processes accumulate silently in the background, each consuming ~4GB+ of RAM and never completing. Users have no indication anything is wrong until their system grinds to a halt.

I discovered this because plugin config was synced from a Docker container (root user) to my local macOS machine, so the installPath values pointed to /root/.claude/plugins/... — a non-existent path on macOS. The path mismatch was my own configuration issue, but it exposed the underlying bug: Claude Code doesn't handle plugin installation failures gracefully.

What Should Happen?

  • npm install should time out or fail fast if the path is invalid or inaccessible
  • The user should see an error or warning about the failed plugin installation
  • Multiple sessions should not each spawn their own independent install attempt

Error Messages/Logs

No error messages — that's the problem. The process hangs silently with no output. The only evidence is multiple npm install processes visible in Activity Monitor / ps aux, each consuming ~4GB of RAM.

Steps to Reproduce

  • Install a plugin (e.g., episodic-memory@superpowers-marketplace)
  • Edit ~/.claude/plugins/installed_plugins.json so the plugin's installPath points to a non-existent directory (e.g., /root/.claude/plugins/cache/...)
  • Open Claude Code — it detects the missing plugin and attempts to reinstall
  • Observe that the npm install process hangs silently with no output or timeout
  • Open additional Claude Code sessions — each spawns another hanging npm install
  • Check system resources — multiple stuck processes, each consuming ~4GB+ RAM

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.31

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

Workaround: Manually edit ~/.claude/plugins/installed_plugins.json to fix or remove the invalid paths, kill any hanging npm processes (pkill -f "npm install"), and restart Claude Code.

View original on GitHub ↗

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