Follow a session live

GET/o/{org}/p/{project}/sessions/{session}/events
View .md

A server-sent event stream of the run as it happens. Before the sandbox starts you get status events ({status}); then the harness's own events, each with an id. The stream ends with done, whose data is {status, output, result}: result is the SessionAnswer, or null when the run produced none. error ({message}) ends it early. Reconnect with Last-Event-ID (or ?cursor=) to resume after the last event you saw. Comment lines (: keepalive) keep idle connections open.

Authenticate with an org API key or a signed-in session.

Path parameters

orgstringrequired

The org's slug or id. A caller with no role in the org gets 404.

projectstringrequired

A Project's handle (name) or id, resolved inside {org} — OR the reserved sentinel _ meaning "no Project" (a direct-repo / repo-less dispatch on POST; "no Project constraint, resolve by session id alone" everywhere else). A real handle that doesn't match the session's actual Project is 404.

sessionstringrequired

The session's full id (execution_id).

Query parameters

cursorstringoptional

Same as Last-Event-ID, for clients that cannot set headers.

Headers

Last-Event-IDstringoptional

Resume after this event id.

Events

The response is text/event-stream: each event is an event: line naming its type and a data: line of JSON, then a blank line. The example stream carries these:

status

data
{
  "status": "allocating",
  "id": "3f9c2a71d04b8e65"
}

done

data
{
  "status": "completed",
  "output": "runtime: guest harness completed",
  "result": {
    "text": "Pinned the clock in checkout.spec.ts.",
    "structured": null,
    "schema_valid": null
  }
}

Responses

200The event stream.

A stream of the events above.

401No bearer, an unknown, revoked or expired one, or an API key on a route keys cannot call.
errorstringoptional

A sentence for a person.

codestringoptional

Stable machine code, e.g. AUTH_FAILED, NOT_FOUND, VALIDATION_ERROR, RATE_LIMITED, PLAN_REQUIRED.

error_codestringoptional

The machine code on routes that name it this way.

messagestringoptional
requestIdstringoptional
404No such resource for the caller, including one that exists in an org the caller cannot see.
errorstringoptional

A sentence for a person.

codestringoptional

Stable machine code, e.g. AUTH_FAILED, NOT_FOUND, VALIDATION_ERROR, RATE_LIMITED, PLAN_REQUIRED.

error_codestringoptional

The machine code on routes that name it this way.

messagestringoptional
requestIdstringoptional