claude.exe processes accumulate 50+GB virtual memory in long-running sessions (remoteControlAtStartup=true)

Resolved 💬 1 comment Opened Apr 19, 2026 by LZong-tw Closed May 26, 2026

Environment

  • Claude Code version: 2.1.114
  • OS: Windows 11 Pro (10.0.26200)
  • Node: bundled
  • Setting: "remoteControlAtStartup": true in ~/.claude.json

Summary

When remoteControlAtStartup is enabled, claude.exe processes started in
separate terminals do not exit when their terminal is closed, and accumulate
very large amounts of virtual memory over hours. On 2026-04-15 my system
triggered Windows Resource-Exhaustion-Detector (Event ID 2004) six times
between 22:06 and 01:45 with three orphaned claude.exe processes:

| PID | Virtual Memory |
| ----- | -------------- |
| 18900 | ~56 GB |
| 37364 | ~24 GB |
| 14204 | ~5 GB |

Total: ~86 GB virtual memory across 3 processes. System pagefile is 96 GB so
the machine did not crash, but other apps were affected (Chrome and PowerToys
MouseWithoutBordersHelper crashed during the same window).

A fresh claude.exe started today already grew to ~12 GB virtual memory
within 2.5 hours of normal use, suggesting steady growth rather than a
single spike.

Reproduction

  1. Set "remoteControlAtStartup": true in ~/.claude.json (default for some

users via the Remote Control rollout dialog).

  1. Open several claude sessions in separate terminals over the course of a

day. Close terminals normally (Alt+F4 / X) without /exit.

  1. After several hours, check Get-Process claude | select VirtualMemorySize64

— orphan processes remain and VM grows continuously.

Expected

Either:

  • claude.exe exits when its parent terminal closes, OR
  • The Remote Control daemon stays as a single shared process, not one per

ever-spawned terminal session, OR

  • VM stays bounded.

Actual

Each session leaves a long-lived claude.exe whose virtual memory keeps
growing.

Workaround

Set "remoteControlAtStartup": false and use /exit to terminate sessions.

Notes

  • No outbound listening port observed on the host, so Remote Control appears

to use an outbound websocket / relay.

  • --dangerously-skip-permissions is in use but should be unrelated.
  • Windows Event Viewer source: Microsoft-Windows-Resource-Exhaustion-Detector,

Event ID 2004, naming claude.exe PIDs as the top virtual memory consumers.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗