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
Make subagents first-class observable sessions: while a subagent (or swarm member) runs, the user should be able to attach to it like a session — watch its live event stream, and manage it individually (stop / steer / resume) — instead of it being an opaque one-shot call that only reports back at the end.
Foreground subagents render progress only as a transient grouped card; once it scrolls away there is no way back to the subagent's own timeline.
Swarm members (AgentSwarm) are worse: they never register background tasks at all, so there is no per-member output, no per-member status, and no per-member stop — see Swarm无法查看进度 #1957 ("Swarm无法查看进度").
Management is all-or-nothing: interrupting cancels every sibling; you cannot stop or steer one subagent.
Related existing work: #667 (live task output), #1957 (swarm progress), PR #1139 (/agents status command), PR #1210 (session debugging timeline), PR #1645 (stop individual swarm members from web UI). None of them offers attach-to-session semantics; this request is for the missing primitive underneath all of them.
Implementation sketch (from reading the source)
The pieces mostly exist; what is missing is exposing them per-subagent:
Event source — every subagent already emits AgentEvents (turn.started, thinking.delta, tool.call.started, …). In-process subscription exists (Agent.onEvent, added by the feat(agent-core): stream live subagent events into background task output buffer #667 fix); on the wire, kap-server's sessionEventBroadcaster already fans out session events, and every subagent has a stable agentId (session metadata, subagent.spawned events). Add an agent-scoped subscription (transcript subscribe_v2 recently landed for sessions — the same channel filtered by agentId gives a live subagent transcript for free).
Management — steer = Agent(resume=agentId, ...) (exists today); stop = the same abort path TaskStop uses for agent tasks, extended to swarm members by wiring each SubagentBatch attempt controller to a member id (PR fix: stop individual swarm members from the web UI #1645 does this for the web UI).
Suggested first increment: (1) + (2) read-only — a /agents panel where selecting a running subagent shows its live transcript. That alone closes #1957's "did it hang?" problem and needs no new control surface.
Additional information
Filed after a source read of packages/agent-core (v1) and kap-server — I'm not a regular contributor, so the sketch above may miss a simpler seam (for example, reusing the background-task output streaming from #667 instead of a new subscription channel). Very happy to adjust the proposal around whatever shape maintainers prefer.
What feature would you like to see?
Make subagents first-class observable sessions: while a subagent (or swarm member) runs, the user should be able to attach to it like a session — watch its live event stream, and manage it individually (stop / steer / resume) — instead of it being an opaque one-shot call that only reports back at the end.
Today:
Agenttask exposes only its output buffer. (feat(agent-core): stream live subagent events into background task output buffer #667 and PR feat(agent-core): stream live subagent events into background task output #2130 add a live text transcript to that buffer — but it is still a log you poll, not a session you can attach to.)AgentSwarm) are worse: they never register background tasks at all, so there is no per-member output, no per-member status, and no per-member stop — see Swarm无法查看进度 #1957 ("Swarm无法查看进度").Related existing work: #667 (live task output), #1957 (swarm progress), PR #1139 (
/agentsstatus command), PR #1210 (session debugging timeline), PR #1645 (stop individual swarm members from web UI). None of them offers attach-to-session semantics; this request is for the missing primitive underneath all of them.Implementation sketch (from reading the source)
The pieces mostly exist; what is missing is exposing them per-subagent:
AgentEvents (turn.started,thinking.delta,tool.call.started, …). In-process subscription exists (Agent.onEvent, added by the feat(agent-core): stream live subagent events into background task output buffer #667 fix); on the wire, kap-server'ssessionEventBroadcasteralready fans out session events, and every subagent has a stableagentId(session metadata,subagent.spawnedevents). Add an agent-scoped subscription (transcript subscribe_v2recently landed for sessions — the same channel filtered byagentIdgives a live subagent transcript for free)./agents) where each entry opens the attach view.AgentEventstream with the same components the TUI already uses for the main agent (the redesigned subagent card, feat: redesign the subagent card #1345, and the vis timeline, feat(vis): full session debugging — tasks/cron, execution timeline, retries & tool progress #1210, are prior art). Attach/detach is a pure view operation; the subagent keeps running either way.Agent(resume=agentId, ...)(exists today); stop = the same abort pathTaskStopuses for agent tasks, extended to swarm members by wiring eachSubagentBatchattempt controller to a member id (PR fix: stop individual swarm members from the web UI #1645 does this for the web UI).Suggested first increment: (1) + (2) read-only — a
/agentspanel where selecting a running subagent shows its live transcript. That alone closes #1957's "did it hang?" problem and needs no new control surface.Additional information
Filed after a source read of
packages/agent-core(v1) andkap-server— I'm not a regular contributor, so the sketch above may miss a simpler seam (for example, reusing the background-task output streaming from #667 instead of a new subscription channel). Very happy to adjust the proposal around whatever shape maintainers prefer.