JavaScript heap out of memory — page 2
V8 exhausted its heap and aborted the process.
142 issues · 4 open · 138 resolved (97%) · first seen Mar 5, 2025
First response · local
What to do now
Most likely: The local Claude Code process crashed while parsing or executing.
- Record the Claude Code version and the first stack frame before restarting.
- Try a fresh session with the same minimal input to distinguish corrupted state from a repeatable crash.
- Preserve logs and compare reports from the same version before downgrading.
These are conservative triage steps, not an official Anthropic fix. Use the issue and workaround evidence below before making a destructive configuration change.
Is this getting better or worse?
This class of problem is converging. 7 new reports in the last 90 days vs 23 in the 90 before — -70%. The open backlog peaked at 26 in 2025-10 and sits at 4 today.
Derived by counting each matching issue from its creation date until it closed. First-party
computation over the anthropics/claude-code tracker — the trend is not published
anywhere upstream.
Which builds report this
32 of these reports name the Claude Code build they were running, spanning 24 releases. Heaviest reporters:
- Claude Code v2.0.76
- Claude Code v2.1.39
- Claude Code v2.1.15
- Claude Code v2.1.9
- Claude Code v2.1.241
- Claude Code v2.1.231
- Claude Code v2.1.227
- Claude Code v2.1.51
Report volume, not a defect count: an issue can mention a build without that build having caused the failure. Versions come from the version string in the bug-report template, matched against real published tags.
Do these get fixed?
Median time to close is 4 days across 138 closures. Of the 138 closures with a recorded reason, 20% were closed as completed and 111 as not-planned or duplicate. The most recent completed fix landed in 2026-06.
Workarounds reported by the community
31 of these issues post a workaround someone says worked. The highest-engagement ones:
- Recurring crashes: JavaScript Heap Out of Memory while 'thinking'
- Temporary fix:
Found in the thread of #1421 · still open - [BUG] VS Code extension crashes with OOM error: conversation history accumulates to 700MB+ causing infinite crash loop
- Preflight Checklist - [x] I have searched [existing issues]( and this hasn't been reported yet - [x] This is a single bug report (please file separate reports for different bugs) -
Found in the description of #8722 · resolved - [BUG] JavaScript heap exhaustion (OOM crash) during heavy Task tool/agent usage
- …s there a maximum recommended number of agents per session? Workarounds Attempted - Starting fresh sessions frequently (helps but disruptive) - Sequential instead of parallel agent spawning (reduces peak memory) - Smalle…
Found in the description of #16470 · resolved - [BUG] JavaScript heap out of memory crash when running parallel Explore subagents
- …I use: I'm gonna spam this a few places since it's a useful workaround for some of the bugs in this claude code version where peak memory consumption may be 10x larger than average.
Found in the thread of #19100 · resolved - [BUG] Desktop app crashes on launch with V8 heap OOM — single session .jsonl grew to 3.7 GB
- …outlier files at 3.7 GB and 1.9 GB, everything else <25 MB) Workaround that fixed it: - Move the two oversized .jsonl files out of ~/.claude/projects/ - App now launches cleanly and session history is ~1.1 GB Attempted w…
Found in the description of #48210 · resolved
Excerpts are quoted from the linked issue so you can judge relevance before opening it. Threads that only ask for a workaround, or report that there is none, are excluded. These are community suggestions, not official guidance from Anthropic — read the full thread before applying one.
Matching issues 101–142
Ranked by community engagement (reactions weighted over comments).
- FATAL ERROR: JavaScript heap out of memory when parsing large .claude.json state file
- [CRITICAL] Extension Host OOM Crash During Initialization - No Workaround Exists
- [Bug] JavaScript heap out of memory - excessive memory allocation
- [BUG] core dumped while running slash command
- [Bug] Node.js Out of Memory Error During Large Heap Operations [Duplicate issue]
- [BUG] Claude Code: Crash: JavaScript heap out of memory
- [Bug] Node.js Heap Out of Memory Error During Garbage Collection
- Node.js Heap Out of Memory Error During Execution
- Node.js Out of Memory Error During Large Heap Allocation
- [BUG]
- [BUG]
- Node.js Heap Overflow in Sub-Agents During Large Codebase Processing
- Fatal "JavaScript heap out of memory" crash caused by inefficient hook transcript parsing`
- Node.js Memory Exhaustion: Heap Allocation Failure During Resume Command
- JavaScript Heap Out of Memory During String Split Operation
- Node.js Heap Out of Memory: Ineffective Mark-Compacts Near Heap Limit
- Node.js Memory Leak in Conversation Resume on Large Conversation History
- CRITICAL: Memory and Context Management Issues - Hotfix Tracking
- [BUG] Claude Desktop crashes on launch with a V8 "JavaScript heap out of memory" error every time, making the app unusable. The window opens briefly (~15–18 seconds) then dies with SIGTRAP / trace trap. Persists across a full clean reinstall.
- [BUG] claude app crashes seconds after being opened
- [BUG] Claude Desktop Constantly Crashing
- Claude Desktop crashes on launch: V8 OOM on macOS Apple Silicon (duplicate of #48261)
- [Bug] JavaScript heap out of memory during execution
- Security-sentinel agent causes Node.js heap out of memory error
- [BUG] always reporting Javascript heap out of memory when using `pnpm install @anthropic-ai/claude-code`
- [BUG] Crash: claude --resume causes JavaScript heap out of memory error
- [BUG] Claude Code Fatal Memory Error - JavaScript Heap Out of Memory
- [BUG] Hang and crash
- [BUG] JS heap limit allocation failed when running claude code
- [BUG] claude crashed after working on a file for a while
- [BUG] oom crash
- [BUG] Fatal Memory Allocation Failure
- [BUG] FATAL ERROR : Reached heap limit Allocation failed
- [BUG] Core dumped issue
- Here's a concise, technical GitHub issue title: "V8 Heap Exhaustion: Allocation Failure During Mark-Compact GC" Rationale: - Specifies the specific V8 garbage collection problem - Highlights the key technical issue of heap memory exhaustion - Uses precis
- [BUG] crash during garbage collection...
- [BUG]
- [BUG] Stuck and keeps crashing - FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
- [BUG] Ouf of memory
- Node.js Heap Out of Memory Error During Stream Write Operation
- [BUG] VS Code extension host restart due to OOM caused by Claude Code loading histories of ALL sessions!
- Claude Code CLI reached ~14.6 GiB RSS and triggered a host-wide OOM kill