Skip to main content
GET
Get Task

Get Task

Retrieve the details and current status of a specific task, including accumulated output and any pending tool approvals.

Request

Path Parameters

Response

Running Task with Pending Approvals

When a task requires tool approval, the response includes a pendingApprovals array:

Completed Task

When a task is completed, output contains the final response:

Response Fields

Output Object

The output field provides a unified view of the task’s response, whether the task is still running or has completed. Use the status field to determine if the content is partial (running) or final (completed/failed/cancelled).

Tool Call Structure

Each entry in toolCalls has the following structure: Tool Call Status Values:

Task Status Values

Use output.updatedAt to track when content was last accumulated. This is useful for detecting changes when polling.

Examples

Use Cases

Polling for Progress

Use the output field to show real-time progress without maintaining an SSE connection:

Polling for Completion (Simple)

If you only need to check final task status:

Checking for Pending Approvals

The pendingApprovals array provides a convenient way to discover tool calls awaiting approval without an active SSE connection:

Pending Approval Object

Errors