Get Task'S Full Thread
REST API - Tasks
Get Task Thread (Full)
Get complete conversation thread including all sub-task messages and tool calls
GET
Get Task'S Full Thread
Retrieve the complete conversation thread for a task/thread ID, including the root conversation and any sub-task message buckets. This is the authoritative message-history endpoint for multi-turn conversations continued with the same invocation
Count messages in each task:
Print the root conversation:
Flatten all messages across root and sub-tasks:
id.
Path Parameters
string
required
Unique identifier of the task (UUID format)
Response
Returns an object whereroot contains the main conversation and additional keys may appear for sub-task IDs:
array
Array of messages from the root task
array
For each sub-task, an array of messages with the same structure as
root. The key is the UUID of the sub-task.Example Request
Example Response
Parsing Examples
Get all task IDs (root + sub-tasks):Use Cases
- Debug multi-agent workflows - See the complete execution tree with all sub-agents
- Analyze token usage - Track token consumption across all sub-tasks and calculate costs
- Audit conversations - Review complete interaction history including internal routing
- Performance analysis - Measure response times and token efficiency per sub-task
- Troubleshoot failures - See all tool calls and system messages that led to errors
Comparison with /thread Endpoint
Notes
- The
rootkey contains the main conversation for the task/thread ID you requested - Continuing a conversation with the same invocation
idappends new turns toroot - Multi-agent or delegated runs can add extra keys for sub-task IDs
- Messages are ordered chronologically within each task bucket
See Also
- Get Task Thread - Get the root task thread only
- Get Task - Get the latest task state and result
- List Tasks - List all tasks

