claude-code - 💡(How to fix) Fix [BUG] claude.exe 2.1.114 consumes ~40 GB virtual memory on Windows 10, triggers system-wide OOM

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Fix Action

Fix / Workaround

Long-running session with:

  • several large file reads (2000+ line CLAUDE.md, log files)
  • 7 MCP servers connected
  • one or two subagent dispatches
  • a few bash commands with moderate stdout output
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

During a normal coding session, claude.exe grows unbounded until Windows reports virtual-memory exhaustion. The OOM pressure crashes the graphics stack (DWM, NVIDIA Display Container, Intel igfxEM.exe) and Chrome, after which RuntimeBroker.exe triggers an unplanned reboot.

Environment

  • OS: Windows 10 Pro 22H2 (build 19045)
  • Claude Code: 2.1.114 (latest at time of report)
  • Node.js: v22.21.1
  • npm: 10.9.4
  • Hardware: ASUS H110M-K, Intel HD + NVIDIA GeForce GT 1030, 16 GB RAM
  • Shell: Git Bash
  • MCP servers active (7): claude-in-chrome, context7, exim-ssh, figma, playwright, claude_ai_Gmail, claude_ai_Google_Calendar, claude_ai_Google_Drive

What Should Happen?

claude.exe memory usage should stabilize, or at least be bounded by a configurable ceiling, so that exhausting system virtual memory is not possible from normal use.

Steps to Reproduce

Long-running session with:

  • several large file reads (2000+ line CLAUDE.md, log files)
  • 7 MCP servers connected
  • one or two subagent dispatches
  • a few bash commands with moderate stdout output

Memory climbs monotonically and is never released.

Evidence — Windows Event Log, Event ID 2004

(Microsoft-Windows-Resource-Exhaustion-Detector)

2026-04-20 17:52:21 claude.exe (PID 4680) allocated 40,068,931,584 bytes (~37.3 GB) 2026-04-20 18:01:16 claude.exe (PID 14744) allocated 43,341,262,848 bytes (~40.4 GB)

Chrome in both samples held < 800 MB — claude.exe is the sole offender.

Resulting cascade (17:52 sample)

TimeEvent
17:52:21Virtual memory exhausted (Event 2004, claude.exe ≈ 37 GB)
17:52:33NVDisplay.Container.exe crash (0xc0000005 access violation)
17:52:33igfxEM.exe crash (0xc00000fd stack overflow in ntdll.dll)
17:52:34DWM exits with 0xc00001ad, restart count 1
17:52:35Service "NVIDIA Display Container LS" terminated unexpectedly
17:53:19RuntimeBroker.exe initiates unplanned shutdown, Kernel-Power 109

Reproduces every 30–60 min of active use. No Minidump is generated — this is an OOM-driven graphics-stack crash, not a BSOD.

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.1.114 (Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Cursor

Additional Information

Likely related

  • #4953, #11315, #22188, #26528, #33356 (reported fixed in 2.1.74), #33735

Behaviour persists in 2.1.114 — the fix from #33356 does not cover this allocation pattern (MCP-heavy sessions on Windows).

extent analysis

TL;DR

The issue can be mitigated by investigating and addressing the memory leak in claude.exe, potentially by optimizing its memory allocation and deallocation patterns, especially during long-running sessions with multiple MCP servers connected.

Guidance

  • Review the code changes made in version 2.1.74 (fix for #33356) to understand how memory management was improved, and assess if similar optimizations can be applied to the current version (2.1.114) to handle MCP-heavy sessions.
  • Investigate the memory allocation patterns of claude.exe during long-running sessions, focusing on the handling of large file reads, MCP server connections, and subagent dispatches to identify potential memory leaks.
  • Consider implementing memory usage monitoring and logging in claude.exe to track its memory consumption over time and identify patterns or spikes that could indicate a memory leak.
  • Evaluate the feasibility of introducing a configurable memory ceiling for claude.exe to prevent it from exhausting system virtual memory, as suggested in the issue report.

Example

No specific code snippet can be provided without access to the claude.exe source code. However, a general approach to monitoring memory usage in a Node.js application could involve using the process.memoryUsage() method to track heap and RSS (Resident Set Size) memory usage over time.

Notes

The issue report suggests that the problem persists despite a previous fix (in version 2.1.74), indicating that the current issue might be related to a different allocation pattern or scenario not covered by the previous fix. The lack of a Minidump and the nature of the crash (OOM-driven graphics-stack crash) suggest that the issue is indeed related to memory management in claude.exe.

Recommendation

Apply a workaround by optimizing claude.exe's memory allocation and deallocation patterns, especially for MCP-heavy sessions, as the root cause seems to be a memory leak not fully addressed by the fix in version 2.1.74. This approach is chosen because it directly targets the suspected cause of the issue (memory leak) and aims to mitigate the problem without waiting for a potential future version update.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] claude.exe 2.1.114 consumes ~40 GB virtual memory on Windows 10, triggers system-wide OOM