CAPABILITY · HITL

When a step needs a human, the run pauses — then resumes

Approvals, MFA on an authorized flow, or an ambiguous choice pause the run, hand off to a person, and continue from the exact same point.

x-twin-status: awaiting_approval
Built for the cost wedge

What human-in-the-loop handoff does

Real automation hits steps a machine should not decide alone — a payment confirmation, a one-time code on a flow you are authorized to run, a judgment call. Instead of failing or guessing, Twin pauses the run, surfaces the decision to a human, and resumes deterministically once they respond. The agent keeps its place; nothing restarts.

Pause, don't guess

Blocked steps stop the run and request a human decision rather than hallucinating an action.

Resume in place

Once approved, the run continues from the exact step it paused on — no replay from the top, no lost state.

Authorized by design

Handoff is how Twin handles approvals and MFA on flows you are authorized to operate — the human is the control point.

Fully audited

Who approved, when, and what they saw is recorded alongside the run's step list and session video.

How it works

From a goal to deterministic action

  1. 1Hit a gated stepThe executor reaches a step flagged as requiring approval or human input.
  2. 2Pause and notifyThe run state flips to awaiting_approval and the decision is surfaced via API/webhook and the dashboard.
  3. 3Human decidesA person approves, rejects, or supplies the required input (for example a one-time code on an authorized account).
  4. 4Resume deterministicallyTwin continues from the paused step with the human's response folded in.
In practice

See it on a real call

A gated step pauses the run; a human supplies the input and the run resumes from step 3.

handoff.tsts
const run = await twin.agents.run({ goal, url });

if (run.status === "awaiting_approval") {
  // surface run.pendingStep to a human, then:
  await twin.runs.approve(run.id, { input: otp });
}

// → x-twin-status: completed
// → resumed from step 3 of 5
api.twin-browser.com
  1. Hit a gated stepdone
  2. Pause and notifyrunning
  3. Human decidesqueued
  4. Resume deterministicallyqueued
At a glance

What human-in-the-loop handoff is

The facts — how it works, what it costs, and the signal you get back on every call.

PropertyTwin Browser
TriggerApproval, MFA, ambiguity
Paused stateawaiting_approval
ResumeFrom the exact step
ChannelsAPI, webhook, dashboard
AuditApprover, time, context
AuthorizationHuman is the control point
FAQ

Human-in-the-loop handoff — common questions

Does the run start over after a handoff?
No. Twin keeps the run's state and resumes from the exact step that paused once the human responds.
Is this how MFA is handled?
Yes — on flows you are authorized to operate, a one-time code or approval is a human-in-the-loop step. The person supplies it and the run continues.
How is the approval recorded?
Every handoff records who approved, when, and the step context, alongside the run's step list and session video.

Make every run cheaper than the last.

Start free, compile your first skill, and watch the marginal cost per run trend toward zero as your agents reuse what they have already learned.