feat(FN-3481): clean up ephemeral runtimes and spawned agents immediately o

Merges three major changesets: ephemeral agent cleanup for FN-3481 (runtime and spawned agent teardown), a fix for planning-mode refine continuation flow (FN-3209) plus a new local startup script, and chat SSE broadcast isolation with QuickChat backend unification. Key components affected include th

Fusion-Task-Id: FN-3481
This commit is contained in:
Fusion
2026-05-05 11:37:57 -07:00
committed by gsxdsm
parent f2accb736f
commit b4bc105726
5 changed files with 88 additions and 170 deletions

View File

@@ -97,6 +97,16 @@ Fallback behavior remains unchanged:
Execution-ownership sync intentionally avoids assignment-trigger side effects (`agent:assigned` wakeups) that are intended for control-plane delegation.
### Ephemeral agent terminal cleanup
Runtime-created ephemeral agents are removed immediately after terminal cleanup paths run:
- Task-worker agents created by `InProcessRuntime` are deleted as soon as they reach `terminated` through completion, error, or `agent:stateChanged` fallback cleanup.
- Spawned child agents created by `TaskExecutor` are deleted immediately inside `terminateChildAgent()` after terminal state update.
- User-managed non-ephemeral agents are never auto-deleted by these pathways.
Because deletion is immediate, terminated runtime helper agents should not remain visible in the dashboard or `AgentStore` after cleanup completes.
## Agents View (Dashboard)
The agents surface provides: