---
title: "Replay and/or live-tail one run's persisted events (resume after a disconnect)."
method: GET
path: "/v1/agent/runs/{runId}/events"
tags: ["agent"]
---

# Replay and/or live-tail one run's persisted events (resume after a disconnect).

`GET /v1/agent/runs/{runId}/events`

## Request

- Base URL: `http://localhost:8080`
- URL: `http://localhost:8080/v1/agent/runs/{runId}/events`
- Auth: one of:
  - API key in cookie `dvt_session`
  - HTTP bearer

DVT-4436: replays every event stored for this run with `seq > since` (oldest first, as SSE frames with an `id: <seq>` line each), starting with an `event: dvt.run` frame (`AgentRunFrame`) reporting whether the run has already finished. If the run is not yet terminal, the response then live-tails newly persisted events until `event: dvt.done` (`AgentRunDone`) arrives, this connection has been open ~75s (an `event: dvt.resume`, `AgentRunResume`, is written first — reconnect with a fresh `since`), or the client disconnects. Ownership is checked against `agent_turns` (`org_id` + `actor_id`) BEFORE any row is read — another user's run (even in the same org) 404s. Replay/live-tail only ever has rows to serve in snowflake mode (`editionCapabilities.agentRunResume`); off editions still 200 this route (never mounted-but-gated), reporting `dvt.run` then a synthesized `dvt.done` once the run has ended. Where persisted, frames are purged by the daily retention sweep once older than 24 hours (at most ~48 hours at rest) — see `POST /v1/agent/run`'s description for the ADR-0082 D6 deviation this represents.

## Query parameters

- `since` integer

## Response `200`

The persisted/live `text/event-stream` for this run — `dvt.run`, then replayed/live engine frames each carrying an `id: <seq>` line, then `dvt.done` or `dvt.resume`. The proxy also injects `: keepalive` comment lines at a fixed interval while silent. Each parsed SSE event is one object of this schema (OpenAPI 3.2 `itemSchema` semantics — the schema describes ONE event, not the raw body). The `data` of each `dvt.*` event is the JSON document named by its branch; every other event name is a verbatim Cortex Agent frame whose `data` is an opaque string (Snowflake edition only). `: keepalive` comment lines are not events.

## Other responses

- `400`: Malformed request.
- `401`: Missing, invalid, or expired session.
- `404`: Resource does not exist.
- `503`: The service or a required dependency is temporarily unavailable.

---

[API](https://skmtc.dev/dvt/apis/dvt-rest-api.md) · [All operations](https://skmtc.dev/dvt/apis/dvt-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/dvt/apis/dvt-rest-api/revisions/00016f504165?raw)
