Skip to content

Stop-and-reboot screen restoration #232

Closed

Description

@joelmoss

Parent

Part of #154 (remote agent sessions). Phase 3. Design doc docs/designs/remote-workrooms.md, Distribution Plan ("The snapshot format is not a wire contract"), Next Steps item 3 (terminal-state durability) and item 4 ("Treat stop-and-reboot screen restoration separately from live-process survival"). This is the remaining half of #208's durability criterion.

What to build

When a provider stops and reboots a box, the children are dead but the user should still get their screen back.

  • Persist replay()'s VT bytes, not a snapshot. At write time the terminal is live, so the bytes carry the parser continuation, which a snapshot decoded after a reboot cannot report. VT does not change between agent revisions, so after a reboot a newer agent reads what an older one wrote without starting the older binary.
  • A new session state: a screen with no pty behind it. Today a Session is a pty plus the identity a client reattaches by. After a reboot the identity and the screen survive and the pty does not, and the pane must say so rather than silently opening a fresh shell in its place.
  • Write policy. When and how often the bytes reach disk, a bound on their size, and where they live on the box, so a reboot mid-write never leaves a corrupt screen.

Acceptance criteria

Blocked by

#228 (the supervised remote agent and the container fixture).

Filed by Claude Code at the owner's request, 2026-09-24.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions