Skip to main content
A task is one goal handed to the agent. This page covers the full lifecycle: starting a task, the one-goal-at-a-time rule, reading the outcome, cancelling, and what happens when the agent navigates the page out from under itself.

Start a task

do() resolves as soon as the task exists — not when it finishes. It also waits internally for init and the claim to complete, so you can call it right after init with no readiness check.

One goal at a time

Each session runs at most one task. What do() does while a task is running depends on the goal:

Read the outcome

status is one of running, completed, failed, or cancelled; summary is a string or null. check() is the authoritative source for how a task ended. Activity events (below) are ephemeral and per-tab; when you need to decide what actually happened, use check().

End a task early

Handle errors

check() and cancel() reject on any non-2xx response. The rejection is a plain Error — there’s no .status or .code property to branch on — but its message carries the HTTP status, so inspect the message:

Watch progress

Three signals, three jobs: