-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Open
Description
Description
Claude Code sessions are crashing due to V8 heap exhaustion (Out of Memory). The Node.js process accumulates memory until garbage collection fails, triggering abort().
Environment
- Claude Code version: 2.1.6
- Node version: v23.6.0
- OS: macOS 26.0.1 (Darwin 25.0.0)
- Platform: Apple Silicon (M4 Max, arm64)
- RAM: 64GB
Crash Evidence
Multiple crash reports in ~/Library/Logs/DiagnosticReports/node-*.ips showing the same pattern:
"termination": {
"code": 6,
"namespace": "SIGNAL",
"indicator": "Abort trap: 6"
}
"asi": {"libsystem_c.dylib": ["abort() called"]}Stack trace:
node::OOMErrorHandler(char const*, v8::OOMDetails const&)
v8::Utils::ReportOOMFailure(v8::internal::Isolate*, ...)
v8::internal::V8::FatalProcessOutOfMemory(...)
v8::internal::Heap::FatalProcessOutOfMemory(char const*)
v8::internal::Heap::CheckIneffectiveMarkCompact(...)
v8::internal::Heap::CollectGarbage(...)
Reproduction
- Run multiple Claude Code sessions in parallel (3-4 terminal tabs)
- Use sessions for extended periods (30+ minutes) with moderate tool usage
- Sessions crash simultaneously when heap is exhausted
Observations
- 10 crash reports in a single day
- Multiple sessions crash at the exact same millisecond (shared heap?)
- Debug logs show normal operation until abrupt termination (no graceful SessionEnd logged)
- Sessions that logged
SessionEnd with query: othervs sessions that just died suggest two crash modes
Workaround
Increasing Node.js heap size delays the crash:
export NODE_OPTIONS="--max-old-space-size=8192"Crash Report Timestamps (2026-01-13)
- 16:23:42
- 16:39:01
- 18:28:48 (3 reports)
- 19:35:29
- 19:45:42
- 21:36:06
- 21:48:44
- 21:48:45
Additional Context
This appears to be a memory leak rather than legitimate memory usage - 64GB machine shouldn't be hitting OOM on CLI tool sessions. Possibly related to:
- Conversation context accumulation
- MCP server connections
- Subagent spawning
- Debug logging
Happy to provide full crash reports if helpful.
🤖 Generated with Claude Code
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels