[Bug] Node.js Out of Memory Error During Large Heap Operations [Duplicate issue]

Resolved 💬 3 comments Opened Sep 12, 2025 by alephpt Closed Sep 16, 2025

Bug Description
<--- Last few GCs --->

[377280:0x5599a2cd1000] 60854345 ms: Scavenge (interleaved) 4036.4 (4096.2) -> 4023.7 (4170.4) MB, pooled: 0 MB, 10.80 / 0.00 ms (average mu = 0.190, current mu = 0.136) allocation failure;
[377280:0x5599a2cd1000] 60855644 ms: Mark-Compact (reduce) 4023.9 (4170.4) -> 4018.7 (4048.7) MB, pooled: 0 MB, 1284.66 / 0.00 ms (+ 10.9 ms in 3 steps since start of marking, biggest step 5.0 ms, walltime since start of marking 1299 ms) (average mu = 0.
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
----- Native stack trace -----

1: 0x559961504118 node::OOMErrorHandler(char const*, v8::OOMDetails const&) [claude]
2: 0x559961a34b34 v8::Utils::ReportOOMFailure(v8::internal::Isolate, char const, v8::OOMDetails const&) [claude]
3: 0x559961a34c3b v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate, char const, v8::OOMDetails const&) [claude]
4: 0x559961cc5a1c [claude]
5: 0x559961ccbcd6 v8::internal::Heap::CheckIneffectiveMarkCompact(unsigned long, double) [claude]
6: 0x559961ccbde7 v8::internal::Heap::RecomputeLimits(v8::internal::GarbageCollector, v8::base::TimeTicks) [claude]
7: 0x559961cdb524 [claude]
8: 0x559961cde754 [claude]
9: 0x559962770f67 [claude]
[1] 377280 IOT instruction (core dumped) claude

This caused my claude session to crash. Recurring issue. Posting for more potential insight

Environment Info

  • Platform: linux
  • Terminal: alacritty
  • Version: 1.0.110
  • Feedback ID: 5fde6623-0f16-4d75-8459-aaf1be17cf80

Errors

[{"error":"Error: Insufficient permissions for global npm install.\n    at YD0 (file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:1622:1009)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async FG1 (file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:1632:43)\n    at async file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:3585:12430","timestamp":"2025-09-12T11:44:20.713Z"},{"error":"Error: Insufficient permissions for global npm install.\n    at YD0 (file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:1622:1009)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async FG1 (file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:1632:43)\n    at async file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:3585:12430","timestamp":"2025-09-12T11:44:23.818Z"}]

View original on GitHub ↗

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