Files
orca/tests
Jinwoo-H c9216df2f2 fix(orchestration): wake a restored idle pane that never speaks again
Push-on-idle only fires on a live agent-status observation. That gate is
right in intent — a seeded status is a memory, and typing plus Enter into
an agent that went busy across a relaunch corrupts a real turn — but it
has no way to ever resolve, because an idle agent TUI is silent. Claude
paints its title on the working→idle edge and emits nothing afterwards,
so a pane restored while its agent sits at the prompt never produces the
frame the gate waits for. Mail addressed to it strands until a human
gives the agent something unrelated to do, which is what makes it look
like delivery is triggered by the user rather than by the mail.

Probe instead of waiting. Quiescence across a window plus a recognized
foreground agent establishes the same fact the missing title would have
carried: a byte in the window means a spinner repaint, tool output, or a
human mid-keystroke, and a foreground that is not a known agent means
there is nothing there to wake. Neither is safe to submit into, and both
are cheap to observe.

The condition covers unknown status as well as a seeded idle. A cold
relaunch returns its restore payload before the renderer publishes the
graph, so the seed lands on a pty with no leaves and the pane comes back
carrying no status at all — that, not the seeded idle, is the shape the
restart e2e reproduces. 'working' and 'permission' are positive evidence
of not-idle and never probe.
2026-08-08 10:19:19 -04:00
..