The narrowest useful slice of #420, and the only one until it earns trust: the default REPL stays exactly as it is (see the P1 out-of-the-box invariant issue); detachment exists only for sessions the user deliberately backgrounds.
Surface: graff agents (list background sessions), graff attach <name> (connect a TUI), a way to start detached or detach a running session. Nothing else — no auto-daemonization, no client-owned workers, no update coordination.
Build on what exists: serve already supervises <exe> --json children with a seq-stamped EventLog, gap-free ?from=N replay, and Follower tailing (serve.zig, serve_events.zig); the #422 contract carries {generation, sequence} cursors for exactly this. Milestone 1 is a local supervisor on a unix socket (0600, per-uid dir) routing the same wire.
Prime-agent patterns — adopt only where earned (from the 2026-08-06 deep-dive):
Acceptance: the attach-parity eval — the same scripted session run in-process and attached must produce a byte-identical rendered transcript — plus a delta-to-paint p99 benchmark showing no regression on the in-process default, both wired into the harness. Kill the supervisor mid-session: the worker survives and a reattach replays without gaps. graff doctor never kills a live session's worker.
Depends on: output inversion completion, input inversion, #413. Bound by the P1 invariant issue.
The narrowest useful slice of #420, and the only one until it earns trust: the default REPL stays exactly as it is (see the P1 out-of-the-box invariant issue); detachment exists only for sessions the user deliberately backgrounds.
Surface:
graff agents(list background sessions),graff attach <name>(connect a TUI), a way to start detached or detach a running session. Nothing else — no auto-daemonization, no client-owned workers, no update coordination.Build on what exists: serve already supervises
<exe> --jsonchildren with a seq-stamped EventLog, gap-free?from=Nreplay, and Follower tailing (serve.zig,serve_events.zig); the #422 contract carries{generation, sequence}cursors for exactly this. Milestone 1 is a local supervisor on a unix socket (0600, per-uid dir) routing the same wire.Prime-agent patterns — adopt only where earned (from the 2026-08-06 deep-dive):
doctor/reap as a pure side-effect-free planner with a re-probe before any SIGTERM; cursor-based attach replay (already in the contract).Acceptance: the attach-parity eval — the same scripted session run in-process and attached must produce a byte-identical rendered transcript — plus a delta-to-paint p99 benchmark showing no regression on the in-process default, both wired into the harness. Kill the supervisor mid-session: the worker survives and a reattach replays without gaps.
graff doctornever kills a live session's worker.Depends on: output inversion completion, input inversion, #413. Bound by the P1 invariant issue.