Handoffs
Register a personal tool, request and run handoffs, and decide them: approve a request, review a result, answer a question, or refresh the task context.
A handoff passes a task to someone's AI tool and brings back a result. Reading one needs tasks:read. Requesting, claiming, deciding, refreshing, and answering need tasks:write. The token must belong to a personal tool connection in the workspace; register one with the connections endpoint, then enable it in Account > Tools & tokens. List handoffs by state to find IDs. The personal tool handoffs guide covers the full flow.
Project-restricted account tokens
A project-restricted account token can register a personal tool and use handoffs in its selected projects. The token still needs task read and write access, and the person must enable its connection. Connection intake can narrow those projects but cannot expand the token's access. Narrowing or revoking a token applies to reads, claims, updates and repeated result submissions. Filtered pages can be empty; keep following their cursor until the page reports completion.
Task handoff history needs task read access and stays within the selected projects. Project-limited sign-in connections are not supported for personal tool handoffs yet. Use separate account tokens for tools with different project assignments.
Endpoints
Terms
- needs_input
- The receiving tool asked a question. The state holds the
questionand anattemptnumber. Send that number with the answer. - Stale context
- Each handoff saves the task's title and description. It is stale when either changes. Comments, checklist edits, and other activity do not make it stale.
- contextVersion
- A counter that goes up when the saved context changes or an answer is added. Approving refreshed work or an answer needs the version you reviewed in expectedContextVersion.
Who can decide
| Decision | Who may call it | Result |
|---|---|---|
approve | The receiving person, with the receiving tool's token. For a request you sent to your own tool, any of your enabled personal tool tokens. | requested becomes queued. Approving queued work does nothing. |
accept | The requesting person. | result becomes accepted. Fails if the task's title or description changed during the work. |
reject | The requesting person. | result becomes rejected. A result that was accepted automatically can also be rejected. |
cancel | The requesting or the receiving person. | Any state before review becomes canceled. A reviewed handoff cannot be canceled. |
- Requests you send to your own enabled tool queue right away and need no approval.
- Refresh context on a requested or queued handoff after the task changes. Changed work from a teammate needs approval again unless your trust settings allow it to run.
- Answering is open to the requesting and the receiving person. An answer sends the handoff back for approval unless approval is waived.
- Running work cannot be changed until its lease expires.
Running work
A tool takes a handoff in four steps: claim it, renew the claim before five minutes pass, ask a question if it is blocked, and submit a result. Send the same claimId on every call and keep the attempt the claim returns. A claim that expires returns the work to the queue, and a renew, question, or result sent after that fails with claim_expired.
Trust settings
Trust settings decide whose work a tool starts automatically. They are managed in the app only. The API cannot read or change them.
Connection readiness
The connection endpoint reports whether the token can use handoffs. Its reasons name a missing, pending, or disabled connection. A token that cannot use handoffs gets tool_access_unavailable without connection details. Each request budget lists limit, windowSeconds, available, and sometimes retryAfterSeconds. The check does not use a budget and does not authorize later work.
Errors
Errors follow the error format. Handoff errors add a reason with a readable message.
A second open request from you for the same task and receiving tool returns duplicate_request with the open handoff's handoffId. Claiming untargeted work uses the same check. Temporarily unavailable requests still reserve their place until canceled or finished.
- 400
- The request is malformed, for example a missing decision or an attempt that is not a positive integer.
- 403
- You are not a person in this handoff, the wrong tool sent the request, or the connection is no longer available.
- 404
- The handoff does not exist or you cannot see it.
- 409
- The handoff is in the wrong state or the task changed. The reason says which, for example invalid_state, context_stale, task_closed, or claim_expired.
- 429
- A handoff request limit was reached. The response includes retryAfterSeconds and a Retry-After header.
Next steps
- Handoffs in the CLI wraps these endpoints. Use
--context-versionto approve refreshed work.