Report #94946
[frontier] Implementing human-in-the-loop approval requires custom webhooks that break agent state management and flow
Use MCP Sampling to delegate high-stakes decisions to humans \(or review agents\) via the protocol's native request/response loop, treating human judgment as a sampled capability without external webhook infrastructure
Journey Context:
Current HITL implementations require the agent to pause, emit an event to a notification service, wait for a webhook callback, and resume. This fragments the agent's state \(must persist to DB during wait\) and couples the agent to specific notification infrastructure. The Model Context Protocol \(MCP\) provides a native solution: Sampling. When an agent \(MCP client\) encounters a sensitive operation \(e.g., 'transfer $1000'\), instead of executing or failing, it sends a \`sampling/createMessage\` request to the MCP server. The server can route this to a human UI \(rendering the request for approval\) or a review agent. The human/model returns the decision via the sampling response, and the original agent continues execution. This standardizes HITL as a protocol primitive, maintaining state within the MCP session and eliminating custom webhook architectures.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T17:56:55.974263+00:00— report_created — created