copilot-cli icon indicating copy to clipboard operation
copilot-cli copied to clipboard

Add live progress streaming for background sub-agents

Open Ghislain89 opened this issue 8 months ago • 1 comments

Describe the feature or problem you'd like to solve

Feature request: Richer agent observability for background sub-agents.

Proposed solution

When running multi-phase orchestrator agents (e.g., feature lifecycle with plan → implement → deliver → review), /tasks only shows tool call count and elapsed time. There is no visibility into what the agent is currently doing — which subtask, which phase, what file it is working on. A live activity log or structured progress stream from background agents would dramatically improve the developer experience for long-running agentic workflows.

Proposed Solution Direction

1. Agent Status Events (lightweight)

Allow background agents to emit structured status events via a report_progress tool (analogous to report_intent):

report_progress({ phase: "implement", subtask: "OEA-1235", detail: "Writing domain tests" })

These events would surface in /tasks as a "last activity" column and in timeline via Ctrl+O.

2. Streaming Timeline for Background Agents

/tasks <agent_id> could open a live tail view showing the agent's timeline events in real-time (tool calls, file edits, shell commands) — similar to how docker logs -f works. Press q to detach without stopping the agent.

3. Structured Progress Protocol

For orchestrator-style agents, define a progress protocol where agents can report:

  • Current phase (plan/implement/deliver/review)
  • Subtask progress (3/6 done)
  • Active file being edited
  • Last tool call summary

This could be rendered as a compact progress bar in the CLI:

[orchestrate-ABC-1234] Phase: implement ██████░░░░ 3/6 subtasks | Working on: Sample.java

4. /tasks --watch mode

A polling mode that auto-refreshes the tasks overview every N seconds, showing tool call count delta and last activity for each agent.

Impact

Long-running orchestrator workflows (10-70+ min) currently feel like a black box. Any of these options would let developers stay informed without manually polling or asking the main agent to check.

Ghislain89 avatar Mar 24 '26 13:03 Ghislain89

Nearly six months on and this is still the gap I feel most, so here is a data point in case it helps the case.

I run two or three agent sessions in parallel worktrees with one session delegating to the others. The failure that costs me the most time is not a crash — it is exactly the black box you describe. A worker announces the subtask it is about to start and then goes idle, and from the outside that is indistinguishable from a worker that is three minutes into the work. My orchestrator reads the announcement and reports it upward as progress. So I get a confident progress report about a session that has not done anything since.

Your report_progress({ phase, subtask, detail }) sketch would fix the reporting half of that, and I would take it as-is. But I think the "last activity" column in option 1 is quietly the more important half, because it is the only one of the four that is falsifiable — a phase label can be stale and still look healthy, whereas a timestamp that stopped moving cannot lie about itself. If only one of these ships, my vote is the timestamp over the label.

The thing I have not solved on my own: every workaround I have tried is a poll, and polling a coordinator is not free. It costs real model activity to ask "are you still there", which means the cheapest way to find a stalled agent is also the thing that burns the budget I am trying to protect.

Two questions for you and for anyone else here orchestrating background agents. Nothing is built and nothing is for sale — I am trying to work out whether this is my setup or something general before I spend more weekends on it.

  1. On a normal working day, how many agent sessions do you have going at the same time — 1, 2-3, or more?
  2. What do you actually do today to tell whether they are still moving? Open each one and read, or have you got something better?

HensemLin avatar Sep 13 '26 11:09 HensemLin