Skip to content

Copilot cloud agent: final assistant message disappears from task page after completion when the session used subagents #5332

Open

Description

@arun-8687

Summary

Since about 1 Nov 2026 (UTC), the cloud-agent task page stops showing the agent's final message once a session ends, for sessions in which a custom agent called one or more subagents. The message is visible while the session runs, then disappears on completion, leaving only the tool steps. Earlier sessions with identical agent definitions still show the final message.

Impact

The final message is where a custom agent typically asks the user a question or presents something for approval. After completion the page shows only the progress checklist, so the user can't see what is being asked without digging through logs.

Observations from the session event stream

For each session I read the raw event stream behind gh agent-task view <session-id> --log and checked for events after the final assistant message (finish_reason: stop).

Period (session start, UTC) Sessions that called ≥1 subagent Final message is the last event Final message followed by extra events
29 Oct – 31 Oct 22:28 25 25 0
1 Nov 00:59 – 2 Nov 15:42 7 0 7 (34 extra events total)
  • The extra events are duplicate end-of-subagent markers: one per subagent call, each repeating a marker already emitted in the correct place earlier in the stream. A session that calls six subagents has six trailing duplicates.
  • Sessions that call no subagents are unaffected.
  • The last clean session using subagents started 31 Oct 22:28 UTC; the first affected one started 1 Nov 00:59 UTC. No sessions in between used subagents.
  • Not configuration-dependent: agent definitions did not change across the boundary, and both older and newer versions show the pattern afterwards.
  • Not model-dependent: reproduces with more than one model.

Suspected cause

After the final message, the platform re-emits the end marker of every subagent call, so the final message is no longer the last event. The task page appears to treat only a last-position assistant message as the session result and drops it otherwise. This is inferred from event order; I can't see the page's logic.

Expected behaviour

The final assistant message stays visible on the task page after completion, as before 1 Nov, regardless of how many subagents ran.

Steps to reproduce

  1. Create a custom agent that delegates to at least one subagent and ends its run with a text reply.
  2. Start a cloud agent task with that agent.
  3. Watch the task page: the reply appears as the session finishes, then disappears.
  4. Open the raw event stream: the final assistant message is followed by one repeated end-of-subagent event per subagent call.

Request

  • Confirm whether a change shipped around 31 Oct – 1 Nov that re-emits subagent end events at session completion.
  • Fix the task page to keep the final message in this case.
  • Any workaround applicable from the user side would also help.

Session IDs (one before the boundary that renders correctly, one after that doesn't) available on request.

Related

Distinct from #4856. That report is the interactive CLI TUI dropping a text-only parent message when a background subagent's turn boundary lands inside the parent turn (CLI 1.0.84, Sep 2026; message present in events.jsonl, never painted). This report is the cloud-agent task page: the final message renders while the session runs, then vanishes on completion, correlated with duplicate end-of-subagent events appended after finish_reason: stop, starting between 31 Oct 22:28 UTC and 1 Nov 00:59 UTC.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions