A long-running coding agent feels broken when the interface shows only a spinner. Session streaming can expose useful progress, but dumping every internal event produces noise and may reveal sensitive tool input.
Quick answer
Stream a small set of user-facing states: queued, planning, running a named safe action, waiting for input, failed, and complete. Keep raw events in protected diagnostics and make reconnect, cancellation, and duplicate delivery part of the design.
type SessionState =
| 'queued'
| 'planning'
| 'running'
| 'waiting_for_input'
| 'failed'
| 'complete';
what changed
GitHub’s Copilot agent session streaming capability is in public preview. Integrations can receive session progress sooner instead of waiting for a completed agent response, enabling richer monitoring and interfaces.
This is a current platform change, so confirm availability for your plan, organization, and installed client before changing a production workflow. Preview features can also change faster than generally available controls.
who should use it
A useful UI answers three questions: is the session alive, what safe summary of work is happening, and does the user need to act? Exact chain-of-thought or raw secret-bearing command output is neither required nor appropriate.
The practical question is whether the feature removes a real bottleneck or security gap in your workflow. A new control is not valuable merely because it exists; it needs an owner, a narrow purpose, and an observable result.
a safe implementation
- Define a stable public event model.
- Store an event cursor for reconnects.
- Make handlers idempotent.
- Redact paths, prompts, credentials, and tool output before display.
Make the first rollout small enough to reverse. Record the previous behavior, the setting or command that changed it, and the person responsible for deciding whether the experiment expands.
the mistake to avoid
Do not equate an open stream with successful progress. Connections can remain alive while work is stalled, and clients can reconnect after missing or receiving duplicate events.
Convenience features still operate inside your existing trust model. Repository permissions, protected environments, review rules, test accounts, and audit logs remain important even when the new workflow removes manual steps.
how to verify it
Test disconnect and resume, duplicate events, cancellation, approval pauses, and terminal failure. The UI should converge on one correct final state without exposing protected content.
Keep the verification evidence in the pull request or rollout ticket. That gives reviewers something concrete to evaluate and gives the next person a known baseline when the platform changes again.
rollout checklist
- Confirm the feature and client version are available.
- Test with non-production data and minimum permissions.
- Capture expected success and failure behavior.
- Document rollback and ownership.
- Recheck the official announcement before a wide rollout.
official reference
The announcement is the source of truth for availability and product behavior. This article focuses on the implementation decisions teams should make around it.