Browse docsDevelopers

Hand a task to another agent

Release a task's VMs to a second session, pick up work another agent left, and take one over when its holder went quiet.

updated 2026-10-06

Every VM belongs to a task, and a task is held by one agent session at a time — the one holding its handle. That's what keeps two conversations of yours from stepping on each other's VMs. It also means handing work across sessions is explicit: the holder lets go, the next one picks up. This page is the three moves.

Release, and attach

The holder gives the task up without closing it:

text
rift_task_release  <handle>

The VMs stay exactly as they are; the task shows as free in rift_task_ls. Any session of yours may now take it:

text
rift_task_ls
rift_task_attach  task_…

rift_task_attach answers a fresh handle. The old one is dead — a handle is minted on attach and never reused — so the session that released can't reach the VMs again without attaching itself.

Pick up what another session left

A conversation that ended without releasing is the common case: the agent's context ran out, the laptop closed, the tab went away. Its task is still held, by a handle nobody has any more.

Rift's rule: a lease quiet for half an hour may be taken up without asking. rift_task_ls shows each task's holder and when it was last active; once that's thirty minutes ago, rift_task_attach on it succeeds outright.

Sooner than that, attaching is refused — the task is held, and active lately. That refusal is the wall an accidental collision should hit.

Take over

When you know the other session is gone — or you want the VMs now:

text
rift_task_attach  task_…  takeover=true

The previous handle stops working at once, and the session that held it is refused from then on, with a message that names who took over and when. The agent taking over is told to say so to you; the one that lost the task, if it's still running, sees why on its next call.

Who "holds" a task

The holder a task shows is the label of the token that attached: mcp: and the name your client declared when it connected, such as mcp:Claude. Two sessions on the same connection look alike in the list.

When nothing is done

A task nobody touches for four hours closes itself and destroys its VMs, so a hand-off that never happens doesn't leave machines running. Any call under a good handle counts as touching it. The full model — leases, timers, what a handle is — is in Tasks.