How to Hand an AI Agent's Task to a Human Without Losing the Session
TL;DR
The wrong handoff sends a person a description of the problem; they open their own browser, repeat all the steps, and the agent never benefits. The right one gives them the agent's live browser: they see what it saw, fix it in that session, and the agent resumes with the state intact. Add three things and it compounds: detect the wall precisely, record the fix as a procedure, and answer the next occurrence from the recording instead of paging anyone.
A handoff that makes the human redo the work is not a handoff, it is a failure report with extra steps. The person should take over exactly where the agent stopped, in the agent's own browser, and give it back when the wall is cleared.
Why the usual escalation fails
A Slack message saying the checkout agent failed on step 4 sends somebody to open the site themselves, log in with their own account, navigate to the same place and complete the task. The agent's session is abandoned. Nothing was learned. Tomorrow the same message arrives.
The pattern that works
- Detect the wall precisely. Not the task failed but a login page appeared at this URL. Precision is what lets the same wall be recognised next time.
- Hand over the live session. The person gets a link to the agent's actual browser, streamed to them, with the wheel. They finish the step by hand. No re-login, no re-navigation.
- Hand it back. The agent resumes in the same session, with whatever the person unlocked still in place.
- Record the fix as intent. Not coordinates and not a video: a procedure a model can follow. The next run asks for it before trying, and follows it without a human.
hint = oo.skills_for(task) # 1. has a person already cleared this?
if hint:
return follow(hint)
try:
return attempt(task)
except WallDetected as wall: # 2. precise: what page, what blocked
fix = oo.request_fix(url=wall.url, task=task)
notify_team(fix.url) # 3. a link to the agent's live browser
fix.wait() # the person fixes it in that session
return attempt(task) # 4. resume; the fix is now a skillWhat to never record
A fix session is exactly where passwords and one-time codes get typed. The recording should keep the shape of what happened, a click here, a keypress there, and never the characters. That is not a limitation to work around; it is the property that makes it safe to let a person fix things in a system that remembers.
Questions people ask
How do I escalate an AI agent's task to a human?
Give the person the agent's live browser session, not a description. They fix the step where the agent stopped and hand the session back, so the agent resumes with the state intact.
What is human-in-the-loop for AI agents?
A pattern where an agent stops at a wall it cannot pass and a person completes that step, ideally in the agent's own session so nothing is repeated and the run continues.
How do I stop the same handoff happening every day?
Record what the person did as a procedure written in terms of intent, and have the agent ask for it before attempting the task. The second occurrence is answered from the recording.
Is it safe to record what a human does during a handoff?
Only if typed characters are never captured. Record the shape of actions, clicks and keypresses, and never their content, because a fix session is where secrets get typed.
DoubleOh is the reliability layer for AI agents. When one gets stuck, a person fixes it once in a live browser, and the fix becomes a skill the whole fleet follows from then on.
Start free