mirror of
https://github.com/stablyai/orca.git
synced 2026-10-21 08:03:33 +00:00
The lead-Stop gate revert (84880f2711) dropped the effective-state read from
the local lead path entirely, not just from the Stop case. That regressed a
separate contract: a child blocked on a permission prompt no longer held the
pane at `waiting` when the lead kept working, so the pane read `working` and
the user never saw what it was blocked on.
Restore the read, but AFTER the roster reap rather than before it. Post-reap,
a lead Stop sees an empty roster and still reports `done`, which is what
agent-hooks/server.ts requires; only non-Stop events observe live children.
The pre-reap `leadStopWithLiveSubagents` flag is unchanged and still carries
the "children were live at Stop" signal for the notification gate.
Both orderings are now pinned by tests: reading pre-reap breaks the Stop
contract, dropping the read breaks the blocked-child contract.