[BUG] Claude Desktop App keeps crashing
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?
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.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗