Skip to content

Slice 9 — User can hop into an active Run via SSE live stream #9

@safayavatsal

Description

@safayavatsal

What to build

Live observability into a Run, per ADR-0002's "async-default with hop-in" model.

  • agent-orchestrator exposes GET /runs/:id/stream as Server-Sent Events. Events emitted: tool calls, tool results, model thoughts (when present), state transitions.
  • Web UI: Run detail page subscribes to the stream and renders events in order. Includes a sticky "current state" badge.
  • Backpressure / disconnect handling: the stream resumes from the last seen event id on reconnect.
  • All events streamed are also persisted in agent.run_events so a user opening the page after the Run finished sees a complete trace.

Acceptance criteria

  • Opening a running Run in the web UI shows new events appearing live (within ~1s of emission).
  • Reloading the page mid-Run does not lose events; the trace catches up to the live edge.
  • Opening a finished Run shows the full trace from agent.run_events.
  • Closing the browser tab cleanly closes the SSE connection (no leaked connections on the server).
  • No raw model API responses or sandbox secrets leak into the stream.

Blocked by

Metadata

Metadata

Assignees

No one assigned

    Labels

    afkImplementable without architectural decisionsready-for-agentTriaged and ready for an AFK agent to pick uptracer-bulletVertical slice through all integration layers

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions