List one child agent run's own durable transcript
GET/session/agents/:agentRunId/messages
Lists one child agent run's own transcript, oldest first (by sequence). A child agent runs in a separate model context, so its transcript is stored apart from the session transcript, never appears under GET /messages, and is never absorbed by a session compaction.
The first record is the task the launching agent gave the child, as a user message in a <message> block that names the sender. The rest are the child's assistant messages, tool results, and the messages it received from other agents or from you. A child transcript never contains system messages.
- Select the session with the
X-Session-IDheader. - Paging uses
limit(1 to 200, default 50) andoffset(default 0).hasMoreis true when more messages follow this page. - Returns
404with codeSESSION_NOT_FOUNDwhen the session does not exist,404with codeNOT_FOUND(agent run not found) when the run does not belong to it, and400with codeVALIDATION_FAILEDfor invalid paging values.
Request
Responses
- 200
- 400
- 401
- 404
- 406
- 500
One page of the child's transcript, oldest first.
Response Headers
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.
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.
The request is invalid. code is VALIDATION_FAILED for a bad parameter, body field, page bound, base64 value or file size, or a body that is not one JSON value or exceeds the body limit, and INVALID_SESSION_ID for a malformed X-Session-ID header.
PEEN_API_TOKEN is set and the request's bearer token is missing or wrong. code is UNAUTHORIZED. A deployment with no token never returns this.
The session, or the record the request names inside it, does not exist. code is SESSION_NOT_FOUND when no session has the X-Session-ID ID, on every operation. It is NOT_FOUND when the session exists but the record the request names inside it does not, and the message names what is missing, such as job not found. It is WORKSPACE_NOT_FOUND when an opened workspace directory no longer exists.
The request's Accept header allows neither application/json nor */*, and every response is JSON. code is BAD_REQUEST and message is unsupported response representation. Omit Accept or send application/json.
An unexpected server failure. code is INTERNAL_SERVER_ERROR and message is internal server error. The controller log has the details under the response's X-Request-ID.