SIGN IN SIGN UP

feat(pi-subagent): keep-alive lifecycle and doom-loop watchdog

A subagent now stays alive between turns while it has live wakeup
triggers — no new entity, no spawn flag. Child extensions signal
liveness via customType 'keep-alive' messages; the runner parks the run
in a new 'waiting' state on settle instead of closing stdin, and
completes it when liveness goes inactive, a sentinel gate reports ALL
PASS, or existing budget/timeout/cancel paths fire. steer() picks
promptCommand while waiting, steerCommand mid-turn.

Deterministic doom-loop watchdog per run: progress ledger
(tool-sequence hash, output hash, worktree artifact hash),
wakeups-without-progress and repeated-action detectors pause the run
(SIGTERM, session preserved, resumable) and escalate via pi-dispatch
with the evidence; 50%/80% soft budget warnings publish as info items.

Verified against pi internals: rpc-mode forwards session events
unfiltered and agent-session emits message_end for custom messages, so
child keep-alive signals reach the parent through the existing RPC
stream.
L
Luke Parke committed
bbbb50c46c73de614d0b6f4332fd5114d08e1da2
Parent: 3497913