mirror of
https://github.com/stablyai/orca.git
synced 2026-10-31 09:07:40 +00:00
After a serve restart where the daemon survives, a paired client could drop mouse and focus reporting for a still-live agent. The host publishes the pane with its tab-default title until it seeds the daemon's live title about 180 ms later. A reattach image replayed inside that window was judged against the default title, read as a plain normal-buffer program, and got the reset that disarms its modes, though the image itself carried them. The snapshot now carries the host's tracked title when the image was taken, as an additive `lastTitle` field in the snapshot info, gated on the image's seq. Every reset that judges a replayed image as a live agent's (the post-replay reset, the focus-in that follows it, the hidden-restore reset, and the model-snapshot reattach) uses that title when present, so the decision describes the same moment as the replayed bytes. Local Electron model snapshots already carried this title and now use it the same way. The reattach policy itself is unchanged: non-agent normal-buffer panes still shed modes a dead child may have left (#7329, #7893). Older hosts omit the field and clients fall back to the published title. Older clients ignore it. Refs #35559