M9c — PTY-host true zero-disruption agent survival

Aperta
#55 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
rust

Direzione di ricerca

Leggi prima docs/superpowers/specs/2026-08-02-clowder-m9-agent-survival-design.md §M9c, poi esamina crates/clowder-daemon/src/pane.rs e il substrate di Screen::snapshot() da #52. Definisci il protocollo PTY-host e fd-passing prima dell’implementazione. Il lavoro è completato quando un agent, il suo processo, lo scrollback e le shell companion sopravvivono all’arresto e al rilancio del daemon senza respawn.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement

Context

Agent survival shipped in two slices this cycle:

  • M9a (#50) — durable agents.json registry, reconcile-on-startup, adapter session-resume (claude --continue). Agents re-spawn in their worktree after a daemon restart.
  • M9b (#51) — full split-layout restore (companion shells rebuilt in the same arrangement).

M9c is the deferred capstone: true zero-disruption survival. Today a restart re-spawns each agent (fresh process; the prior conversation is only recovered via the adapter's own resume, and scrollback/companion output is lost). M9c makes agents — and their scrollback and running processes — survive a daemon restart with no re-spawn at all.

Design (already written)

docs/superpowers/specs/2026-08-02-clowder-m9-agent-survival-design.md §M9c (DEFERRED — design only):

A persistent PTY-host process owns the agent PTYs + child processes + recent backlog and outlives the daemon. The daemon becomes a client of it: on restart the daemon re-attaches to the still-running agents (PTY master fds handed over via SCM_RIGHTS fd-passing over a unix socket), so agents — and their scrollback — survive with zero disruption.

This splits today's daemon into a small, rarely-restarted PTY-server + the churny restartable control-daemon.

Scope (big — its own spec → plan → SDD cycle)

  • New PTY-host component + an fd-passing protocol (SCM_RIGHTS over a unix socket).
  • Backlog/scrollback ownership moves to the host (the daemon's current in-memory backlog becomes the host's).
  • Child reaping in the host (not the daemon).
  • Suppress the current triple-kill on the daemon side (SIGHUP-on-master-drop + Drop for Pane + shutdown() explicit kill — see crates/clowder-daemon/src/pane.rs), so agents aren't killed when the daemon exits.
  • Screen::snapshot() (from the VT-grid milestone, #52) is a ready substrate for the recent-screen restore.

Acceptance

A running agent survives a daemon kill + relaunch with its process, scrollback, and companion shells intact — no re-spawn, no lost conversation — and the app reconnects to the still-live session.

Lingua principale
Rust
Stelle
0
Fork
0
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di richardcase/clowder

Tutte le issue di richardcase/clowder

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.