seq. You can list past events or subscribe to a live Server-Sent Events (SSE) stream. Both are resumable: pass the last seq you handled to continue with no gaps or duplicates.
Event types use a {domain}.{action} naming scheme. For the full catalog across all phases, see Events & streaming.
The event object
string
Unique id (e.g.
evt_01H...).integer
Monotonic sequence number within the session — starts at 1, gap-free. Use it to resume. Mirrored as
last_seq on the session and as the SSE id:.string
The session that emitted the event.
object
Type-specific payload.
string
Emission timestamp.
Event types
The
session.idle stop_reason is one of end_turn, awaiting_input, awaiting_approval, awaiting_answer, awaiting_delegation, budget_paused, interrupted, max_iterations, context_exhausted, or error — the same enum as the session object, which is where each one is explained.
Three of them park the turn on something outside the loop, and only two of those park it on a person: awaiting_approval and awaiting_answer both carry pending_actions and both wait for a reply, while awaiting_delegation waits for the coordinator’s own children and no reply will move it.
List events
GET /v1/sessions/{id}/events → 200 OK. Past events in order (oldest-first). Resume by passing after_seq; combine with limit for paging. Events are replayable for at least 72 hours.
integer
Return events with
seq strictly greater than this. Omit to start from the beginning.integer
Max events to return. Default
20, max 100.Stream events (SSE)
GET /v1/sessions/{id}/stream?after_seq={seq} opens a Server-Sent Events stream. Each SSE message carries one event as JSON in its data: field, with the event seq as the SSE id:. On reconnect, pass the last seq you saw as after_seq to replay everything since.
Stream
Track the highest
seq you have fully processed. After any disconnect, reconnect with ?after_seq=<that seq> — the stream is gap-free and duplicate-free from that point.tool.confirm pauses the turn (stop_reason: "awaiting_approval") until you resolve it via POST /v1/sessions/{id}/tool_confirmations. budget.exceeded accompanies a session.idle with stop_reason budget_paused.A question emits no event of its own. An agent that calls ask_operator parks the same way, and the only signal on the stream is the session.idle — stop_reason: "awaiting_answer", with the question in pending_actions. Answer it via POST /v1/sessions/{id}/answers. A stream reader that branches only on tool.confirm will sit on a session that is waiting for it.