How task runs fit in
A task run ties a task to a connection. The task defines what to do, the connection provides the authenticated session, and the task run is the execution. Runs emit events throughout their lifecycle so your application can react in real time.Running a task
task_run.completed or task_run.failed events to know when it finishes.
Task run statuses
| Status | Meaning |
|---|---|
queued | Waiting for an available agent |
running | The agent is executing the task on the source |
pending | Waiting for human approval, review, or intervention before completing |
interaction_required | The source is asking for user input (MFA, verification) |
completed | Finished successfully. Output is available in the output field. |
failed | Something went wrong. Check the errors array for details. |
canceled | You canceled the run before it completed. |
Timeouts
Each task has a configurable timeout. If the agent doesn’t complete within that window, the run fails. Runs also auto-timeout after 30 minutes of inactivity if the agent gets stuck.Output and errors
On success, theoutput field contains structured JSON matching the task’s output schema. On failure, the errors array contains one or more error objects with type, code, and message. See API error handling for the full reference.
Interactions
Task runs can pause for user input if the source requires verification during execution. The flow is the same as connection interactions. Collect the response from your user and submit it to resume.Canceling a run
canceled and the agent stops execution. You can cancel a run in pending, queued, or running status.