claude.exe accumulates 13+ GB virtual memory, triggers Windows Resource Exhaustion
Status Closed — not planned
Maintainer reply None cached
Workaround ✓ Mentioned in description ↑
Activity 8 comments · opened Apr 1, 2026 · closed Jun 1, 2026
Description
On Windows 11 (64 GB RAM), multiple claude.exe processes accumulate massive amounts of virtual memory over time, never releasing it. This triggers repeated Resource-Exhaustion-Detector warnings (Event ID 2004) and eventually destabilizes the system (DWM crash, Windows Terminal crash, UDP port exhaustion).
Environment
- OS: Windows 11 Pro 10.0.26200
- RAM: 64 GB DDR5 3600 MT/s
- Claude Code: CLI (latest)
- Shell: Git Bash + Windows Terminal
- Usage: 3-4 terminal tabs running Claude Code sessions concurrently
Symptoms
- Progressive memory leak: a single
claude.exeprocess grew from ~5 GB to 13.3 GB of committed virtual memory over ~4 hours without releasing - Multiple zombie processes: crashed/exited Claude Code sessions leave
claude.exeprocesses running that continue consuming memory - System-wide impact:
- Non-Paged Pool reached 31.5 GB (normal: 200-500 MB)
- Windows
Resource-Exhaustion-Detectorfired every ~30 minutes - Windows Terminal crashed (0xc000027b in Windows.UI.Xaml.dll)
- Desktop Window Manager (DWM) restarted
- UDP ephemeral ports exhausted (Tcpip Event 4266)
Event Log Evidence
Repeated Event ID 2004 from Microsoft-Windows-Resource-Exhaustion-Detector:
9:11 AM — claude.exe (PID A) consumed 13,157,031,936 bytes
9:35 AM — claude.exe (PID A) consumed 13,868,277,760 bytes
12:04 PM — claude.exe (PID A) consumed 14,104,268,800 bytes
1:36 PM — claude.exe (PID A) consumed 14,253,273,088 bytes
A second claude.exe instance (PID B) simultaneously held 6+ GB, and a third (PID C) held 4.2+ GB.
Resource Monitor Data
- In Use: 51.6 GB / 64 GB (78%)
- Non-Paged Pool: 31.5 GB
- Committed: 86.2 / 95.9 GB
- Task Manager shows ~8-10 GB across visible processes — the rest is kernel/NPP
Steps to Reproduce
- Open 3-4 terminal tabs running
claudeCLI sessions - Use sessions actively (code exploration, file edits, subagent spawning, MCP tools)
- Let one or more sessions crash or be interrupted
- Observe that
claude.exeprocesses remain running and memory grows over hours
Expected Behavior
- Claude Code sessions that crash or are interrupted should clean up child processes
- Memory usage should remain bounded and stable over multi-hour sessions
- Exiting a session should fully release all allocated memory
Workaround
Manually kill orphaned claude.exe processes via Task Manager. Note: the Non-Paged Pool leak requires a full system reboot to clear.
This issue has 8 comments on GitHub. Read the full discussion on GitHub ↗