# Work that outlives a connection

Three callers can start work here and come back for it later:

| Caller | How |
| --- | --- |
| An MCP client that declares the Tasks extension | Calling a workflow returns a task at once (`resultType: "task"`). The client polls `tasks/get`, or names the task in `subscriptions/listen` and is sent `notifications/tasks` as it changes. `tasks/cancel` stops the run. A run waiting at an approval gate is `input_required`, and is never approved over MCP. `tasks/get`, `tasks/update` and `tasks/cancel` require the `Mcp-Name` header. A client that does not declare the extension gets the blocking call it always got. |
| An A2A peer | `SendMessage` returns a task; `GetTask`, `SubscribeToTask` and `ListTasks` follow it, and `CancelTask` stops the run. A 1.0 peer may register a webhook to be told instead (below). |
| Anything that speaks HTTP | `POST /api/workflows/<name>`, then the run's own record, or the events above. `POST /api/runs/<id>/cancel` stops it. |

As a client, a tool call that comes back as an MCP task is followed to its end,
by notification where the server sends them and by polling where it does not, and
returned as the result it would have been. It is cancelled if the request is.
