4 Commits

Author SHA1 Message Date
kumarabhirup
f3fffec97f
fix(web): guard system files in file write route and allow aborting waiting-for-subagents runs 2026-03-02 18:34:27 -08:00
kumarabhirup
a046cf2349
refactor(web): unify subagent tracking with parent session system
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>
2026-02-22 00:35:07 -08:00
kumarabhirup
7cdcf61639
web: support subagent sessions in chat and stop API routes 2026-02-21 12:32:37 -08:00
kumarabhirup
c2a302b582
👌 IMPROVE: chain of thought and live stream 2026-02-12 13:37:40 -08:00