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
Allow the parent agent to observe a background subagent's real-time progress and streaming output while it is still running.
Current Behavior
With OPENCODE_EXPERIMENTAL_BACKGROUND_SUBAGENTS=true, a parent agent can launch a background subagent via task(background=true, ...). But once launched, the subagent is a black box — the parent can only poll task_status(task_id="...") which returns the state (running, completed, cancelled) but no intermediate output or progress information.
The only way to interact with a running subagent is task(task_id="...", prompt=...), which resumes/resumes the session but interrupts the agent's current work (it stops what it was doing and responds to the new prompt).
Proposed Feature
Add a mechanism for the parent agent to stream or poll the subagent's real-time output without interrupting it. Options to consider:
Stream endpoint: A way to subscribe to the subagent's tool call outputs and text generations as they happen (similar to tailing logs).
Progress poll: task_status could include a snapshot of the last N tool outputs or the current step description, e.g. task_status(task_id="...", include_progress=true) returning {state: "running", last_output: "Searching the web for X...", tools_called: 3}.
Shared scratchpad: An append-only buffer that the subagent writes to and the parent reads from, without mutual interruption.
Use Case
A parent agent launches multiple background subagents for parallel research tasks and wants to:
See which ones are making progress vs. stuck
Decide which results are ready early to start consolidating
Provide progress feedback to the user without waiting for all subagents to finish
I have searched existing issues and confirm this is not a duplicate.
Related
Builds on the background subagent delegation feature (PR #24174 / issue #21384).
Feature Description
Allow the parent agent to observe a background subagent's real-time progress and streaming output while it is still running.
Current Behavior
With
OPENCODE_EXPERIMENTAL_BACKGROUND_SUBAGENTS=true, a parent agent can launch a background subagent viatask(background=true, ...). But once launched, the subagent is a black box — the parent can only polltask_status(task_id="...")which returns the state (running,completed,cancelled) but no intermediate output or progress information.The only way to interact with a running subagent is
task(task_id="...", prompt=...), which resumes/resumes the session but interrupts the agent's current work (it stops what it was doing and responds to the new prompt).Proposed Feature
Add a mechanism for the parent agent to stream or poll the subagent's real-time output without interrupting it. Options to consider:
task_statuscould include a snapshot of the last N tool outputs or the current step description, e.g.task_status(task_id="...", include_progress=true)returning{state: "running", last_output: "Searching the web for X...", tools_called: 3}.Use Case
A parent agent launches multiple background subagents for parallel research tasks and wants to:
See which ones are making progress vs. stuck
Decide which results are ready early to start consolidating
Provide progress feedback to the user without waiting for all subagents to finish
I have searched existing issues and confirm this is not a duplicate.
Related
Builds on the background subagent delegation feature (PR #24174 / issue #21384).