[Bug] Windows WebView stuck on chrome-error after preview_stop/preview_start cycle with orphaned processes
Bug Description
# Windows: Preview tool WebView stuck on chrome-error after preview_stop/preview_start cycle
## Environment
- OS: Windows 11 (DESKTOP-U30T4EP)
- Claude Desktop: 1.5354.0.0
- claude-code CLI: 2.1.121
- Project: Next.js 16.3.0-canary.5 + Turbopack
- Runtime: bun 1.3.11 via mise (also tested with node_modules/.bin/next.exe directly)
## Issues
### 1. mcp__Claude_Preview WebView gets stuck on chrome-error://chromewebdata/
After calling preview_stop then preview_start (even with a new serverId),
the WebView refuses to reach localhost:3000 (and 127.0.0.1:3000).
The dev server itself is verified reachable: Invoke-WebRequest http://localhost:3000/en
returns 200 with full HTML (127KB). Only the embedded WebView is broken.
window.location.href = 'http://localhost:3000/en' from preview_eval has
no effect — location.href keeps reporting chrome-error://chromewebdata/.
The first preview_start of a session works correctly. Only restarts fail.
### 2. preview_stop leaves orphaned descendant processes
On Windows, preview_stop only terminates the wrapper process (next.exe shim
or bun.exe). The actual node-based dev server and its 5-7 worker subprocesses
(~1.5 GB total) survive as orphans, holding port 3000 and file handles
under .next/dev/cache/turbopack/. Subsequent preview_start then hits
"port in use" or cache lock contention.
Mac doesn't exhibit either issue with identical Claude Code / Next.js versions.
## Repro
1. macOS works fine. Windows-only.
2. bun dev (or next dev) for any Next.js 16 canary project
3. mcp__Claude_Preview__preview_start → load page → works
4. mcp__Claude_Preview__preview_stop
5. mcp__Claude_Preview__preview_start again
6. WebView stuck on chrome-error; orphaned node processes consuming ~1.5GB
## Expected
- preview_stop should terminate the entire process tree
- WebView should recover and load the new server's URL
Environment Info
- Platform: win32
- Terminal: windows-terminal
- Version: 2.1.121
- Feedback ID: a5c90781-6004-442e-8b58-48af629ac42d
Errors
[]This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗