claude-code - 💡(How to fix) Fix [BUG] preview_start spawns unlimited Node.js processes on Windows, consuming all available RAM

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Root Cause

  • Every call spawns a fresh node.exe process (~31–33 MB each)
  • 100+ node.exe processes accumulate, consuming all remaining system RAM
  • System becomes completely unresponsive
  • Machine crashed TWICE before the root cause was identified
  • reused: false on every call, even repeated ones to the same named server

Fix Action

Workaround

Kill all runaway processes via PowerShell:

Get-Process -Name "node" -ErrorAction SilentlyContinue | Stop-Process -Force

Then run npm run dev manually in a terminal instead of using preview_start.

Code Example

{
  "serverId": "d9907155-d833-4c27-8632-c0e9368a7d1f",
  "port": 3000,
  "name": "Next.js Dev",
  "reused": false
}

---

Get-Process -Name "node" -ErrorAction SilentlyContinue | Stop-Process -Force
RAW_BUFFERClick to expand / collapse

Bug Description

Triggering preview_start (via the "Start Preview" button in Claude Desktop or the mcp__Claude_Preview__preview_start MCP tool) spawns a brand new node.exe process every single time instead of reusing an existing one. On Windows, this results in 100+ Node.js processes accumulating in the background, consuming ALL available system RAM and causing repeated system crashes.

The tool description explicitly states "Reuses the server if already running" — this guarantee is completely broken on Windows.

Environment

  • OS: Windows
  • App: Claude Desktop
  • Tool: mcp__Claude_Preview__preview_start
  • Project type: Next.js 16 (next dev, port 3000)
  • .claude/launch.json: present and correctly configured

Steps to Reproduce

  1. Create .claude/launch.json with a Next.js dev server entry
  2. Trigger preview_start (via Claude Desktop UI or MCP tool call)
  3. Trigger it again — even just once more
  4. Observe: a new node.exe process is spawned instead of reusing the existing one
  5. Repeat a few times → Task Manager shows 100+ node.exe processes

Expected Behavior

preview_start detects an already-running server on the target port and reuses it. The reused field in the response should return true on subsequent calls.

Actual Behavior

  • Every call spawns a fresh node.exe process (~31–33 MB each)
  • 100+ node.exe processes accumulate, consuming all remaining system RAM
  • System becomes completely unresponsive
  • Machine crashed TWICE before the root cause was identified
  • reused: false on every call, even repeated ones to the same named server

API Response Evidence

{
  "serverId": "d9907155-d833-4c27-8632-c0e9368a7d1f",
  "port": 3000,
  "name": "Next.js Dev",
  "reused": false
}

reused should be true on repeated calls — it never is.

Workaround

Kill all runaway processes via PowerShell:

Get-Process -Name "node" -ErrorAction SilentlyContinue | Stop-Process -Force

Then run npm run dev manually in a terminal instead of using preview_start.

Severity

Critical — causes repeated full system crashes on Windows by exhausting all available RAM. The bug is triggered by normal, expected usage of the feature.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] preview_start spawns unlimited Node.js processes on Windows, consuming all available RAM