Skip to content

Tasks: durable deploys and rollbacks ​

A client that supports the MCP tasks extension (io.modelcontextprotocol/tasks) gets a task back when it asks to deploy or roll back, instead of a one-off plan. A task survives restarts and can be followed until the deployment finishes. Clients without the extension keep the two-step flow: the first call returns a plan, an approval_url and a one-time approval_token, you approve the plan in your browser, and the client calls the tool again with the token.

Lifecycle ​

StatusMeaning
input_requiredThe plan is waiting for you. The task carries a link to the approval page.
workingYou approved, and the deployment is in progress.
cancelledThe task was cancelled. See Cancelling.
completedThe deployment is live or has failed. A failure, a declined plan or an expired approval complete the task with an error result that starts with a stable code such as DEPLOY_FAILED, APPROVAL_DECLINED or APPROVAL_EXPIRED.

Approval stays in your browser ​

The agent cannot approve its own task. You open the approval page, signed in as yourself, and approve or decline the plan. Only then does the client tell the task to continue. If you have not approved yet, the task stays in input_required.

When the wallet is empty ​

While the workspace wallet balance is zero or negative, deploy_project and rollback_deployment return INSUFFICIENT_BALANCE at the plan step. No plan, task or approval link is created, so you are never asked to approve a change that cannot run. If the wallet empties after you approve, the deployment itself is refused the same way. Top up the wallet in the dashboard billing page and ask the agent again. See When the balance is zero and MCP-CONNECTOR.md for the maintainer-level detail.

Polling and expiry ​

  • Polling: the client calls tasks/get about every 5 seconds. The server does not send task status notifications, so a client must poll.
  • Expiry: a task lives for 24 hours from creation.
  • Isolation: a task is visible only to the same user, workspace, OAuth client and connection that created it. A task past its expiry is reported as expired.

Cancelling ​

WhenResult
Before the deployment startsThe approval is voided for good. Nothing deploys.
After the deployment startsA running deployment cannot be stopped. The cancel request is noted in the task's status message, and the task still reports the deployment's real outcome.

Where to see tasks ​

The Agent tasks panel on a project page lists the tasks your connected agents started for that project. See Agent access.

Released under the ISC License.