mirror of
https://github.com/stablyai/orca.git
synced 2026-10-18 00:03:20 +00:00
The cold-restore resume from PR #5240 resumes agent sessions from the persisted sleepingAgentSessionsByPaneKey map, written at quit with origin 'quit'. Builds predating the #5232 fix never wrote that field, so on the first launch after upgrading from such a version there is nothing to resume: every live agent terminal cold-restores as a blank shell, silently and unrecoverably. The lost session ids genuinely cannot be conjured, so surface a one-time, non-destructive notice instead of swapping in blank shells with no explanation. Detection keys on a new per-session capability stamp (agentSessionCaptureVersion): its absence marks a pre-fix writer. To avoid false-alarming users upgrading from a working post-#5232 build (whose sessions ARE resumed) on the first launch of this build — when no session has the brand-new stamp yet — the notice is suppressed whenever quit/live capture records exist, and only fires when the restored session actually carried a resumable agent tab (launchAgent, which pre-fix builds persisted). Main stamps every full session write so the stamp survives the quit flush; the renderer consumes the signal at hydration and patches the stamp so the notice never re-fires.