Repository navigation
Description
Operating system: Windows 10
Orca version: v1.4.77 (also observed on v1.4.75 / v1.4.76)
Short summary
On Windows, after Orca auto-updates and relaunches, floating terminal panes that were running an active claude (Claude Code) session come back as blank shell prompts. The tab titles are preserved, but the agent sessions are not restored — neither warm-reattached nor cold-restored. This is on versions well past the #5232/#5240 fix, so it is not the pre-fix transition case of #5356.
What happened
Two floating terminal panes were each running a live claude session. Orca auto-updated and relaunched. After relaunch, both tabs still showed their titles, but each pane sat at a fresh PS …> prompt — the running agents were gone. No "restored session" banner appeared.
Evidence (from %APPDATA%\orca\orca-data.json)
- Both tabs are present in
workspaceSession.tabsByWorktreewith their titles — which is why the titles survived (tab/title state is persisted continuously, separately from session state). - Neither lost session appears in
sleepingAgentSessionsByPaneKey(the cold-restore store). The only entry there was a stale orphan from two days earlier whose tab no longer exists. experimentalAgentHibernationwasfalse, so hibernation was not involved.
Why this looks like a real gap (and not #5356)
Per the docs, an auto-update relaunch is a daemon-survives scenario where agents should be unaffected (warm reattach); failing that, cold restore should rebuild claude --resume <id>. Here, neither happened.
Reading the current bundle: a live, actively-running agent pane holds no entry in sleepingAgentSessionsByPaneKey during normal operation. That record is created only at quit, by captureAllSleepingAgentSessions. So restore depends entirely on the quit-time capture completing.
Leading hypothesis (not proven — flagging the Electron-internals timing honestly): on Windows, the update path (quitAndInstall(false, true)) force-exits the app, and the beforeunload synchronous capture does not complete before exit. The session is never written to sleepingAgentSessionsByPaneKey; on relaunch, prepareColdRestoreAgentResumeCommand finds nothing and the pane initializes to a blank shell. The title still restores from the continuously-persisted tab store. A single update is sufficient to trigger this — it does not require multiple rapid updates.
Expected
After an auto-update, a pane that was running claude should either warm-reattach the live agent, or cold-restore via claude --resume. At minimum, if the session cannot be recovered, the user should be told rather than silently dropped into a blank prompt.
Actual
Blank shell prompt; tab title preserved; no record in sleepingAgentSessionsByPaneKey; no warning.
Recovery note (for other users hitting this)
The underlying Claude Code transcript is not lost — it persists under ~/.claude/projects/…. Running claude --resume from the pane's working directory lets you reopen the session manually. Orca lost the handle, not the transcript.
Relationship to existing issues
- [Bug]: Claude, Codex Sessions Restoration enhancement #5232 / PRs Keep restored terminals on daemon PTYs when startup is slow #5234, Persist agent provider sessions at quit and resume them on cold restore #5240 — fixed the general session-restore case (shipped v1.4.68).
- [Bug]: Session loss on first launch after upgrading from pre-#5232-fix version (1.4.65 → 1.4.68) #5356 — the one-time pre-fix→1.4.68 transition loss. This report is different: it occurs on v1.4.75/76/77, all of which write
sleepingAgentSessionsByPaneKeycorrectly in normal operation — yet the quit-time capture still doesn't land on an update force-exit.
Activity