JavaScript heap out of memory
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 1–100
Ranked by community engagement (reactions weighted over comments).
- Recurring crashes: JavaScript Heap Out of Memory while 'thinking'
- [BUG] VS Code extension crashes with OOM error: conversation history accumulates to 700MB+ causing infinite crash loop
- [BUG] Claude Code crashes due to OOM
- [BUG] JavaScript heap exhaustion (OOM crash) during heavy Task tool/agent usage
- Node.js Memory Allocation Failure in Latest Version
- [BUG] JavaScript heap out of memory crash when running parallel Explore subagents
- [CRITICAL] JavaScript heap out of memory crash during MCP operations
- [BUG] Desktop app crashes on launch with V8 heap OOM — single session .jsonl grew to 3.7 GB
- [BUG] Invalid .claude.json causes OOM
- Node.js Heap Out of Memory Error During Async Operation
- [BUG] Claude Code JavaScript Heap Out of Memory Error
- [BUG] Frequent crashes when running agents requiring repeated --resume cycles (Sonnet 4.5)
- [BUG] TDD Orchestrator crashes with "JavaScript heap out of memory" error
- [Bug] Out of Memory (OOM) Error During Code Generation
- OOM when running Claude in specific codebase
- [BUG] Cannot start or update CC due to JS FATAL ERROR
- [BUG] FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
- Crashed
- [BUG] FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
- [BUG] FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
- [BUG] Claude Desktop 1.2773.0 OOM crash on startup — skills sync memory leak
- [BUG] Title: Desktop app OOM crash on launch (~5s) when sidebarMode: "code" is set on 8 GB Mac
- Native memory leak (node-pty) on Node v24 + macOS Darwin
- [BUG] 2 hour session exhausts 4G and crashes claude code 2.0.28/2.0.29
- [BUG] Scrollback History after compacting CTRL+R and CTRL+E blank screen unresponsive
- Desktop app OOM crash on large .jsonl transcripts — /stats scanner has no per-file size limit
- Claude Desktop app crashes on launch: V8 OOM / JavaScript heap out of memory
- V8 Heap Out of Memory
- [BUG] Claude Crashes while in the middle of the code generation
- [BUG] Claude Code crashed in long session
- [BUG] Desktop app crashes on launch (V8 heap OOM) when a project has oversized session transcripts
- [BUG] [BUG] Claude Desktop Code section crashes on Intel UHD 630 — GPU crash + V8 OOM
- [BUG] Desktop Code/Cowork mode crashes instantly with OOM error — persists after fresh install, empty chats, confirmed not RAM-related (macOS Tahoe 26.4.1, v1.3036.0)
- [BUG] Reliable OOM on vanilla install when sub-agent invokes non-existent Skill
- [BUG] Claude Code crashes with OOM when manipulating terminal splits during active generation
- [BUG] FATAL ERROR: Reached heap limit
- [Bug] Node.js Out of Memory Error During Heap Allocation
- [BUG]
- FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
- Node.js Memory Exhaustion During JSON Serialization
- [BUG] Long running session crashes on /compact
- [BUG] Desktop app renderer OOMs at ~2.7 GB V8 heap within 15–50s when Dispatch is active (macOS 26.5, M5 Pro)
- Memory leak: BytesInternalReadableStreamSource ArrayBuffer accumulation (3.3GB in 59s)
- [BUG] /resume <shortname> causes OOM Abort trap, but just /resume or claude --resume <shortname> works
- [BUG] Deeper subagent call trigger OOM
- [BUG] JavaScript heap out of memory
- [Bug] Windows Heap Out of Memory Error with Subagent Task
- Node.js Heap Out of Memory Error During Script ExecutionThis issue title captures the core problem of a Node.js process failing due to memory allocation constraints
- [BUG]
- [BUG] OutOfMemory crashes after working on tasks in different terminals
- [BUG] Confirming same issue — macOS 26.5.1 (build 25F80), Apple Silicon (arm64), Claude Desktop 1.14271.0
- [BUG] [Critical] Claude Desktop v1.8555.2 crashes on launch with V8 OOM on macOS Tahoe 26.4.1
- [BUG] JavaScript heap OOM crash on long sessions — unbounded in-memory message accumulation
- /insights crashes with JavaScript heap out of memory (OOM)
- [Bug] JavaScript heap out of memory during execution
- [BUG] On VS Code 1.105.1: Claude panel empty + Extension host crashes (chatParticipant… + OOM)
- Node.js Heap Memory Exhaustion Preventing Chat History Retrieval
- JavaScript Heap Out of Memory During Stream Write Operation
- [BUG]
- Node.js Memory Allocation Failure During File Writing
- [BUG] Please provide complete log of everything done, so Claude can resume on crash
- [BUG] crash
- [BUG] UI Breaks and Crashes When Clearing Long Prompt History with Double Escape Key
- [BUG] claude.exe crashes with ACCESS_VIOLATION (0xc0000005) on Windows, repeatable, same code offset
- Code tab (cowork) OOM-crashes: /stats loads all ~/.claude/projects transcripts unbounded; ~/git-as-file makes project scanner walk all of $HOME
- Desktop app Code tab instantly closes app window on macOS 26.5 / Apple A18 Pro
- [BUG] Windows 1.6608.2 - OOM crash at startup, V8 heap out of memory, vhdx already extracted
- [BUG] Claude Desktop OOM crash on launch — JS heap hits ~3.4GB in ~12 seconds, macOS 26
- Oldest open memory bug report snapshot
- [BUG] Claude Desktop — V8 heap OOM on launch persists across 1.2773.0 and 1.3109.0
- [BUG] Claude Desktop v1.3109.0 crashes on launch (V8 OOM) — macOS 26.5 beta
- [BUG] [Windows] 1.2773.0 browser-process V8 OOM on launch
- OOM crash on large git repository since v2.1.83+ (was stable on v2.1.81)
- FATAL ERROR: JavaScript heap out of memory (OOM at ~4GB)
- Exit code 9 crash during concurrent Opus streaming — likely #19378 memory leak
- Extension host crashes (OOM) when loading large conversation history
- [Bug] JavaScript heap out of memory - allocation failed
- [BUG] Windows: Desktop App execution alias shadows Claude Code CLI in PATH
- OOM crash: background SSH/gcloud commands accumulate and exhaust Node.js heap
- VS Code extension crashes with OOM (2GB+ memory usage)
- [BUG] CRITICAL: /clear command leaks subagent processes causing memory crashes
- [BUG] "Related to #10520 (locked). Additional data point with different configuration..."
- [BUG] Claude Code OOM Crash
- [Bug] JavaScript heap out of memory during file operations
- [BUG] Claude Code v2.1.9 OOM Crash During Parallel Explore Agents
- [BUG] Memory crash (heap limit exceeded) when spawning fullstack-developer agent for trivial task
- [Bug] OOMed and crashed while running
- [Bug] JavaScript heap out of memory during execution
- [Bug] Out of Heap Memory Error in Long-Running Agent Sessions
- [Bug] JavaScript heap out of memory - allocation failure during execution
- [BUG] subagent call subagent cause memory overflow
- [BUG] Claude Code Issue Report: type: "prompt" hook causes JavaScript heap out of memory
- [BUG] VS Code extension hangs with "JavaScript heap out of memory" after extended use
- [BUG] Claude code extension memory leak issue
- JavaScript heap out of memory crash after extended session (~128k tokens)
- [Bug] JavaScript heap out of memory during string operations
- [Bug] JavaScript heap out of memory during garbage collection
- [BUG]
- [Bug] JavaScript heap out of memory during string operations
- Out of memory crash