Desktop app: severe memory leak (119 GB) after starting a dev server via preview in a long session

Resolved 💬 3 comments Opened Jul 11, 2026 by kotsubanjiku Closed Jul 14, 2026

Environment

  • Claude Code (desktop app): app 1.20186.1 / CLI 2.1.159
  • macOS 26.5.2 (Apple Silicon, 24 GB RAM)
  • Model: claude-fable-5
  • Project: Next.js 16.2.4 (Turbopack) dev server, started via .claude/launch.json + the preview feature (preview_start)

What happened

During a long session (several hours, many tool calls), Claude started a dev server through the preview feature to verify a UI change. Shortly after, the whole machine became unresponsive and macOS showed the force-quit dialog reporting Claude (paused) using 119.64 GB of memory — by far the largest process on the system.

Observable symptoms while it was happening:

  • Every Bash tool call failed with exit code 1 and produced no stdout/stderr at all (even echo hello).
  • The dev server stayed stuck at Compiling / ... indefinitely (normally finishes in seconds; next dev reported Ready in ~200 ms before that).
  • The embedded preview browser could not load any page (chrome-error://chromewebdata), and a fetch() from preview_eval timed out after 30 s.

Force-quitting/restarting the desktop app fully resolved it: the app came back at ~2 GB total, the same dev-server config worked, and Bash calls succeeded again.

Repro (as far as we can tell)

  1. Run a long interactive session in the desktop app (large transcript, subagents, MCP servers connected).
  2. Ask Claude to start a dev server via preview_start (Next.js/Turbopack in our case) and interact with the preview (navigation, eval, logs).
  3. App memory grows unbounded; once system memory is exhausted, the symptoms above appear.

It has happened more than once on this machine, always in the same pattern (long session + dev-server preview). It looks like something in the preview/server-log pipeline (or the renderer behind it) accumulates memory without releasing it, and the resulting system-wide memory pressure is what makes the dev-server compile hang and shell commands fail.

Happy to provide more details or logs on request.

🤖 Filed with Claude Code on the user's behalf

View original on GitHub ↗

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