Files
orca/src
Kelvin AmoabaandNeil e65bbc95ce fix(omp): stop the tab spinner sticking after subagents finish (#23662)
* fix(omp): settle the pane after late or leaked subagents

Wake turns started after the root reported done, ids that never settled,
and task-session copies of the extension all left the tab spinning.

Fixes #22854

* fix(omp): keep pane ownership on the subagent roster

Ownership is per event bus, so it has to survive a factory re-run on the same bus.

* test(omp): assert the reload case settles on the child's completion

* fix(omp): keep tracking children across root runs

Clearing the roster on agent_start dropped live children, so Esc or a woken
helper could mark the tab done early. Also drops the now-unused reset helper.

* fix(pi): only re-arm a completion that was already posted

A child starting between a run's end and its settle took that run's done,
leaving the pane on working when the settle came.

* fix(omp): settle a child that finishes before the first root run

After a resume, a woken helper could finish before any run posted a done, leaving the tab spinning.

* fix(omp): keep a mid-turn reload from settling the pane on a child's completion

The generation-0 clause treated "this factory run has not seen a turn" as
"the pane is idle", but an in-process extension reload resets those counters
while the root run is still working. A child starting and finishing in that
window then posted agent_end, so the tab read done while OMP kept working.
Track the root run on the roster, which survives a reload, and only re-open a
completion when no run is in flight.

---------

Co-authored-by: Neil <neil@stably.ai>
2026-10-05 16:24:02 -07:00
..