An agent asks to delete a snapshot. The call is held, a reviewer gets a Slack message, and three minutes later they approve it. By then the agent's MCP client may have given up: the official MCP TypeScript SDK cancels a request after 60 seconds unless told otherwise. If it has, the agent saw an error and either stopped or tried something else, and the approval is attached to nothing.
Our post on approval fatigue covers why people approve badly and which calls deserve a person at all. This companion covers how: where an approval can live, how it breaks, a design that survives, and code we test against a real Tracehold.
Three places an approval can live
In the agent framework. The OpenAI Agents SDK lets a tool declare that it needs approval. From its documentation as of October 26, 2026 (the current release on PyPI was 0.24.0):
from agents import Agent
from agents.decorators import tool
@tool(needs_approval=True)
async def cancel_order(order_id: int) -> str:
return f"Cancelled order {order_id}"
The run stops with the pending call in result.interruptions. Your code turns the result into a RunState, calls state.approve(...) or state.reject(...), and resumes with Runner.run(agent, state).
In LangGraph, a node calls interrupt() and the graph waits for a Command(resume=...) on the same thread ID, which needs a checkpointer. From its documentation as of October 26, 2026 (langgraph 1.2.18):
from typing import Literal
from langgraph.types import interrupt, Command
def approval_node(state: State) -> Command[Literal["proceed", "cancel"]]:
# Pause execution; payload shows up on stream.interrupts (with stream_events) or result["__interrupt__"] (with invoke)
is_approved = interrupt({
"question": "Do you want to proceed with this action?",
"details": state["action_details"]
})
# Route based on the response
if is_approved:
return Command(goto="proceed") # Runs after the resume payload is provided
else:
return Command(goto="cancel")
What this guarantees: your process does not run the tool until your code records a decision. Who the reviewer is, and where the decision is kept, is up to you.
In the MCP client. Clients show permission prompts, and MCP lets a server ask the client's user for input through elicitation. In the 2026-07-28 revision a server no longer sends a request of its own: it returns an InputRequiredResult, and the client retries the original request with inputResponses carrying the answer. URL mode sends the user to a web page instead; accepting only means they agreed to open it, and the server learns the outcome when the client retries. AWS's API MCP server builds its REQUIRE_MUTATION_CONSENT option on elicitation, so it needs a client that supports it. What this guarantees: the person at the client clicked accept.
In a gateway between the agent and the cloud. The server that holds the tools decides each call, stores the ones that need a person, and lets a reviewer decide somewhere else, such as an app or Slack. What this guarantees: no call through that server runs until a person allowed it, whatever the agent or client does. It says nothing about paths that go around it.
| Where | The approval is bound to | Who approves | If the agent stops waiting |
|---|---|---|---|
| Framework | A call ID in your run state (OpenAI), a node that runs again (LangGraph) | Whoever your code accepts | Your saved state holds it until you resume |
| MCP client | The request the client retries | The client's own user | The request is gone |
| Gateway | Whatever the gateway stores | Whoever the gateway allows | Depends on the design below |
Five ways it breaks
1. The client gives up first. The MCP TypeScript SDK sets DEFAULT_REQUEST_TIMEOUT_MSEC to 60,000 on both its 1.x branch and main. Progress notifications can reset that clock, but only when the client sets resetTimeoutOnProgress, which defaults to false. The Python SDK sets no request timeout of its own, but the HTTP client it creates allows 30 seconds, and 5 minutes for a read. Hosts add their own limits: in May, a user reported that the Claude Code desktop app cancelled stdio tool calls after about 60 seconds with MCP error -32001: Request timed out and ignored MCP_TOOL_TIMEOUT, which the CLI honored. The issue was closed as stale. A tool call that blocks until a person decides will outlast every one of these.
2. The agent moves on. A cancelled call reaches the model as an error, and what happens next is the model's choice: report a failure, retry, or reach the goal another way. We know of no measurement of how often agents abandon a held call. The problem is that nothing but the model decides.
3. The approval is not bound to the arguments. In the OpenAI Agents SDK, a plain approval is scoped to the call ID, and always_approve=True keeps the decision for later calls to the same tool, whatever their arguments. The SDK's docs say that restoring a saved RunState does not authenticate it, and that a server should check each decision against the pending requests it stored and refuse replacement calls or arguments sent by the client (Keep approval state on the server). Tying an approval to exactly what the reviewer saw is left to you.
4. Resuming runs side effects twice. LangGraph does not resume at the line that called interrupt(). It restarts the node from the top, so code before the interrupt runs again, and the docs ask that such side effects be idempotent (Rules of interrupts). The OpenAI SDK's docs make the same point about crashes: "Approval permits a tool call to execute; it does not guarantee exactly-once execution" (Recovering after a crash).
5. The person who asked is the person who approves. Elicitation and permission prompts reach the user of the client, who is almost always the person who asked the agent to act. The spec requires servers to bind elicitation requests to the client and user identity, which tells you who clicked, not that someone independent did. The spec does not offer elicitation as a separation-of-duties control, and it is not one. The approval-fatigue post covers why regulators and standards bodies want those to be different people.
A design that survives
This is what Tracehold runs, but nothing in it depends on Tracehold.
-
Hold the call on the server, with its exact arguments. When a guardrail says to ask a person, store the call as the reviewer will see it: the action, the arguments (encrypted, since arguments can carry secrets), the agent, the person it acts for, and a hash of the arguments. Ours is SHA-256 over the arguments serialized as JSON with sorted keys, so key order does not change which call it is.
-
Answer at once, and say what to do. Do not block the tool call. Return a result marked as an error, so no client mistakes it for success, with an Action ID, an expiry and instructions a model can follow:
Action requires human approval: Guardrail: Destructive actions are sent to a person on this server
Action ID: 5ecad137-e362-46d2-ab80-3a12bd1b8f22
Approval expires at: 2026-10-24 15:42:07+00:00
To wait for the decision, call tracehold_wait_for_approval with this Action ID: ...
-
Resume one of two ways. The agent can repeat the identical call: the server matches agent, person, action and argument hash. Changing any argument starts a new request, and repeating while a request is pending returns the same Action ID instead of filling the queue. Or the agent calls
tracehold_wait_for_approval, a tool listed on every server, which waits up to 25 seconds, well inside a 60-second client timeout, and answers still waiting, rejected, expired or approved. When approved, it runs the stored arguments, not anything the agent sends now. It sees only held calls from its own server's agent and person, and it can approve nothing. -
Claim the approval once. Running an approved call starts with a single conditional update that marks it as executing only if it is approved, not yet run, and inside its window. Whichever request wins runs it; any other, concurrent or later, is told it already ran. A repeat after that is a new request with its own approval. The OpenAI SDK's docs ask for the same in shared storage: an atomic transition before resuming.
-
Expire both sides. A pending request expires after 30 minutes unless the organization or the rule sets another window (from 1 minute to 24 hours); an expired request is blocked and recorded. After the final approval the call must run within 15 minutes, or the agent asks again. If no connector is online to run it, the approval is not spent.
-
Tell orchestrators, with a signature. When the last approval a rule needs lands, or someone rejects, post
action.approvedoraction.rejectedwith the Action ID to the organization's webhook, signed with HMAC-SHA256 over the raw body. The first approval of a two-person rule sends nothing, so a pipeline never resumes on half a decision. -
Keep the requester out by policy. Owners and admins approve. Whether people may approve their own agent's calls is an organization setting. A rule that needs two people never counts the person the agent acts for, and one person cannot count twice. Each approval and rejection is appended to the audit chain in the same transaction that records it.
The code
A model in a loop (Claude Code, or an OpenAI Agents SDK or LangGraph agent given the server's tools) needs nothing special, because the held reply tells it to call the wait tool. One instruction keeps it from stopping to report instead: "If Tracehold holds a call for approval, keep calling tracehold_wait_for_approval with its Action ID until it is decided." Asked only to delete an SNS topic, Claude Code 2.1.296 called the delete, read that it was held, waited, and reported the result once a person approved.
A step in your own code calls the tool directly and waits without spending model tokens. This is docs/examples/wait_for_approval.py, unchanged. Our backend journey, part of the check suite we run before releasing, imports it and runs it against a real Tracehold, with a person approving and rejecting while it waits:
"""Run a Tracehold tool call from code, and wait for a person if Tracehold
holds it. Works with the official MCP Python SDK (ClientSession or Client).
Run by Tracehold's backend journey (backend/tests/e2e)."""
import re
WAIT_TOOL = "tracehold_wait_for_approval"
ACTION_ID = re.compile(r"Action ID: ([0-9a-f-]{36})")
class NotRun(Exception):
"""A person rejected the call, nobody decided before it expired, or it
was approved but could not run (for example, no connector online)."""
def _text(result) -> str:
return "\n".join(getattr(part, "text", "") for part in result.content)
def _failed(result) -> bool:
return bool(getattr(result, "is_error", getattr(result, "isError", False)))
async def call_with_approval(session, name: str, arguments: dict):
"""Call a tool. If Tracehold holds it for a person, wait for the decision
(each wait lasts up to 25 seconds; this repeats it) and return the result
of the approved call. Raises NotRun if it does not run."""
result = await session.call_tool(name, arguments)
held = ACTION_ID.search(_text(result))
if not (_failed(result) and held and "requires human approval" in _text(result)):
return result
while True:
result = await session.call_tool(WAIT_TOOL, {"action_id": held.group(1)})
if _failed(result) and _text(result).startswith("Still waiting"):
continue
if _failed(result):
raise NotRun(_text(result))
return result
An orchestrator facing long waits should keep nothing running. End the run at the held call, store its Action ID, and resume when the webhook arrives. This is docs/examples/webhook_receiver.py, unchanged; the journey checks that it accepts Tracehold's signed event and refuses the same body altered or unsigned:
"""Resume a paused pipeline run when a person decides on a held call:
check that the webhook came from Tracehold, then read which call it is
about. Run by Tracehold's backend journey (backend/tests/e2e)."""
import hashlib
import hmac
import json
def verify(body: bytes, signature: str | None, secret: str) -> dict:
"""The event, if Tracehold signed this exact body with your secret
(header X-Tracehold-Signature); raises ValueError otherwise."""
expected = "sha256=" + hmac.new(secret.encode(), body, hashlib.sha256).hexdigest()
if not signature or not hmac.compare_digest(signature, expected):
raise ValueError("not signed by Tracehold")
return json.loads(body)
# In your web framework, for example FastAPI:
#
# @app.post("/tracehold-events")
# async def tracehold_event(request: Request):
# event = verify(await request.body(), request.headers.get("X-Tracehold-Signature"), SECRET)
# if event["event_type"] in ("action.approved", "action.rejected"):
# resume_run_waiting_on(event["action_id"], approved=event["event_type"] == "action.approved")
# return {"ok": True}
The resumed step calls tracehold_wait_for_approval once with that Action ID, and the approved call runs and returns its result, provided it is within 15 minutes of the approval.
Tested: the code above on MCP Python SDK 2.2 in the backend journey, and on 1.28 (what agent frameworks install) in a framework check we run by hand, along with OpenAI Agents SDK 0.20.0 and LangChain 1.4.4 (langchain-mcp-adapters 0.3.2) driven by a scripted stand-in model, which checks plumbing rather than judgment; CrewAI tools 1.15.27. Not yet tested: the Claude desktop app, Cursor and Codex.
What this does not fix
- An agent that ends its turn does not hear the decision. A server cannot start an agent's turn. Until a person tells it to carry on or an orchestrator resumes it, the approved call waits, and after 15 minutes it lapses.
- Nothing is rolled back. An approval moves the decision to someone accountable; it does not make the decision right, and Tracehold does not undo a call that ran.
- An elicitation approval is the agent user's own click. Use elicitation to tell the user a call is waiting, or (URL mode) to send them to a page where someone else decides. The click itself is not an approval.
- The binding is to the stored call, not to a signature. An approval is tied to the stored call and its argument hash and recorded with the approver's identity in a hash-chained audit trail. The approver does not sign it cryptographically.
- Expiry sends no webhook, and nothing escalates. An orchestrator should stop waiting at the expiry time the held reply states. Escalating an unanswered request to someone else is not built yet.
- Webhooks need Team or Enterprise, and they are signed only once an admin creates a signing secret.
- A shared server token names nobody. Calls made with it match on the agent alone; matching on the person needs the agent to sign in as one.
Tracehold holds each call its guardrails send to a person with the exact arguments, and runs it once, through a connector in your own cloud, when the agent repeats it or waits. Start free, or read Agents in pipelines for the wiring.