FATAL ERROR: JavaScript heap out of memory (OOM at ~4GB)

Resolved 💬 3 comments Opened Feb 18, 2026 by syd-ppt Closed Feb 22, 2026

Description

Claude Code crashes with a V8 heap out of memory error during normal usage. The heap grows to ~4GB before the process is killed.

Error

<--- Last few GCs --->

[46932:000001E30EB21000]    16438 ms: Mark-Compact 3989.6 (4027.1) -> 3989.5 (4027.4) MB, pooled: 25 MB, 15.88 / 0.00 ms  (average mu = 0.930, current mu = 0.915) allocation failure; scavenge might not succeed
[46932:000001E30EB21000]    16581 ms: Mark-Compact 4157.8 (4195.7) -> 4157.8 (4195.2) MB, pooled: 26 MB, 31.20 / 0.00 ms  (average mu = 0.889, current mu = 0.781) allocation failure; scavenge might not succeed


<--- JS stacktrace --->

FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
----- Native stack trace -----

 1: 00007FF6E2147487 node::SetCppgcReference+16583
 2: 00007FF6E20AB1B8 v8::base::CPU::num_virtual_address_bits+103032
 3: 00007FF6E2C1C011 v8::Isolate::ReportExternalAllocationLimitReached+65
 4: 00007FF6E2C08B96 v8::Function::Experimental_IsNopFunction+3302
 5: 00007FF6E2A654E0 v8::internal::StrongRootAllocatorBase::StrongRootAllocatorBase+33904
 6: 00007FF6E2A61B6A v8::internal::StrongRootAllocatorBase::StrongRootAllocatorBase+19194
 7: 00007FF6E2A7800C v8::Isolate::GetHeapProfiler+7692
 8: 00007FF6E2A7888A v8::Isolate::GetHeapProfiler+9866
 9: 00007FF6E2A83971 v8::Isolate::GetHeapProfiler+55153
10: 00007FF6E2A936C6 v8::Isolate::GetHeapProfiler+120006
11: 00007FF6E2A984D8 v8::Isolate::GetHeapProfiler+139992
12: 00007FF6E298F3DB v8::Message::GetIsolate+372411
13: 00007FF6E298C32D v8::Message::GetIsolate+359949
14: 00007FF6E298F654 v8::Message::GetIsolate+373044
15: 00007FF6E2BBF3D5 v8::SharedValueConveyor::SharedValueConveyor+265589
16: 00007FF6E2BBF650 v8::SharedValueConveyor::SharedValueConveyor+266224
17: 00007FF682CAD3FA

Environment

  • OS: Windows 11 Pro 10.0.26200
  • Platform: win32
  • Shell: bash
  • Heap at crash: ~4.1 GB
  • Time to crash: ~16.5 seconds into GC cycle

Notes

  • Mark-Compact GC was unable to reclaim memory (3989.5 MB → 4157.8 MB between last two GCs)
  • current mu = 0.781 dropping from 0.915 indicates rapidly increasing GC pressure
  • Crash occurred due to allocation failure; scavenge might not succeed

View original on GitHub ↗

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