You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(core): expose subagent task tracker for delegated runs
Adds a materialized view over the existing SubagentStart/Progress/End
event stream so callers can query the lifecycle of delegated child runs
by task id — without scanning run_events() — making automatic parallel
delegation observable like a task dashboard.
- New `subagent_task_tracker` module with `SubagentTaskSnapshot` +
`InMemorySubagentTaskTracker`; populated from runtime events via the
existing `RuntimeEventSink::observe` path.
- `AgentSession` gains `subagent_task(id)`, `subagent_tasks()`, and
`pending_subagent_tasks()` query APIs, scoped to the parent session.
- Fixes two pre-existing bugs in `TaskExecutor`:
1. `SubagentStart` now carries the real parent session id instead of
`String::new()`, so tracker entries are correctly associated with
the originating session.
2. `execute_background` now returns the same task id used in emitted
events (previously it generated a throwaway id and `execute`
internally generated a different one), and pre-emits `SubagentStart`
synchronously so callers can query the tracker immediately after
the background task is scheduled.
Event stream remains the authoritative record; the tracker is a
read-side projection that can be rebuilt by replaying events.
0 commit comments