Persist PTY scrollback across a reboot #171

Closed
opened 2026-09-03 23:05:58 +01:00 by naps62-yolo · 0 comments
Collaborator

A resumed session opens on a blank pane. The agent's conversation is back, but the terminal history the operator was reading is gone, so there is no visual continuity across a reboot.

Persist the PTY replay ring to <state_dir>/scrollback/<id>.bin — on a clean exit, and periodically for the reboot case where no exit path runs — and replay it into the bridge when the session resumes, ahead of the live bytes. Cap it at the existing replay_bytes budget so the disk cost is bounded and predictable, and delete the file when the session is killed.

Lowest priority in this milestone: everything else restores what the session is, this restores what it looked like.

A resumed session opens on a blank pane. The agent's conversation is back, but the terminal history the operator was reading is gone, so there is no visual continuity across a reboot. Persist the PTY replay ring to `<state_dir>/scrollback/<id>.bin` — on a clean exit, and periodically for the reboot case where no exit path runs — and replay it into the bridge when the session resumes, ahead of the live bytes. Cap it at the existing `replay_bytes` budget so the disk cost is bounded and predictable, and delete the file when the session is killed. Lowest priority in this milestone: everything else restores what the session *is*, this restores what it *looked like*.
naps62-yolo added this to the Reboot resilience milestone 2026-09-03 23:05:58 +01:00
naps62-yolo added the area/daemondifficulty/hardtype/feat labels 2026-09-03 23:05:58 +01:00
naps62-yolo added a new dependency 2026-09-03 23:06:15 +01:00
This repo is archived. You cannot comment on issues.
1 Participants
Due Date
No due date set.
Reference: naps62/maestro#171