[Bug] Renderer crash burst: 4× Sentry 'type: Unknown / No message / stack: undefined' on session resume, followed by capturePreviewScreenshot NOT_FOUND — macOS, 2.1.121

Resolved 💬 3 comments Opened May 1, 2026 by chriscase Closed Jun 1, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported as the same failure mode
  • [x] This is a single bug report (one specific failure signature)
  • [x] I am using a recent version (CLI 2.1.126, Desktop CCD 2.1.121)

Environment

| | |
|---|---|
| Claude Code CLI | 2.1.126 |
| Claude Desktop / CCD | 2.1.121 |
| OS | macOS 26.3 (Build 25D125) |
| Active MCP servers in this session | Claude in Chrome, Claude Preview, ccd_session, ccd_session_mgmt, ccd_directory, scheduled-tasks, mcp-registry |
| Active Tauri/Vite dev server in cwd | yes — NexaDeck running via \pnpm tauri dev\ and \vite dev\ on :1420 |

Symptom

Desktop GUI was running, focused on a single Claude Code session for 30+ minutes of continuous work in \~/Documents/GitHub/NexaDeck\. Without me switching sessions the GUI hung / blanked / required restart.

This is distinct from #51649 (which is the long-context / compaction-recovery cluster) and from #51829 (which is Windows-specific empty-sidebar at startup, while mine is mid-session on macOS).

What the logs show

A clean, timestamped, 5-second crash burst in \~/Library/Logs/Claude/main.log\:

\\\
2026-05-01 00:27:16 [info] [CCD] Initialized with version 2.1.121
2026-05-01 00:27:17 [info] [Claude in Chrome] MCP server registered
2026-05-01 00:27:17 [error] Sentry caught: {
eventId: '01531d35e04d4b8faa6e90b47df5681c',
type: 'Unknown',
value: 'No message',
stack: undefined
}
2026-05-01 00:27:17 [error] Sentry caught: {
eventId: '7dddac5834584b5b87c6af35e0c31637',
type: 'Unknown',
value: 'No message',
stack: undefined
}
2026-05-01 00:27:17 [error] Sentry caught: {
eventId: 'ee7448306eeb49c28a018c3438b7ed46',
type: 'Unknown',
value: 'No message',
stack: undefined
}
2026-05-01 00:27:17 [error] Sentry caught: {
eventId: '6196fbbfe3e34b9d98c161220f4c409a',
type: 'Unknown',
value: 'No message',
stack: undefined
}
2026-05-01 00:27:20 [warn] [Preview] capturePreviewScreenshot failed: {
error: g0A [PreviewError]: Preview not found for server a8cd4317-6035-4c32-895a-f88312c0a9e0
at TOt (.../app.asar/.vite/build/index.js:1496:9985)
at bOt (.../app.asar/.vite/build/index.js:1496:10337)
at cGr (.../app.asar/.vite/build/index.js:1496:10587)
at Object.capturePreviewScreenshot (.../app.asar/.vite/build/index.js:6445:5038)
at .../app.asar/.vite/build/index.js:43:318721
at Session.<anonymous> (node:electron/js2c/browser_init:2:116026)
at Session.emit (node:events:509:28)
[stack]: [Getter/Setter],
[message]: 'Preview not found for server a8cd4317-6035-4c32-895a-f88312c0a9e0',
code: 'NOT_FOUND',
name: 'PreviewError'
}
}
2026-05-01 00:27:20 [info] [CCD] LocalSessions.setFocusedSession: sessionId=null
2026-05-01 00:27:20 [info] [buddy] starting bridge
\
\\

Sentry event IDs (so triage can pull stack traces directly)

\\\
01531d35e04d4b8faa6e90b47df5681c
7dddac5834584b5b87c6af35e0c31637
ee7448306eeb49c28a018c3438b7ed46
6196fbbfe3e34b9d98c161220f4c409a
\
\\

Pattern interpretation

  1. CCD reinitialized at 00:27:16 (this is the 5th \[CCD] Initialized\ entry in <12 hours — full timeline below)
  2. While reinitializing, integrations get rewired: Chrome Extension MCP, native messaging hosts, growthbook features
  3. Four exceptions thrown in the same second are caught by Sentry but reported with \type: 'Unknown'\, \value: 'No message'\, \stack: undefined\ — meaning whatever was thrown was a non-Error primitive or undefined, which Sentry's enrichment can't unpack. This is the actionable bug: somewhere a code path throws \throw "string"\ or \throw undefined\, producing un-debuggable telemetry.
  4. 3 seconds later \capturePreviewScreenshot\ throws \PreviewError code: NOT_FOUND\ because the Preview server it's trying to thumbnail \a8cd4317-...\ is gone (most likely the session's bound Tauri/Vite preview died or was never registered).
  5. Result: \setFocusedSession=null\, \buddy starting bridge\ — recovery infra kicks in. The user-visible state is "GUI hung / required restart".

Reinitialization frequency (related signal — same machine, same day)

\\\
2026-04-30 13:02:32 [info] [CCD] Initialized with version 2.1.121
2026-04-30 23:28:33 [info] [CCD] Initialized with version 2.1.121
2026-04-30 23:51:49 [info] [CCD] Initialized with version 2.1.121 ← 23 min after previous
2026-05-01 00:14:23 [info] [CCD] Initialized with version 2.1.121 ← 23 min later
2026-05-01 00:27:17 [info] [CCD] Initialized with version 2.1.121 ← 13 min later (this is the one that produced the burst above)
\
\\

That's 4 reinits in ~1 hour. The user's experience is that "Claude Code keeps crashing" — even when an individual reinit recovers, the cumulative cost is real.

What I ruled out (preempting common triage questions)

  • "Long-context-related?" — No. Session history was active but the GUI was working a moment before the burst. Not a compaction-recovery event. The compaction-cluster of crashes is tracked separately at #51649.
  • "Did you switch sessions?" — No. Single focused session for 30+ minutes prior.
  • "Network blip?" — Other network calls in the same second succeeded (\[oauth] using cached token\, \growthbook\, \Chrome Extension MCP\ all OK). Not a connectivity event.
  • "Stale install / corrupt cache?" — Not the cluster signature. Reinitializes succeed; what fails is a specific integration call inside a healthy reinit.
  • "Preview MCP timeout?" — No, that's #46501 / #53475 / #46507 (those are the user-invoked \preview_screenshot\ MCP tool returning black/timing-out). The error here is the internal automatic \capturePreviewScreenshot\ (likely sidebar thumbnailing) throwing synchronously with \code: NOT_FOUND\.
  • "Try clear cache / reinstall?" — Not actionable for a transient one-off; the real fix is whatever's throwing the four un-typed exceptions.

What would help to fix this

  1. Look up the four Sentry event IDs above — the un-typed throws are the actual bug. Find the \throw\ site that emits a non-Error and replace with \throw new Error(...)\.
  2. Defensive coercion at the Sentry boundary — if a non-Error reaches Sentry, wrap it as \new Error(String(e))\ before sending so future occurrences carry usable telemetry rather than \type: 'Unknown'\.
  3. \capturePreviewScreenshot\ resilience — when the preview server has gone away (\code: NOT_FOUND\), this should be a no-op log line, not an unhandled rejection that propagates into session state. The fact that \setFocusedSession=null\ follows suggests the failure is bubbling further than intended.

Related issues (cluster, but distinct symptoms)

  • #51649 — Webview hangs on session switch w/ concurrent MCP ops (long-context cluster; different, but the user has seen both)
  • #51829 — Windows: sidebar empty + \setFocusedSession=null\ at startup (shares the focused-session-null tail signature, but it's startup-only and Windows; this issue is mid-session and macOS)
  • #46501 / #53475 / #46507 — \preview_screenshot\ MCP user-tool failures (different surface — \capturePreviewScreenshot\ is internal automatic capture, not the MCP tool)
  • #54369 — Renderer SIGTRAP on \getPrStateForBranch\ (unrelated trigger but same "internal reinit logic crashes the renderer" shape)

Reproduction guidance

I don't have a reliable repro — the burst is rare, transient, and likely depends on the lifecycle of an external Preview server (in this case a Tauri \pnpm tauri dev\ process that the Claude Desktop tried to thumbnail). Most reliable lead is the four Sentry events above, which Anthropic engineers can pull stack traces for directly. If those are missing I can attach the full \main.log\ for that day on request.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗