Desktop app: offer to resume interrupted runs after a relaunch/update (macOS "reopen windows" style)
Problem
When the Claude Code desktop app is relaunched (most often to apply an auto-update), any session that was actively running (model generating, a tool mid-execution, or a background task) is interrupted. The conversation history is preserved and the session still appears in the sidebar, but the in-flight work silently stops and nothing offers to continue it. The user has to remember which runs were cut off and manually re-prompt each one.
Proposed solution
On relaunch, detect the sessions that were mid-run when the previous app process exited, and show an optional prompt, directly analogous to macOS's "Reopen windows when logging back in?", listing those runs with one-click Resume (and Not now). Resuming continues each session where it left off. Opt-in by design: nothing re-runs without the user's click.
Why it looks tractable
The underlying primitives already exist:
- The app already writes a per-session process marker at
~/.claude/sessions/<pid>.json(containingsessionId,cwd,startedAt). After a force-quit that marker is orphaned; if the session's transcript ends on a danglingtool_useor a cut-off generation, that's precisely an interrupted run, distinguishable from an idle "needs input" one. - The CLI can already resume these sessions (
claude --resume <id>), and, now that #24025 is resolved, runs interrupted mid-tool resume cleanly, with no transcript repair needed.
I confirmed both externally by prototyping the detection and a fork-based resume against real desktop sessions, so the detect-and-resume path demonstrably works today. This feature is largely about surfacing an opt-in "resume interrupted runs?" prompt in the app, on top of capabilities that already function.
Related issues
- #50067: Add /resume (session resume) to desktop app (open)
- #52743:
--desktopCLI flag to launch/continue sessions in the Desktop app (closed) - #24025: Sessions interrupted mid-turn become unresumable (closed / resolved); its fix is what makes automatic resume practical
None of these cover an automatic offer to resume interrupted runs after a relaunch.
Environment
Claude Code desktop app v1.14271.0 (bundled CLI 2.1.177), macOS.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗