Connect
Set event_deltas to true for live text and reasoning deltas.
Terminal
curl -N -sS \
"$PANTHEON_BASE_URL/v1/sessions/$SESSION_ID/events/stream?event_deltas=true" \
-H "Authorization: Bearer $PANTHEON_API_KEY" \
-H "Last-Event-ID: $LAST_EVENT_ID"
The server sends a keep-alive comment every 15 seconds.
Durable events
Durable events have an SSE id and JSON sequence. Save the SSE id as your replay cursor.
SSE
event: tool.started
id: evt_101
data: {"id":"evt_101","sequence":7,"type":"tool.started","workspace_id":"workspace_123","session_id":"session_123","run_id":"run_123","created_at":"2026-09-03T12:00:01Z","content":{"tool_call_id":"call_123","name":"echo_tool","input":{"message":"hello"}},"data":{"tool_call_id":"call_123","name":"echo_tool"}}
Text event content is a list of blocks. Structured event content is a JSON object.
Ephemeral events
Ephemeral events have no SSE id.
SSE
event: message.delta
data: {"type":"message.delta","run_id":"run_123","delta":{"text":"Hello"}}
Pantheon does not persist or replay these events.
Event catalog
| Value | Meaning |
|---|---|
run.started | A worker started the run. |
run.completed | The run finished successfully. |
run.failed | The run stopped with an error. |
run.cancelled | A client cancelled the run. |
message.started | Assistant message generation started. |
message.delta | A live assistant text fragment arrived. |
message.completed | Pantheon stored the final assistant message. |
reasoning.delta | A live reasoning fragment arrived. |
reasoning.message | Pantheon stored a durable reasoning message. |
intermediate.delta | A live intermediate output fragment arrived. |
tool.started | The agent started a tool call. |
agent.custom_tool_use | Your application must execute an application tool. |
tool.completed | A tool call completed. |
tool.failed | A tool call failed. |
session.status_idle | The session returned to idle. |
session.error | A session error occurred. |
sandbox.recreated | Pantheon replaced a missing sandbox. |
stream.resync | The client must replay and reconnect. |
The application tool lifecycle events share one tool_call_id.
Read Application tools for correlation and resume steps.
Handle stream.resync
1
Save the cursor
Keep the last durable SSE id.
2
Reconnect
Send that id in Last-Event-ID.
3
Read the replay
Pantheon replays persisted events before live output resumes.
Pitfalls
- Deltas repeat after reconnect: Use only the SSE id from durable events as the cursor.
- Live text is missing: Include event_deltas=true. Final durable message events still arrive.
- Two tool pills appear: Merge every tool lifecycle event by tool_call_id.