Files
archived-orca/src/renderer
Neil afa471da29 fix(cloud): RA-11 resume race: Restart resumes in the pane
A cloud Restart stopped the pane's host terminal, ensured a --resume in its
leaf, then reconnected. But the pane's own transport reacted to the stop
ending its stream by resubscribing (session.tabs.activate), which woke the
stopped leaf with its ORIGINAL launch before the ensure arrived; the ensure
then adopted that live terminal and the resume was lost (a new
conversation). Seen 3/3 on golden 4020131de0.

- Release the pane's transport before the stop (split releasePaneForRestart
  out of handleRestartPane), so nothing reattaches on its own.
- resumeRemotePaneAgent returns the ensured terminal; on 'adopted' it stops
  that terminal and ensures once more, else fails (Couldn't restart).
- Reconnect only after the host lists that exact terminal live in the
  pane's tab and leaf (bounded 15 s, else Couldn't restart).
- After reconnecting, the pane must bind that handle; any other handle
  shows Couldn't restart. A failed restart reattaches the pane so it is
  never left empty.
2026-11-11 04:15:34 -08:00
..