# Inspect an external task subagent

`GET /v1/tasks/{taskId}/subagents/lookup`

Return a subagent's status, result, and produced file references without starting a parent model turn. Supply exactly one of subagentId or toolCallId; the latter can recover a launch whose tool-call outcome is unknown. Requires tasks:read and tools:execute. Returns null when no matching subagent exists. Internal messages, model routes, and raw errors are omitted.

Required OAuth scopes: `tasks:read` and `tools:execute`

## Parameters

- `taskId` (path, string (uuid), required)
- `toolCallId` (query, string (uuid)): Launch tool-call identifier. Provide this or subagentId, but not both.
- `subagentId` (query, string): Child task UUID. Provide this or toolCallId, but not both.

## Responses

- `200`
  - `subagent` (object | null, required)
    - `subagentId` (string (uuid), required)
    - `taskId` (string (uuid), required)
    - `toolCallId` (string | null, required)
    - `workerName` (string, required)
    - `status` ("idle" | "draft" | "streaming" | "awaiting_tool_result" | "completed" | "failed", required)
    - `stopCause` ("user" | "parent" | "parent_stopped" | null, required)
    - `active` (boolean, required)
    - `result` (string | null, required)
    - `error` (string | null, required)
    - `files` (object[], required)
    - `createdAt` (string, required)
    - `updatedAt` (string, required)
- `400`: Invalid request
- `401`: Missing or invalid Bearer credential
- `402`: Payment or subscription required
- `403`: Credential is missing a required scope
- `404`: Resource not found
- `409`: Request conflict
- `429`: Rate limit exceeded
- `500`: Internal API error
