Docs Operation reference handoff operations
handoff operations#
6 operations. Generated from assets/operations.json; all areas.
On this page (6)
handoff.request#
Ask the person to act
Hand the device to the person for something an agent must not do itself: Face ID or Touch ID (biometric), a passcode, a sign-in, a purchase, a system permission. The request is written to disk, so it outlives this call, the MCP connection and the desktop; the desktop shows it as a banner with a Done button, and a terminal can complete it with handoff.complete. Then call handoff.wait. Do not ask for, type or store the person's secret, and do not try to get past the prompt. This is separate from the approval of destructive calls: an approval lets a call run; a handoff waits for the person's hands.
Annotations: writes, not idempotent, closed world.
| Argument | Type | Required | Default | Details |
|---|---|---|---|---|
reason | string | yes | non-empty, up to 500 characters; Why the person is needed, as the banner shows it | |
kind | string | "other" | one of biometric, passcode, sign_in, purchase, permission, other | |
instructions | string | "" | up to 2000 characters; What to do on the device, in plain words; never a secret | |
session | string | matching ^[0-9a-f]{32}$; The runtime session the person acts on; handoff.wait then answers a fresh observation of it once they are done | ||
job | string | matching ^[0-9a-f]{32}$; A job this handoff belongs to, for the record | ||
timeout_seconds | integer | 900 | 60 to 86400; After this the request expires on its own |
tomaccoctl call handoff.request '{"reason":"<reason>"}'
handoff.get#
Read a handoff
One handoff as it is now: waiting, completed, cancelled or expired, with who completed it and when.
Annotations: read-only, idempotent, closed world.
| Argument | Type | Required | Default | Details |
|---|---|---|---|---|
id | string | yes | matching ^[0-9a-f]{32}$; The handoff's ID from handoff.request |
tomaccoctl call handoff.get '{"id":"<id>"}'
handoff.list#
List handoffs
The handoffs on this computer, newest first: by default those waiting for the person; state all lists every one. The desktop polls this for its banner.
Annotations: read-only, idempotent, closed world.
| Argument | Type | Required | Default | Details |
|---|---|---|---|---|
state | string | "waiting" | one of waiting, completed, cancelled, expired, all | |
limit | integer | 20 | 1 to 200 |
tomaccoctl call handoff.list
handoff.wait#
Wait for the person
Wait up to seconds for the handoff to end, and answer its state: waiting (call again; do not act on the device meanwhile), completed, cancelled or expired. A completed handoff with a session also answers a fresh runtime.observe of it under observation, and resume says to continue from what is on the screen now, never by replaying the step that needed the person.
Annotations: read-only, idempotent, closed world.
| Argument | Type | Required | Default | Details |
|---|---|---|---|---|
id | string | yes | matching ^[0-9a-f]{32}$; The handoff's ID from handoff.request | |
seconds | integer | 30 | 1 to 60 |
tomaccoctl call handoff.wait '{"id":"<id>"}'
handoff.complete#
The person is done
Marks the handoff completed: the person's own action, from the desktop banner or their terminal. An agent over MCP cannot call it (handoff_person_only); it waits with handoff.wait instead. Completing a completed handoff again answers already true; a cancelled or expired one answers handoff_not_waiting.
Annotations: writes, idempotent, closed world.
| Argument | Type | Required | Default | Details |
|---|---|---|---|---|
id | string | yes | matching ^[0-9a-f]{32}$; The handoff's ID from handoff.request | |
note | string | "" | up to 500 characters; What the person did, for the record |
tomaccoctl call handoff.complete '{"id":"<id>"}'
handoff.cancel#
Withdraw a handoff
Cancels a waiting handoff, from the agent that no longer needs it or from the person. A completed or expired one answers handoff_not_waiting.
Annotations: writes, idempotent, closed world.
| Argument | Type | Required | Default | Details |
|---|---|---|---|---|
id | string | yes | matching ^[0-9a-f]{32}$; The handoff's ID from handoff.request | |
reason | string | "" | up to 500 characters |
tomaccoctl call handoff.cancel '{"id":"<id>"}'