claude-code - 💡(How to fix) Fix [BUG] Claude Desktop App keeps crashing [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#55948Fetched 2026-05-05 06:02:09
View on GitHub
Comments
2
Participants
2
Timeline
5
Reactions
0
Timeline (top)
labeled ×3commented ×2

Error Message

2026-05-04 15:44:53 [info] Main webview render process gone: { reason: 'crashed', exitCode: 5 } 2026-05-04 15:44:53 [error] Sentry caught: { ... } 2026-05-04 15:50:29 [info] Main webview render process gone: { reason: 'crashed', exitCode: 5 } 2026-05-04 16:04:50 [info] Main webview render process gone: { reason: 'crashed', exitCode: 5 }

— from ~/Library/Logs/Claude/unknown-window.log —

2026-04-10 07:11:09 [warn] [LOCAL_SESSION] [RenderLoopDetector] Rapid re-rendering in SessionUI: 20 renders in 1000ms 2026-04-10 07:49:54 [warn] [LOCAL_SESSION] [RenderLoopDetector] Rapid re-rendering in SessionUI: 20 renders in 1000ms 2026-04-10 07:49:55 [error] [LOCAL_SESSION] [RenderLoopDetector] RENDER LOOP in SessionUI: 40 renders in 1000ms. React will crash with error #185 (Maximum update depth exceeded). Diagnostics: {} 2026-04-10 08:35:06 [warn] [LOCAL_SESSION] [RenderLoopDetector] Rapid re-rendering in CCSessionList: 20 renders in 1000ms

— surrounded by hundreds of —

[error] Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'includes')

— side issue, also from main.log (unrelated to crashes but worth flagging) —

2026-05-04 15:47:01 [error] Failed to read version of python binary "python", failed with Error: Failed to spawn python (via disclaimer): /Applications/Claude.app/Contents/Helpers/disclaimer exited with code 127: Failed to spawn process: No such file or directory (macOS ships only python3 by default, not python)

— diagnostic checks confirming this is a renderer-only crash —

$ ls ~/Library/Logs/DiagnosticReports/Claude*.ips zsh: no matches found (no macOS-level crash reports — main process is fine)

Code Example

2026-05-04 15:44:53 [info] Main webview render process gone: { reason: 'crashed', exitCode: 5 }
2026-05-04 15:44:53 [error] Sentry caught: { ... }
2026-05-04 15:50:29 [info] Main webview render process gone: { reason: 'crashed', exitCode: 5 }
2026-05-04 16:04:50 [info] Main webview render process gone: { reason: 'crashed', exitCode: 5 }

from ~/Library/Logs/Claude/unknown-window.log
2026-04-10 07:11:09 [warn] [LOCAL_SESSION] [RenderLoopDetector] Rapid re-rendering in SessionUI: 20 renders in 1000ms
2026-04-10 07:49:54 [warn] [LOCAL_SESSION] [RenderLoopDetector] Rapid re-rendering in SessionUI: 20 renders in 1000ms
2026-04-10 07:49:55 [error] [LOCAL_SESSION] [RenderLoopDetector] RENDER LOOP in SessionUI: 40 renders in 1000ms.
                              React will crash with error #185 (Maximum update depth exceeded). Diagnostics: {}
2026-04-10 08:35:06 [warn] [LOCAL_SESSION] [RenderLoopDetector] Rapid re-rendering in CCSessionList: 20 renders in 1000ms

— surrounded by hundreds of
[error] Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'includes')

— side issue, also from main.log (unrelated to crashes but worth flagging)
2026-05-04 15:47:01 [error] Failed to read version of python binary "python", failed with Error:
  Failed to spawn python (via disclaimer):
  /Applications/Claude.app/Contents/Helpers/disclaimer exited with code 127:
  Failed to spawn process: No such file or directory
  (macOS ships only `python3` by default, not `python`)

— diagnostic checks confirming this is a renderer-only crash —

$ ls ~/Library/Logs/DiagnosticReports/Claude*.ips
zsh: no matches found  (no macOS-level crash reports — main process is fine)
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?

Claude Desktop's renderer process is crashing repeatedly with exitCode: 5. The window vanishes or reloads with no warning and no macOS crash dialog. Logs show the cause is a React infinite-render-loop in the SessionUI component (and occasionally CCSessionList), triggered by an unhandled TypeError: Cannot read properties of undefined (reading 'includes').

The main Electron process survives — only the renderer (the visible UI window) is dying and being auto-respawned. From my perspective, Claude just disappears mid-session.

Today (2026-05-04) it happened 3 times in 20 minutes. Same crash signature has been present in older logs going back to at least 2026-03-28.

What Should Happen?

The renderer process should stay alive throughout a session. The underlying TypeError should be caught without triggering a state update that re-runs the failing code path, and React should not hit error #185 (Maximum update depth exceeded).

Error Messages/Logs

2026-05-04 15:44:53 [info] Main webview render process gone: { reason: 'crashed', exitCode: 5 }
2026-05-04 15:44:53 [error] Sentry caught: { ... }
2026-05-04 15:50:29 [info] Main webview render process gone: { reason: 'crashed', exitCode: 5 }
2026-05-04 16:04:50 [info] Main webview render process gone: { reason: 'crashed', exitCode: 5 }

— from ~/Library/Logs/Claude/unknown-window.log —

2026-04-10 07:11:09 [warn] [LOCAL_SESSION] [RenderLoopDetector] Rapid re-rendering in SessionUI: 20 renders in 1000ms
2026-04-10 07:49:54 [warn] [LOCAL_SESSION] [RenderLoopDetector] Rapid re-rendering in SessionUI: 20 renders in 1000ms
2026-04-10 07:49:55 [error] [LOCAL_SESSION] [RenderLoopDetector] RENDER LOOP in SessionUI: 40 renders in 1000ms.
                              React will crash with error #185 (Maximum update depth exceeded). Diagnostics: {}
2026-04-10 08:35:06 [warn] [LOCAL_SESSION] [RenderLoopDetector] Rapid re-rendering in CCSessionList: 20 renders in 1000ms

— surrounded by hundreds of —

[error] Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'includes')

— side issue, also from main.log (unrelated to crashes but worth flagging)
2026-05-04 15:47:01 [error] Failed to read version of python binary "python", failed with Error:
  Failed to spawn python (via disclaimer):
  /Applications/Claude.app/Contents/Helpers/disclaimer exited with code 127:
  Failed to spawn process: No such file or directory
  (macOS ships only `python3` by default, not `python`)

— diagnostic checks confirming this is a renderer-only crash —

$ ls ~/Library/Logs/DiagnosticReports/Claude*.ips
zsh: no matches found  (no macOS-level crash reports — main process is fine)

Steps to Reproduce

I haven't isolated a deterministic trigger yet — the crash happens during normal use of an active Claude Code session. Pattern observed:

Open Claude Desktop (v1.5354.0) on macOS Apple Silicon Start or resume a Claude Code session (running with 22 enabled skills + MCP servers mcp-registry and Claude in Chrome) Use the session normally for a few minutes Window goes blank / vanishes / reloads with no warning Check ~/Library/Logs/Claude/main.log → see Main webview render process gone: { reason: 'crashed', exitCode: 5 } Check ~/Library/Logs/Claude/unknown-window.log → see RenderLoopDetector warnings escalating to RENDER LOOP in SessionUI: 40 renders in 1000ms followed by React error #185 The render-loop warnings appear before the crash, so logs show this is a deterministic React state-update cycle, not a random fault.

Claude Model

Not sure / Multiple models

Is this a regression?

I don't know

Last Working Version

Unsure. Same crash pattern (RenderLoopDetector + TypeError: Cannot read properties of undefined (reading 'includes')) appears in unknown-window1.log dated 2026-03-28 and unknown-window.log dated 2026-04-10, so it's been present for at least 5 weeks across multiple Claude Desktop versions.

Claude Code Version

2.1.126 (Claude Code), 1.5354.0 desktop app

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Other

Additional Information

App version: Claude Desktop 1.5354.0

Components implicated by RenderLoopDetector:

SessionUI — primary CCSessionList — secondary Diagnostic checks performed (all rule out unrelated causes):

No macOS crash dumps: ls ~/Library/Logs/DiagnosticReports/ | grep -i claude → empty No active AWS/external MCP processes: ps aux | grep -i awslabs → empty No memory-pressure jetsam events in unified log Active MCP servers limited to mcp-registry + Claude in Chrome Previously installed AWS API MCP extension uninstalled weeks ago — not a factor Logs available on request (from ~/Library/Logs/Claude/):

main.log (1.4 MB, current) main1.log (10 MB, rotated 2026-05-01) unknown-window.log (895 KB, 2026-04-10) unknown-window1.log (5 MB, 2026-03-28) claude.ai-web.log (2.5 MB, current) claude.ai-web1.log (5 MB, rotated today) The size of main1.log (10 MB before rotation) and unknown-window1.log (5 MB) suggests very high error-spew volume — likely the same render-loop firing many times before the renderer is finally killed.

Hypothesis: there's a code path in SessionUI where .includes() is called on a value that becomes undefined under certain session state, the resulting TypeError is caught in a way that triggers a React state update, and the re-render hits the same path — creating an infinite loop. Adding a defensive null-check before the .includes() call (or breaking the catch-handler's state-update chain) would likely resolve it.

extent analysis

TL;DR

The most likely fix is to add a defensive null-check before the .includes() call in the SessionUI component to prevent the TypeError and subsequent infinite render loop.

Guidance

  • Identify the specific code path in SessionUI where .includes() is called and verify that the value is not undefined before calling the method.
  • Add a null-check or optional chaining to prevent the TypeError, e.g., value?.includes() or if (value !== undefined) { value.includes() }.
  • Review the catch-handler's state-update chain to ensure it does not trigger a re-render that hits the same problematic code path.
  • Consider adding additional logging or debugging statements to understand the session state that leads to the undefined value.

Example

// Before
if (sessionState.includes('someValue')) {
  // ...
}

// After
if (sessionState !== undefined && sessionState.includes('someValue')) {
  // ...
}

Notes

The provided logs and diagnostic checks suggest that the issue is specific to the SessionUI component and is not related to external factors. However, without access to the codebase, it is difficult to provide a more specific solution.

Recommendation

Apply the workaround by adding defensive null-checks to prevent the TypeError and subsequent infinite render loop. This should resolve the issue and prevent the renderer process from crashing.

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