How should an agent wait for a human?
Your agent wants to refund $9,000. The person who can say yes is in a meeting, and will look at their phone in four minutes. A tool call expects an answer in milliseconds. What your agent does in those four minutes, and what happens to the question if it stops waiting, is a design decision most approval flows never made.
Three ways to wait
There are only three, and you have probably already used all of them.
- Hold the call open. The tool call simply doesn't return until the person answers. It works with every client ever written, and it fails the moment the client's own timeout is shorter than a human.
- Hand back a task. The call returns immediately with a handle, and the client asks for the result when it is ready. Nothing is held open, so nothing times out. This is what the MCP specification settled on in its 2026-07-28 revision, as the Tasks extension.
- Call a webhook. The decision is posted to a URL when it exists. This suits a backend with a public address. An agent on a laptop has no address to be called on.
None of the three is wrong. Each fits a different caller, and a server that picks one for everybody has picked wrong for somebody.
The failure nobody designs for
Follow the question, not the agent. The agent's call times out, or the user closes the laptop, or the process is restarted. The request is still sitting on a phone. Four minutes later a person reads it, decides it is reasonable, and approves.
Now ask what that approval is. In the mild case, a person was interrupted to authorise something nobody will ever collect. In the bad one, the approval is a flag in a table, and whatever reads that flag next acts on a yes given to a caller that no longer exists, with nobody watching the result.
So the rule we built to is short: nobody should be asked to approve a call that no one is waiting for. When the caller cancels, disconnects or cancels its task, the request is withdrawn from the approver's device. And because a yes can still cross with a hang-up, the guard checks again just before it sends: an approval that arrives after the caller has gone releases nothing.
What we ship
@humanauth/mcp 0.4.0 and
@humanauth/guard 0.3.0 choose per caller, on each
request. A client says it can take a task by declaring the Tasks
extension on that request; the specification forbids a server from
returning a task to a client that didn't, so everyone else gets a
call that stays open.
An MCP client that declares Tasks (spec 2026-07-28)
While the person decidesThe call returns a task at once. The client polls tasks/get, and the finished task holds the result.
If the caller gives uptasks/cancel withdraws the approval request.
Any other MCP client
While the person decidesThe call stays open. If the client asked for progress, it gets a notification every few seconds.
If the caller gives upCancelling the call or closing the connection withdraws the request.
Plain HTTP through the guard
While the person decidesThe connection stays open.
If the caller gives upHanging up withdraws the request.
You don't configure any of this. Upgrade the package and a client on the current spec starts receiving tasks; an older one keeps the held call, now with progress notifications that let a well-behaved client reset its timeout.
Where the webhook belongs
Webhooks stay, for the job they are good at. Set a callback and the platform posts every signed decision to a backend of yours, signed with your secret, as well as answering the agent. That is the system that records the decision, pages someone, or reconciles the ledger.
# humanauth.guard.yaml
approval:
ttl: 300
callback_url: https://ops.example.com/hooks/humanauth
callback_secret: env:HUMANAUTH_HOOK_SECRET One detail matters more than it looks. The callback address is set by whoever runs the server, in configuration, and is never a tool argument. An argument is something the model fills in, and a model that can choose where approvals are delivered can choose somewhere you would not.
What this does not do yet
- Tasks live in memory. They last for the approver's window plus a few minutes and don't survive a restart. The approval request itself is the durable record.
- A client that does neither still times out. If it can't take a task and ignores progress, it gives up when its own timeout passes, and the request is withdrawn. Raise that client's tool timeout to at least the approval window.
- Tested against the specification, not against every client. Our tests validate each response against the official schemas and drive both servers with the official SDK client. Clients in the wild will find things those did not.
The question to take to your own stack
Pick the riskiest action one of your agents can take, start it, and kill the agent before anyone answers. Then look at where the question went. If it is still waiting for a person, you have found the gap this post is about.
The details are in the MCP server guide and the guard's documentation.