---
title: "List session subagents"
method: GET
path: "/agents/sessions/{session_id}/subagents"
tags: ["Agents"]
---

# List session subagents

`GET /agents/sessions/{session_id}/subagents`

## Request

- Base URL: `https://api.openai.com/v1`
- URL: `https://api.openai.com/v1/agents/sessions/{session_id}/subagents`
- Auth: HTTP bearer

Lists subagents in a session, including nested and closed subagents. See [subagent workflows](https://developers.openai.com/api/docs/guides/agents-api/multi-agent).

## Path parameters

- `session_id` string, required

## Query parameters

- `limit` integer
- `order` 'asc' | 'desc': The order in which paginated resources are returned.
- `after` string

## Response `200`

The requested subagents.

- object: A page of Agents API resources, with IDs for retrieving additional pages.
  - `object` 'list', required: The object type, which is always `list`.
  - `data` SubagentResource[], required: The resources returned in this page, in the requested sort order.
    - `id` string, required: The ID of the subagent.
    - `object` 'agent.session.subagent', required: The object type for a subagent.
    - `session_id` string, required: The ID of the session that owns the subagent.
    - `name` string, nullable, required: The runner-assigned nickname, or null when unavailable.
    - `instructions` AgentContentResource[], nullable, required: Initial task content, or null when unavailable. Text may contain placeholders for images or audio when only a preview is available.
      - union: A plaintext or encrypted content part exchanged between agents.
        - object: A text content part produced by the agent.
          - `type` 'output_text', required: The content type. Always `output_text`.
          - `text` string, required: The text produced by the agent.
        - object: Encrypted content exchanged between agents.
          - `type` 'encrypted_content', required: The content type. Always `encrypted_content`.
          - `encrypted_content` string, required: The encrypted content payload.
    - `parent_agent_id` string, required: The ID of the agent that created this subagent.
    - `status` 'active' | 'closed', required: The current status of a subagent.
    - `opened_at` integer, required: The Unix timestamp, in seconds, when the subagent was first opened. Resuming does not change it.
    - `closed_at` integer, nullable, required: The Unix timestamp, in seconds, when the subagent was closed. Null while active, including after resume.
  - `first_id` string, nullable, required: The ID of the first resource in `data`, or `null` if the page is empty.
  - `last_id` string, nullable, required: The ID of the last resource in `data`, or `null` if the page is empty. Pass this as `after` with the same order and filters.
  - `has_more` boolean, required: Whether there are more resources to retrieve after this page.

## Other responses

- `400`: The request was invalid.
- `401`: Authentication or project context was missing.
- `403`: The API key lacks the required permission.
- `404`: The requested session or event was not found.
- `409`: The request conflicted with the current session state.
- `500`: An internal error occurred.
- `503`: The service is temporarily unavailable.

## Changes

- **2026-10-05** `7f654af7f94f`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/omnistack-sh/apis/openai-api/changes/agents/sessions/:session_id/subagents/get.md)

---

[API](https://skmtc.dev/omnistack-sh/apis/openai-api.md) - [All operations](https://skmtc.dev/omnistack-sh/apis/openai-api/llms.txt) - [OpenAPI document](https://skmtc.dev/omnistack-sh/apis/openai-api/revisions/0a26f104d35f?raw)
