claude-code - 💡(How to fix) Fix Desktop app renderer crashes (exitCode 5) when opening large sessions (7K-14K messages) [2 comments, 2 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#56379Fetched 2026-05-06 06:29:40
View on GitHub
Comments
2
Participants
2
Timeline
6
Reactions
0
Author
Timeline (top)
labeled ×4commented ×2

The Claude desktop app renderer process crashes consistently (Main webview render process gone: { reason: 'crashed', exitCode: 5 }) when clicking on sessions with very large conversation histories. The app recovers but immediately crashes again on the next attempt to open the session.

Error Message

[error] Sentry caught: { value: 'Main webview render process gone' }

Root Cause

Root cause (from logs)

Fix Action

Workaround

claude --continue in the project directory works fine — the CLI streams without rendering full history.

Code Example

[info] [CCD] LocalSessions.setFocusedSession: sessionId=local_311cb25c-...
[info] [LocalPluginsReader] Found 2 local plugins
[info] [CCD] [replaceRemoteMcpServers] Calling SDK with 8 total servers
[info] Main webview render process gone: { reason: 'crashed', exitCode: 5 }
[error] Sentry caught: { value: 'Main webview render process gone' }

---

36 MB  / 14,425 lines  → crash
25 MB  /  7,787 lines  → crash
20 MB  /  ~5,700 lines  (untested but likely)
RAW_BUFFERClick to expand / collapse

Summary

The Claude desktop app renderer process crashes consistently (Main webview render process gone: { reason: 'crashed', exitCode: 5 }) when clicking on sessions with very large conversation histories. The app recovers but immediately crashes again on the next attempt to open the session.

Environment

  • Claude desktop app: 1.5354.0
  • Claude CLI: 2.1.128
  • macOS: Darwin 25.3.0 (Apple Silicon, arm64)
  • RAM: 24 GB
  • Node.js: v24.2.0

Reproduction

  1. Accumulate a long session (7,000–14,000 messages / 25–36 MB JSONL)
  2. Open the Claude desktop app
  3. Click the session in the sidebar

Result: Renderer crashes within 3–5 seconds. The app auto-reloads but crashes again on the next click of the same session. 34 crashes observed in a single day.

Root cause (from logs)

The renderer mounts the full message history as DOM nodes all at once. With 7,787–14,425 messages, the renderer heap is exhausted and the browser process kills it with exitCode: 5 (RESULT_CODE_KILLED).

The crash is always preceded by [CCD] [replaceRemoteMcpServers] Calling SDK with N servers — the renderer is being killed during or just after initial session render.

Relevant log lines:

[info] [CCD] LocalSessions.setFocusedSession: sessionId=local_311cb25c-...
[info] [LocalPluginsReader] Found 2 local plugins
[info] [CCD] [replaceRemoteMcpServers] Calling SDK with 8 total servers
[info] Main webview render process gone: { reason: 'crashed', exitCode: 5 }
[error] Sentry caught: { value: 'Main webview render process gone' }

Contributing factor: GitHub repo API polling fires unauthenticated 401 errors every ~7 seconds (/api/organizations/.../code/repos), adding constant GC pressure during the already-expensive initial render.

Affected session sizes

36 MB  / 14,425 lines  → crash
25 MB  /  7,787 lines  → crash
20 MB  /  ~5,700 lines → (untested but likely)

Workaround

claude --continue in the project directory works fine — the CLI streams without rendering full history.

Suggested fix

Virtualize the message list (e.g. react-virtuoso or similar) so only visible messages are mounted. The current approach of mounting the full history is not viable for long-running sessions.

extent analysis

TL;DR

Implementing virtualization for the message list, such as using react-virtuoso, is likely to fix the renderer crash issue by only mounting visible messages.

Guidance

  • Identify the performance bottleneck: The crash occurs due to the renderer heap being exhausted when mounting a large number of DOM nodes for the message history.
  • Verify the issue: Reproduce the crash by opening a session with a large conversation history (7,000-14,000 messages) and observe the renderer crash within 3-5 seconds.
  • Mitigate the issue: Use the claude --continue command in the project directory as a temporary workaround, which allows the CLI to stream without rendering the full history.
  • Investigate virtualization libraries: Research and evaluate libraries like react-virtuoso to implement virtualization for the message list, reducing the number of DOM nodes mounted.

Example

No code snippet is provided as the issue does not contain sufficient code context.

Notes

The suggested fix may require significant changes to the rendering logic, and the choice of virtualization library may depend on the specific requirements of the application.

Recommendation

Apply the workaround using claude --continue until a permanent fix can be implemented, as it allows the application to function without rendering the full message history.

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