You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(C4): record a crashed session's live child pid, never signal it
Council item C4 (SIGNOFF-M2/ARBITRATION.md, residual/recorded). A server
restart with the PTY/ACP child still alive was neither tested nor
handled: reclaim logged and started a second agent, leaving the orphan
running with no trace of it anywhere.
- PTYTransport.pid / ACPTransport.pid: the forked child / subprocess pid,
None before start(). Purely accessor properties -- nothing reads or
acts on them beyond what follows.
- build_session_state_payload gains an optional child_pid param, recorded
on the claim (informational only).
- Both web start paths capture acquire()'s return value and pass
getattr(active_session.transport, "pid", None) through (None for
StubTransport in tests, matching every other test's existing shape).
- session_state.reclaim_log_message(state): the single place both start
paths now build the "reclaiming a stale claim" line (replacing the
duplicated inline format string R-01b required stay in exact sync),
extended to name child_pid when the reclaimed claim had one.
Rejected, per the council's own reasoning: killing the child on reclaim.
Pid reuse could mean it now points at an unrelated process, and the
child may be the user's own still-useful agent that simply outlived a
crashed web server -- neither risk is worth taking. This is visibility
only, feeding a future clean/doctor orphan report (R-01g, 0.2.0).
Tests: PTYTransport/ACPTransport .pid unit tests, reclaim_log_message
unit tests, and an end-to-end reclaim test with a tracking os.kill wrapper
proving no real signal (only sig=0 liveness probes) ever reaches the
recorded child pid, while the reclaim log names it.
Evidence: reviews/2026-09-02-full-repo-review/evidence/M2/step-9/C4/.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
0 commit comments