claude.exe processes accumulate 50+GB virtual memory in long-running sessions (remoteControlAtStartup=true)
Environment
- Claude Code version: 2.1.114
- OS: Windows 11 Pro (10.0.26200)
- Node: bundled
- Setting:
"remoteControlAtStartup": truein~/.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
- Set
"remoteControlAtStartup": truein~/.claude.json(default for some
users via the Remote Control rollout dialog).
- Open several
claudesessions in separate terminals over the course of a
day. Close terminals normally (Alt+F4 / X) without /exit.
- After several hours, check
Get-Process claude | select VirtualMemorySize64
— orphan processes remain and VM grows continuously.
Expected
Either:
claude.exeexits 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-permissionsis 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.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗