Claude Code crashes with a fatal JavaScript heap out of memory error during file listing operations. The application reaches Node.js heap limit (~2GB) and terminates abruptly with error code "Aborted (core dumped)". This occurs when Claude attempts to process directory listings, particularly when dealing with large project directories (720 paths listed in this case).
Claude Code should handle large directory structures efficiently without running out of memory. The application should either:
● Flutter has line ending issues. Let me check if there's a build script available:
● List(../..)
⎿ Listed 720 paths (ctrl+r to expand)
✢ Marinating… (10s · ↑ 2.9k tokens · esc to interrupt)
╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ > │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
? for shortcuts
<--- Last few GCs --->
[23704:0x39b3e000] 2022988 ms: Mark-Compact (reduce) 2036.3 (2048.2) -> 2035.8 (2040.7) MB, pooled: 0 MB, 6.39 / 0.01 ms (+ 0.1 ms in 0 steps since start of marking, biggest step 0.0 ms, walltime since start of marking 54 ms) (average mu = 0.988, curren[23704:0x39b3e000] 2023091 ms: Mark-Compact 2049.9 (2054.8) -> 2049.8 (2057.8) MB, pooled: 0 MB, 28.39 / 0.00 ms (average mu = 0.955, current mu = 0.726) allocation failure; scavenge might not succeed
<--- JS stacktrace --->
FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
----- Native stack trace -----
1: 0xe13fde node::OOMErrorHandler(char const*, v8::OOMDetails const&) [claude]
2: 0x11d5070 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [claude]
3: 0x11d5347 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [claude]
4: 0x1402c05 [claude]
5: 0x141c499 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [claude]
6: 0x13f0b48 v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [claude]
7: 0x13f1a75 v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [claude]
8: 0x13c9e6e v8::internal::Factory::AllocateRaw(int, v8::internal::AllocationType, v8::internal::AllocationAlignment) [claude]
9: 0x13b8f64 v8::internal::FactoryBase<v8::internal::Factory>::AllocateRawWithImmortalMap(int, v8::internal::AllocationType, v8::internal::Tagged<v8::internal::Map>, v8::internal::AllocationAlignment) [claude]
10: 0x13bae6f v8::internal::FactoryBase<v8::internal::Factory>::NewRawTwoByteString(int, v8::internal::AllocationType) [claude]
11: 0x13d584a v8::internal::Factory::NewStringFromUtf8(v8::base::Vector<char const>, v8::internal::AllocationType) [claude]
12: 0x11f158d v8::String::NewFromUtf8(v8::Isolate*, char const*, v8::NewStringType, int) [claude]
13: 0x10e17d9 [claude]
14: 0xf36bf0 [claude]
15: 0x7f62bfe0f745
Aborted (core dumped)
Environment
Platform (select one):
Claude CLI version: 1.0.24 (Claude Code)
Operating System: Windows 10 (Build 26100.4351) with WSL 2
Terminal: WSL Command Prompt
Bug Description
Claude Code crashes with a fatal JavaScript heap out of memory error during file listing operations. The application reaches Node.js heap limit (~2GB) and terminates abruptly with error code "Aborted (core dumped)". This occurs when Claude attempts to process directory listings, particularly when dealing with large project directories (720 paths listed in this case).
Steps to Reproduce
List(../..)command showing "Listed 720 paths"Expected Behavior
Claude Code should handle large directory structures efficiently without running out of memory. The application should either:
Actual Behavior
Claude Code crashes completely with the following error sequence:
Additional Context
Complete Error Log:
Key Observations:
Potential Workarounds Needed: