Files
orca/src/main
Neil 84880f2711 fix(notifications): gate the Codex lead-Stop banner without downgrading its state
The first cut of this gate rewrote a lead Stop's `state` from 'done' to 'working'
when the roster still held live children. That silently broke the opposite
contract in src/main/agent-hooks/server.ts: a root Stop retires child rows and
reports 'done'. Two pre-existing tests in server.test.ts went red.

Both contracts are real and can't both live in `state`. The reap is also what
destroys the signal: after it, a lead Stop and the final SubagentStop are
byte-identical (state=done, subagents=undefined), so no downstream heuristic can
tell a mid-turn stop from a turn end.

So capture it before the reap and carry it as a live-only field. Normalization
keeps reporting 'done'; the completion coordinator reads the flag and suppresses
only the notification, which is all #4375 ever asked for. Stripped on persist so
a rehydrated row can't re-suppress the first real completion after restart.
2026-07-26 19:04:25 -07:00
..
2026-05-30 02:46:28 -07:00
2026-05-30 13:09:17 -07:00
2026-07-12 23:19:15 -07:00