M9c — PTY-host true zero-disruption agent survival

Abierto
#55 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
25/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Tranquilo
Stack tecnológico
rust

Línea de trabajo

Lee primero docs/superpowers/specs/2026-08-02-clowder-m9-agent-survival-design.md §M9c y luego inspecciona crates/clowder-daemon/src/pane.rs y la infraestructura de Screen::snapshot() de #52. Define el protocolo de PTY-host y fd-passing antes de la implementación. Se considera terminado cuando un agente, su proceso, el scrollback y las shells auxiliares sobreviven al cierre y relanzamiento del daemon sin volver a generarse.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Rust
Estrellas
0
Forks
0
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de richardcase/clowder

Todos los issues de richardcase/clowder

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.