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.

status:"paused" → POST /api/v1/runs/:id/resume
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. Twin resolves what it can on its own: when the blocker is a 2FA code and you have connected an email inbox or a phone number, it fetches and fills the code itself, no human in the loop. When it cannot — a payment approval, an authenticator-app code, or a code only you hold — it pauses the run, surfaces the decision to a human, and resumes deterministically once they respond. The agent keeps its place; nothing restarts.

Parks by default — never just fails

A sign-in run that hits a 2FA/approval wall it can't auto-resolve PARKS by default: it returns status:"paused" with a sessionId, resumable via POST /api/v1/runs/:id/resume, instead of failing. Pass hitl:false to opt out.

Auto-fill when connected

A connected email inbox or phone number lets Twin fetch and fill an emailed or texted 2FA code on its own — resolving the pause with no human in the loop.

Pause, don't guess

When it can't auto-resolve, the run stops and requests a human decision rather than hallucinating an action.

Resume in place

Once the code or approval arrives, the run continues from the exact step it paused on — no replay from the top, no lost state.

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 2FA / gated stepThe executor reaches a login second factor or a step flagged as requiring approval.
  2. 2Auto-resolve or pauseA connected email inbox or phone number resolves an emailed/texted code automatically; otherwise the run pauses and surfaces the decision via API/MCP and the dashboard.
  3. 3Human supplies itFor a code it can't fetch or an approval, a person supplies the input — via POST /api/v1/live/resume, the MCP submit_verification tool, or the dashboard.
  4. 4Resume deterministicallyTwin continues from the paused step with the code or approval 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 === "paused") {
  // surface run.challenge to a human, then resume in place:
  await twin.runs.resume(run.id, { code: otp }); // POST /api/v1/runs/:id/resume
}

// → status: "complete"
// → resumed from step 3 of 5
api.twin-browser.com
  1. Hit a 2FA / gated stepdone
  2. Auto-resolve or pauserunning
  3. Human supplies itqueued
  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 statestatus:"paused" + sessionId
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?
Partly. If you connect an email inbox or a phone number, Twin auto-fills an emailed or texted one-time code with no human in the loop. When it can't — an authenticator-app (TOTP) code, a phone approval, or a code only you hold — the run pauses and a person supplies it via the API (POST /api/v1/live/resume), the MCP submit_verification tool, or the dashboard, then 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.