M9c — PTY-host true zero-disruption agent survival

Đang mở
#55 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
25/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
rust
Lĩnh vực
cli, operating-systems

Hướng nghiên cứu

Trước tiên, hãy đọc docs/superpowers/specs/2026-08-02-clowder-m9-agent-survival-design.md §M9c, sau đó kiểm tra crates/clowder-daemon/src/pane.rs và substrate Screen::snapshot() từ #52. Xác định giao thức PTY-host và fd-passing trước khi triển khai. Được coi là hoàn tất khi một agent, process của nó, scrollback và các companion shell sống sót qua việc daemon bị kill và relaunch mà không respawn.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Rust
Star
0
Fork
0
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của richardcase/clowder

Tất cả issue của richardcase/clowder

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.