> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Task lifecycle

> Track asynchronous tool calls and handle completion, failure, and retries.

A tool call returns a task. Save its `task_id` and use the submitting credential to check status and retrieve the result.

| Interface | Read the task |
| - | - |
| REST | [`GET /v1/tasks/{task_id}`](/docs/api-reference/tasks) |
| MCP | Call `get_task` with the task ID. |
| CLI | Run `mouter tasks get TASK_ID` or [wait for completion](/docs/cli/tasks.md). |

Poll with backoff while the status is `submitted`, `queued`, or `in_progress`. The terminal statuses are `succeeded`, `failed`, `timed_out`, and `canceled`. Read `result` after success and `error` after an unsuccessful completion. A successful task can have a null result after the result retention period.

A client timeout only stops the client from waiting. Continue checking the original task by ID. If the connection fails before you receive a task ID, follow the [idempotent submission procedure](/docs/api-reference/execute.md).


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