Skip to main content

Read one session

GET 

/session

Reads the session named by X-Session-ID: its counters, its agent, model, workspace, and agent space, whether a turn is running, and its newest feed sequence.

This is the only operation that sets activeTurnFeedSequence, the first feed sequence of the running turn. A client that connects while a turn runs can call GET /session/feed with cursor set to one less than that value to rebuild the turn's live view, then follow the WebSocket.

Returns 404 SESSION_NOT_FOUND when the session does not exist, and 400 INVALID_SESSION_ID for a malformed header.

Request​

Responses​

The session.

Response Headers
    X-Session-ID

    The session this response belongs to. For session-scoped requests it echoes the X-Session-ID request header; for POST /sessions/open and POST /sessions/system it is the session that was opened or created.

    X-Request-ID

    The request's correlation ID. When the request carried an X-Request-ID header holding a UUID, Peen echoes it; otherwise Peen generates a new UUID. The controller log records the same value for this request.