Leases and take-over
Claims are leases
Section titled “Claims are leases”Before an agent reads or reports a step, it claims it. An agent’s claim is a lease: it lasts 10 minutes after the last heartbeat. While the lease holds, the step is that session’s alone.
runbook step claim "$SR" --session agent-1 --agent-name deploy-botrunbook step heartbeat "$SR" # well before the lease endsrunbook step report "$SR" --status succeeded- A lapsed lease isn’t a failure. The step becomes ready again, and an
agent.work_availablewebhook can start another agent. - Every claim has a generation. A report under an old generation is refused, so a session that lost its claim can never overwrite the work of the one that took over.
runbook step execheartbeats for you while a command runs, and stops the command if the claim is lost.runbook step releasegives a claim back without reporting.
A person’s claim has no lease: people don’t heartbeat, and their claim holds until they report or release it.
Take-over
Section titled “Take-over”A person may take over an actor: agent step while it’s ready: never
claimed, or its agent’s claim lapsed or was released. A live agent claim is
never taken away.
runbook step claim "$SR" --session dana-laptop --take-overThe take-over is recorded on the run (StepTakenOver), and the step is the
person’s from then on. With assignment: strict on an agent step, only the
assignees may take it over.
Admin release
Section titled “Admin release”A project admin can release a claim that is stuck (an agent that won’t heartbeat or report) with a reason, which is recorded:
runbook step release "$SR" --reason "Agent host was decommissioned"