M9c — PTY-host true zero-disruption agent survival
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 25/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- rust
- 领域
- cli, operating-systems
调研方向
先阅读 docs/superpowers/specs/2026-08-02-clowder-m9-agent-survival-design.md §M9c,然后检查 crates/clowder-daemon/src/pane.rs 以及 #52 中的 Screen::snapshot() substrate。在实现之前定义 PTY-host 和 fd-passing 协议。当 agent、其进程、scrollback 和 companion shells 能够在 daemon 被 kill 并重新启动后无需 respawn 仍然存活时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
Context
Agent survival shipped in two slices this cycle:
- M9a (#50) — durable
agents.jsonregistry, 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_RIGHTSfd-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_RIGHTSover 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 — seecrates/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.
- 主要语言
- Rust
- 星标
- 0
- 派生
- 0
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
richardcase/clowder 的其他 Issue
-
documentation priority: medium
难度 2/5 半天 新手友好度 82/100
richardcase/clowder#143 ·
-
enhancement github_actions priority: medium rust
难度 4/5 3-5 天 新手友好度 65/100
richardcase/clowder#142 ·
-
github_actions priority: medium
难度 3/5 1-2 天 新手友好度 78/100
richardcase/clowder#141 ·
-
bug priority: medium
难度 4/5 3-5 天 新手友好度 68/100
richardcase/clowder#140 ·
-
bug priority: medium
难度 3/5 1-2 天 新手友好度 72/100
richardcase/clowder#139 ·
查看 richardcase/clowder 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 83/100
n0-computer/iroh#4669 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
rubys/roundhouse#1950 ·
-
难度 2/5 1-3 小时 新手友好度 65/100
cloudflare/workers-rs#1130 ·
维护者通常 11 天内回复
-
难度 2/5 1-3 小时 新手友好度 69/100
vfarcic/dot-agent-deck#2160 · 2 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
RustCrypto/utils#1597 ·
维护者通常 1 天内回复