> ## Documentation Index
> Fetch the complete documentation index at: https://ai-development-environment.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# runSubagentMessages

> Returns the newest stored child messages, or a page preceding the given cursor.



**query** `runSubagentMessages(runId: ID!, subagentId: ID!, before: ID, first: Int): RunSubagentMessagePage!`

## Arguments

**`runId`**: `ID!` (required)

Identifier of the owning run.

---

**`subagentId`**: `ID!` (required)

Identifier of the child session.

---

**`before`**: `ID`

Cursor for an older page from this same child session.

---

**`first`**: `Int` = 200

Maximum number of provider messages to return.

## Returns

`RunSubagentMessagePage!`

**`events`**: `[RunEvent!]!`

Activity entries for this page, including tools and results.

---

**`nextCursor`**: `ID`

Cursor for the next older page, or null when all messages are loaded.



This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.