Subagents now use the same ActiveRun infrastructure as parent sessions:
- startSubscribeRun() creates a subscribe-only ActiveRun when sessions_spawn
tool results are detected, using the same event buffering, persistence,
and SSE reconnection as parent runs
- Stream/stop/chat routes no longer branch on subagent vs parent; both
use getActiveRun/subscribeToRun with the session key as map key
- hasRunningSubagentsForParent moved into active-runs.ts to check the
unified activeRuns map (+ disk registry fallback)
- Deferred finalization on lifecycle/end with 5s safety timeout
- ev.data.text fallback for assistant events without delta field
- 24h cleanup grace for subscribe-only runs (vs 30s for parent)
Reverts the broken childSessionKey registration from 32cfcf14f.
Co-authored-by: Cursor <cursoragent@cursor.com>