[BUG] Desktop app crashes on launch with V8 heap OOM — single session .jsonl grew to 3.7 GB
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)
- [x] I am using the latest version of Claude Code
What's Wrong?
The Claude desktop app (v1.2581.0) crashes immediately on launch on macOS 26.3.1 with a V8 JavaScript heap out-of-memory error at ~3.8 GB. No crash report is generated in ~/Library/Logs/DiagnosticReports/.
Root cause: a single session transcript file in ~/.claude/projects/-Users-pedro-code had grown to 3.7 GB, with another at 1.9 GB. The app appears to load all session history into memory on launch, and these files blow past the default V8 heap limit. Related to #19476.
- The app crashes hard instead of handling oversized session files gracefully (skipping, truncating, or raising the heap limit).
- Individual session .jsonl files should never grow to multi-gigabyte sizes. A 3.7 GB single-session transcript strongly suggests Claude Code entered a runaway loop re-reading the same large files into context on every turn without deduplication.
A "BuddyBleTransport.reportState" handler error ("No handler registered for...") appeared in the logs immediately before the OOM on every launch attempt, noted in case it's related.
What Should Happen?
- The app should launch successfully regardless of accumulated session history size. It should either lazy-load transcripts on demand, cap the amount loaded on startup, or skip/truncate files that exceed a safe size threshold.
- Claude Code should not allow individual session .jsonl files to grow to multi-gigabyte sizes. Some form of size monitoring, warning, or rotation should prevent a single session from consuming >500 MB of disk.
Error Messages/Logs
$ /Applications/Claude.app/Contents/MacOS/Claude
(node:92942) [DEP0180] DeprecationWarning: fs.Stats constructor is deprecated.
(node:92942) [DEP0040] DeprecationWarning: The `punycode` module is deprecated.
(node:92942) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 change listeners added to [jin]. MaxListeners is 10.
2026-04-14 20:29:45.237 Claude[92942:12785963] The running client is already the latest version.
(node:92942) [DEP0169] DeprecationWarning: `url.parse()` behavior is not standardized.
Error occurred in handler for '$eipc_message$_62e7211c-f2d4-4555-8e45-81ccc5b34930_$_claude.buddy_$_BuddyBleTransport_$_reportState': Error: No handler registered for '$eipc_message$_62e7211c-f2d4-4555-8e45-81ccc5b34930_$_claude.buddy_$_BuddyBleTransport_$_reportState'
at Session.<anonymous> (node:electron/js2c/browser_init:2:116575)
at Session.emit (node:events:508:28)
<--- Last few GCs --->
[92942:0x12c006d0000] 16379 ms: Scavenge 3812.8 (3881.2) -> 3811.2 (3882.0) MB, pooled: 1.0 MB, 0.80 / 0.00 ms (average mu = 0.762, current mu = 0.114) allocation failure;
[92942:0x12c006d0000] 16379 ms: Scavenge 3811.2 (3882.0) -> 3811.0 (3883.0) MB, pooled: 0.0 MB, 0.26 / 0.00 ms (average mu = 0.762, current mu = 0.114) allocation failure;
[92942:0414/203000.140834:ERROR:electron/shell/common/node_bindings.cc:185] OOM error in V8: MarkCompactCollector: young object promotion failed Allocation failed - JavaScript heap out of memory
[0414/203000.156928:WARNING:third_party/crashpad/crashpad/util/process/process_memory_mac.cc:94] mach_vm_read(0x16d724000, 0x8000): (os/kern) invalid address (1)
zsh: trace trap /Applications/Claude.app/Contents/MacOS/Claude
Steps to Reproduce
- Use Claude Code heavily in a single project for an extended period such that ~/.claude/projects/<project>/ contains multi-GB session files. (In my case, a single .jsonl grew to 3.7 GB and another to 1.9 GB during normal use — I did not intentionally create oversized files.)
- Launch the Claude desktop app (v1.2581.0) on macOS 26.3.1.
- App crashes immediately with V8 heap OOM at ~3.8 GB.
- No crash report is generated in ~/Library/Logs/DiagnosticReports/.
To verify the cause:
- du -sh ~/.claude/projects/ (showed 6.6 GB)
- du -sh ~/.claude/projects//.jsonl | sort -h (revealed two 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 workarounds that did NOT work:
- Clearing ~/Library/Application Support/Claude-3p/Cache, Code Cache, GPUCache, DawnGraphiteCache, DawnWebGPUCache
- Deleting the VM bundle
- Launching with --js-flags="--max-old-space-size=8192" (flag appears not to be passed through)
- Launching with NODE_OPTIONS="--max-old-space-size=8192" (still crashed at 3.8 GB, suggesting the limit was ignored)
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
1.2581.0 (desktop app, from Info.plist CFBundleShortVersionString)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
Related issue: #19476 describes the same root cause (multi-GB accumulation in ~/.claude/projects/ exceeding the heap limit on startup), but with total accumulated size across many files rather than a single runaway file. This report is specifically about the single-file case, which implies a distinct runaway-write bug in Claude Code itself in addition to the startup loading issue.
My ~/.claude/projects/-Users-pedro-code/ directory had this size distribution before cleanup:
- 3.7 GB 275e5960-862b-4544-9a91-01a889bfdf26.jsonl (outlier)
- 1.9 GB b11c6ce8-96aa-422c-b085-f82dddd71ebd.jsonl (outlier)
- 22 MB 68969791-... .jsonl (largest non-outlier)
- Everything else <1 MB
The two outliers are 2-3 orders of magnitude larger than any other session file in the project, which points to a bug rather than normal heavy usage.
Happy to provide the runaway .jsonl files (I've preserved them) if that would help diagnose the runaway-write side of the bug.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗