Chat sessions

Read a chat session's messages

Session metadata plus a bounded window of its raw messages.

index on each message is its ABSOLUTE position in the stored transcript, not its position in the returned page: trace spans reference messages positionally, so this read and /trace join on that number.

A transcript that could not be read reports transcriptUnavailable: true and a null messageCount — never 0, which would claim the conversation is empty.

get/chat-sessions/{sessionId}

Path parameters

sessionIdstring required

The chat session's id — the same id POST /chat-sessions/messages returns and GET /chat-sessions lists.

Query parameters

projectIdstring

Optional project scope. When set, a session in another project answers 404 — the same answer as absence, so this is never an existence oracle.

afterMessageIndexinteger

Start the window at this absolute transcript index.

limitinteger

Messages to return, 1–200. Defaults to 50.

Response

The session and one window of its messages.

sessionIdstring required
projectIdstring nullable required
originstring nullable required
modelIdstring nullable required
versioninteger nullable required
startedAtinteger nullable required
lastActivityAtinteger nullable required
toolMode'read_only' | 'auto' | 'null' nullable required
environmentIdstring nullable required
messageCountinteger nullable required

NULL — never 0 — when the transcript could not be read. Zero would claim the conversation is empty.

transcriptUnavailableboolean
nextMessageIndexinteger