Skip to content
Open Console

Stream run events

1 min readUpdated

GET/v1/sessions/{session_id}/runs/{run_id}/events

Stream or replay the run’s events as server-sent events. Each frame carries an SSE id, an event name, and the complete event object as JSON in data. Terminal event types are run_completed, run_cancelled, and error. To reconnect after a disconnect, send Last-Event-ID with the last id you processed. Replay starts strictly after Last-Event-ID when live or persisted history is available. Event ids order events only within one run: treat them as opaque strings, store them with the session and run ids, and deduplicate by run id plus event id. A stream can close cleanly without a terminal frame when no events are available; read the run resource for its authoritative status and reconnect only while it remains non-terminal. Ignore unknown event names and fields.

Generated from the Platform API specification on 2026-09-04.

Parameter Type Description
session_id string The session, as returned by Create a session.
run_id string The run, as returned by Start a run.
Header Required Description
Authorization yes Bearer plus a short-lived OAuth access token issued for the Tanomis API audience. Backends obtain tokens with an organization automation client; the CLI’s human login is not an application credential.
X-Organization-ID yes The organization_id from the workspace projection you selected in GET /v1/me/workspaces.
X-Workspace-Tenant-ID yes The nested tenant_id from the same projection. A header cannot widen what the token grants. Some single-workspace or self-hosted environments take X-Tenant-ID instead, as supplied by their administrator.
Accept yes Send text/event-stream.
Last-Event-ID no Send 14.
Status Meaning
200 Server-sent events.
404 No such run in this session.
Terminal
curl -X GET "https://api.tanomis.com/v1/sessions/ses_7d4f9c/runs/run_a12bc3/events" \
-H "Authorization: Bearer $TANOMIS_TOKEN" \
-H "X-Organization-ID: $TANOMIS_ORG" \
-H "X-Workspace-Tenant-ID: $TANOMIS_WORKSPACE" \
-H "Accept: text/event-stream" \
-H "Last-Event-ID: 14"
200 OK · text/event-stream
id: 14
event: message_delta
data: {"id":"14","type":"message_delta","session_id":"ses_7d4f9c","run_id":"run_a12bc3","created_at":"2026-09-03T09:00:00.014Z","data":{"text":"I found"}}