claude-code - 💡(How to fix) Fix [BUG] Desktop app crashes on launch with V8 heap OOM — single session .jsonl grew to 3.7 GB [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#48210Fetched 2026-04-15 06:30:04
View on GitHub
Comments
0
Participants
1
Timeline
8
Reactions
0
Author
Participants
Timeline (top)
labeled ×5cross-referenced ×3

Error Message

$ /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

Root Cause

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.

Fix Action

Fix / Workaround

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)

Code Example

$ /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
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • 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.

  1. The app crashes hard instead of handling oversized session files gracefully (skipping, truncating, or raising the heap limit).
  2. 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?

  1. 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.
  2. 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

  1. 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.)
  2. Launch the Claude desktop app (v1.2581.0) on macOS 26.3.1.
  3. App crashes immediately with V8 heap OOM at ~3.8 GB.
  4. 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.

extent analysis

TL;DR

The Claude desktop app crashes due to a V8 JavaScript heap out-of-memory error caused by oversized session transcript files, and a potential fix involves modifying the app to handle large files more efficiently or preventing individual session files from growing too large.

Guidance

  • Identify and remove or truncate oversized session transcript files in ~/.claude/projects/ to prevent the app from crashing.
  • Consider implementing a mechanism to limit the size of individual session files or to lazy-load transcripts on demand to avoid loading large files into memory all at once.
  • Investigate the "BuddyBleTransport.reportState" handler error to determine if it is related to the crash.
  • Review the app's memory management and consider increasing the JavaScript heap limit if necessary, although this may not be effective as seen with the --max-old-space-size flag.

Example

No specific code example is provided as the issue is more related to the app's behavior and memory management rather than a specific code snippet.

Notes

The provided workaround of moving oversized files out of ~/.claude/projects/ fixes the immediate issue but does not address the underlying problem of the app's handling of large session files. The "BuddyBleTransport.reportState" handler error may be related to the crash, but its significance is unclear without further investigation.

Recommendation

Apply a workaround by removing or truncating oversized session files and consider implementing a more robust solution to handle large files, as simply increasing the JavaScript heap limit may not be effective.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING