Desktop app terminates on PreviewError NOT_FOUND from capturePreviewScreenshotIfChanged (stale preview serverId) — distinct from #81698

Status Closed — duplicate
Maintainer reply None cached
Activity 1 comment · opened Jul 30, 2026 · closed Aug 25, 2026

Summary

The desktop app terminates entirely when the periodic preview-screenshot capture runs against a preview server record that no longer exists. Every in-flight session dies with it.

This is not the GPU-process crash reported in #81698 — there is no GPU process gone entry anywhere in the logs for this crash, and memory was flat (~1470MB) so it is not OOM either. Filing separately to keep that report clean.

Signature

Final lines of %APPDATA%\Claude\logs\main.log before the app exited:

PreviewError: Preview not found for server preview-local_<SESSION-UUID>
  code: 'NOT_FOUND'
  name: 'PreviewError'
  at Object.capturePreviewScreenshotIfChanged (app.asar/.vite/build/index.chunk-<HASH>.js:2098:17047)
  at qSt (app.asar/.vite/build/index.chunk-<HASH>.js:1350:70590)
  at Session.<anonymous> (node:electron/js2c/browser_init:2:119877)
  at Session.emit (node:events:509:28)

The log then rotates and the next entries are a fresh app start (NotificationService initialized), i.e. the process did not recover.

What led to it

  1. An agent opened a browser pane via the preview_start tool pointed at an external site (not a local dev server).
  2. The preview record was lost at some point mid-session — a later tool call against the same preview returned No preview is open. Use preview_start..., while the serverId was still referenced elsewhere.
  3. capturePreviewScreenshotIfChanged continued firing on that stale serverId and threw PreviewError: NOT_FOUND.
  4. The app exited.

Happened twice in one evening (approx. 23:09 and once earlier), both times after preview_start on an external URL. Reserving the browser pane for local dev servers appears to avoid it, which is consistent with the trigger above.

Expected

A missing preview record should make the screenshot capture a no-op (or log a warning). A stale reference in an optional screenshot path should never be able to terminate the host process and destroy unsaved session state.

Environment

  • App 1.24012.9 (MSIX Claude_pzs8sxrjxfjjc)
  • Windows 11 Home 26200
  • Node 24.18.0
  • Occurred 2026-07-29 ~23:09 America/New_York

Impact

Host-process death takes down every concurrent session, including long-running agent work. That is the same blast radius as #81698 but via a different and seemingly much cheaper-to-fix path — this one is an unhandled rejection in a non-essential capture routine.

Related

  • #81698 — GPU-process crash, same "whole app dies" outcome, confirmed different root cause.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗