8a32426300
Cherry-pick of b4d5ba3e onto current main. Original commit's target file apps/desktop/src/app/session/hooks/use-message-stream.ts has since been moved into apps/desktop/src/app/session/hooks/use-message-stream/gateway-event.ts. The fix is unchanged: replace clearSessionSubagents() with pruneFinishedSessionSubagents() at the message.start boundary so that still-running subagent rows survive new turns. Per @teknium1's review of #64038 on 2026-07-16: 'mergeable_state=dirty' because the dispatcher moved. Resolved by retargeting the call. Tests: 3 new cases in subagents.test.ts (unchanged from original PR). Failing-first verified in original PR (3/3 fail on unfixed, 3/3 pass on fix).