← All posts
Product6 min read

Human-in-the-loop, without stalling the run

Approval gates and ask-for-input tools let an agent pause for a human and pick up exactly where it left off. A look at the pause/resume model behind it.

Plenty of useful agent workflows need a human in the loop: confirming a refund, approving an outbound email, choosing between two drafts, supplying a value the agent can't infer. The naive way to build this is to block — hold the request open while a person decides. That falls apart the moment a human takes more than a few seconds, which is to say, always.

LoopLlama treats a pause as a state transition, not a blocked thread. When a run needs a human, it stops cleanly, persists its position, and releases all resources. Nothing is holding an open connection waiting for someone to come back from lunch.

Pause is a first-class run state#

A run can be running, completed, failed — or awaiting input. When an agent hits a point that requires a person, the run moves into the awaiting-input state and checkpoints exactly like it would at any other step boundary. The decision the run is waiting on is recorded alongside it. Hours or days later, supplying that decision transitions the run back to running and it continues from the same point.

Two gates: ask-for-input and approval#

There are two ways a run pauses for a human, and they cover different needs:

  • Ask-for-input is a tool the agent calls when it needs information it doesn't have — a missing detail, a clarification, a choice between options. The agent decides when to ask.
  • Approval gates wrap sensitive tools. Before an agent can send an email, update a CRM record, or take any action you've marked as requiring sign-off, the run pauses for an explicit yes or no — regardless of how confident the agent is.

The distinction matters: ask-for-input keeps the agent in control of the conversation, while approval gates keep the human in control of consequences. Most production workflows use both.

Resuming exactly where it left off#

Because pausing rides on the same checkpoint machinery as resumable runs, picking up after a pause is not a special case. The accumulated context is reconstructed from persisted steps, the human's input or approval is folded in, and the next step is dispatched. The agent doesn't 'remember' it paused — from its perspective, it simply received the input it was waiting for and kept going.

The result is human oversight that doesn't cost you throughput. A run can wait a week for an approval without consuming anything, and a single worker can supervise thousands of paused runs at once.

Written by The LoopLlama team.

Run your first agent crew in five minutes.

Get an API key and put these ideas to work. Pay only for the steps your agents run.