Run events are how your application watches a run. They arrive as server-sent events on
GET /v1/sessions/{session_id}/runs/{run_id}/events, each frame carrying one JSON event.
The run finished. Read the run resource for its authoritative status.
run_cancelled
Yes
run_id, optional recovered
The run ended after cancellation.
error
Yes
message, and an error code where one applies
The run ended with an error. The run resource carries error_code and error_message.
recovered: true marks a terminal event emitted while the platform reconciled a run after a
restart, rather than by the agent process itself. Treat it exactly like the non-recovered form.
The agent wants to run a tool listed in approval_required_tools and is waiting for a decision.
permission_resolved
interaction_key and the decision
A decision was recorded.
user_question
request_id, interaction_key, the question, optional replayed
The agent asked a person a question and is waiting.
user_answered
interaction_key and the answer
An answer was recorded.
Answer by interaction_key, never by request_id, and never from the event alone: list the
session’s pending interactions to get the durable record, then answer it. replayed: true marks an
interaction re-emitted after a reconnect or a restored runtime; it is the same interaction, not a
new one. See Approval-required actions.
Ids order events within one run and are opaque strings. Never compare ids across runs.
Replay after Last-Event-ID starts strictly after that id when history is available. Store the
id after processing the event, and deduplicate by run id plus event id.
A stream can close cleanly without a terminal event. Read the run resource, and reconnect only
while it is non-terminal.
The three terminal names above are the contract. Harness-specific catalogs and payload fields
can evolve; the envelope, the cursor behaviour, and the terminal names do not.