Stream execution events

Execution-scoped alias of `GET /v1/agents/{id}/executions/{executionId}/events`: reconnect to a durable turn and replay-and-tail its Server-Sent Events without already knowing which agent ran it. The agent is resolved from the execution's own persisted record, so a run started through `/v1/dispatch` reconnects by execution id alone; a record with no agent (an inline definition, which addresses no durable session) answers 404. A turn that streams over an expired watch lease ends with `await` / `awaitReason: "detached"` while the execution keeps running; pass the last seen SSE `id:` as `after` to rejoin it. Replays buffered events strictly past the `after` cursor, then live-tails if the turn is still running. Each event carries an SSE `id:` line — a durable row seq, or (unified vocabulary) a composite `<seq>.<subIndex>` when one durable row translates to multiple events. Pass that id verbatim after any disconnect (tab reload, sleep, stream timeout) to resume without missing or duplicating events. Replayed and live-tailed frames use the unified execution vocabulary. An API key needs `AGENTS:READ`, `AGENTS:*`, `DISPATCH:*`, or `*`; `DISPATCH:*` is admitted because this alias exists for dispatch-started runs.

Authentication

AuthorizationBearer
API key or Clerk session token

Path parameters

executionIdstringRequired>=1 character

Query parameters

conversationIdstringOptional>=1 character

Fallback session key, honored only for a turn that persists no session key of its own (the Claude Managed lane). A durable turn resolves its session owner from the persisted execution, and a subagent run from its private child thread.

afterstringOptional

Replay only events strictly past this cursor (the last seen SSE id, passed verbatim): a plain row seq, or the composite <seq>.<subIndex> a unified-vocabulary stream stamps on intermediate sub-frames. Defaults to 0 (replay the whole turn).

Response

Server-Sent Events stream (buffered replay followed by a live tail)

object
OR
object
OR
object
OR
object
OR
object
OR
object
OR
object
OR
object
OR
object
OR
object
OR
object
OR
object
OR
object
OR
object
OR
object
OR
object
OR
object
OR
object
OR
object
OR
object
OR
object
OR
object
OR
object
OR
object
OR
object
OR
object
OR
object
OR
object
OR
object
OR
object
OR
object
OR
object
OR
object
OR
object
OR
object
OR
object

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
500
Internal Server Error
502
Bad Gateway Error