fix(harness): subagent event stream never closes when the parent is cancelled (#2481)
Fixes #2480. ## Problem `AgentSpawnTool` emits `AgentStartEvent` unconditionally before subscribing to a sync-spawned child, then emits the matching `AgentEndEvent` from `doOnTerminate`. `doOnTerminate` fires on `onComplete` / `onError` but **not on cancel**, so a parent cancel (user "Stop", outer `timeout()`, Reactor `dispose()`) leaves the child's event stream open — consumers see a start with no end and keep rendering the subagent as running.
G
gxgeek-n committed
d6787ccae1f18912c0df1c5e5353a1e8af56bb41
Parent: 16be489
Committed by GitHub <noreply@github.com>
on 7/29/2026, 12:40:07 PM