seq within its session, so the stream is fully resumable: reconnect from the last seq you saw and never miss or duplicate an event.
Because every event is sequence-keyed, a dropped connection is not a lost event — you reconnect with the last seq you handled and the stream picks up exactly where you left off:
Event shape
Events follow a{domain}.{action} naming scheme.
Streaming
Streams are delivered as Server-Sent Events. Pass afrom_seq to replay from a point in history — new consumers pass 0 to get the whole session.
Reading history
Events are also available as a paginated list for auditing or replay without a live connection.CLI
Sending events in
You drive a session by sending events too — a user message, a tool confirmation, or an interrupt.TypeScript
Common event types
See the full list in the Event reference.
Next: completion window
Three prices for one model.