Confirmation Model
Approval applies to calls the model selects in the agent loop. Durable child-tool execution, authored ctx.request() calls, and direct tool evals bypass these gates. Inline composites refuse confirmation-required and connection-category children. Enforce authorization and approval for those paths in the workflow or the downstream API. See Agent Workflows.
Tiers
| Tier | Behavior |
|---|---|
| Auto-approve | The call runs without user interaction. |
| Confirm | The runtime emits confirmation_required and runs the call after approval. |
| Review | The runtime refuses the call. Any human-review workflow belongs to the host application. |
| Never | The runtime refuses the call. |
| Surface | Where configured | Values | Tier |
|---|---|---|---|
| Connection endpoint | policy.json confirm | omitted / true / "review" / "never" | auto / confirm / review / never |
| Custom tool | tool.ts exposure.kind | open / requires-confirmation / operator-gated | auto / confirm / not enforced |
| Request tool call | intent argument | "read" / "write" / "confirmed_write" | which side of the handshake a call is on |
See policy.json for the endpoint format, matching rules, and threshold escalation.
Custom tools
open(the default): the model calls the tool freely.requires-confirmation: every model-selected call pauses for approval. The card's reason isexposure.prompt, with{{param}}substituting a call parameter, such asSend the invoice to {{customer}}. A parameter whose name looks like a secret shows as[REDACTED]. Without a prompt, the reason isTool "<name>" requires user confirmation.operator-gated: a label for tools run from operator UI. The runtime does not enforce it. Setllm_callable: falseto keep the tool out of the model's tool list while composites and triggers can still call it.
In tool.json, confirm: true or "review" allows write-intent ctx.request() calls but does not prompt the user. confirm: "never" skips registration with a warning. See Tools.
The request tool handshake
Every request call declares intent. POST, PUT, PATCH, and DELETE must declare "write" or "confirmed_write", unless the matching endpoint policy sets "intent": "read".
When a write hits a confirm-tier endpoint:
- The model calls with
intent: "write". The loop parks the call and emitsconfirmation_required. - The user approves. The SDK chat components render the card.
- The runtime runs the same call with
intentrewritten to"confirmed_write". The model does not call again.
Outside the agent loop, such as in durable execution, a confirm-tier "write" returns a preview object that tells the caller to call again with "confirmed_write".
Native operation tools
Native OpenAPI tools take no intent. Reads and writes follow the method and policy. Invalid arguments are refused before a confirmation card. The card carries the connection, method, path template, policy reason, and grouped arguments. Approval is bound to those effective arguments, so a hook rewrite after approval asks again.
The confirmation_required event
The SSE event (SSEConfirmationRequiredEvent) has endpoint, method, reason, escalated, and timestamp, plus optional params, connection_name, and correlation_id. connection_name names the connection, or the MCP server for an MCP tool. It fires for:
- A connection write at the confirm tier.
- A
requires-confirmationcustom tool, or a file tool that writes, edits, or deletes a repo file. - A hook
askdecision.
See SSE event types for the client view and Interactions for the approval response.
Audit record
On a hosted agent, each confirmation on a /chat or /chat/stream turn ends in one audit log entry with event tool_confirmation. A stopped turn records none.
| Field | Value |
|---|---|
details.outcome | approved, denied, timed_out (no answer within the confirmation timeout), or withdrawn (the runtime ended the wait). |
details.decided_by | The answerer as the runtime verified them: user_id, org_id, auth_method, principal, actor, scope_id. Absent for timed_out and withdrawn. |
resource_name | The tool name. |
session_id | The chat session. |
correlation_id | The tool call id, the same as the card's correlation_id. |
details card fields | The card's endpoint, method, reason, connection_name, and sanitized params. |
The entry's actor is the agent's runtime (actor_type: "runtime"). Trust details.decided_by only on rows with that actor type.
A custom tool reads these entries with ctx.listConfirmations(). It returns only entries the agent's runtime recorded, newest first, across every session and user of the agent, so check ctx.userId or ctx.claims before showing an entry to a caller. Each entry carries id, timestamp, toolName, sessionId, toolCallId, outcome, decidedBy, endpoint, method, reason, connectionName, and params. When the answerer's token named no person, such as an SDK client token, decidedBy.userId is the agent's or the deploy's id, and decidedBy.principal names the kind of caller.
Outside systems read entries with an observer automation token at GET /api/agents/:agent_id/audit-logs?event=tool_confirmation. Entries arrive within a few seconds, because the runtime sends them in batches. Entries are kept for the organization's audit retention period, 365 days by default.
Escalation
Thresholds and delegations.escalateConfirm raise a tier at call time. Both escalate only to review or never, so an escalated call is denied with an escalation reason and emits no confirmation_required event. Subagents have no approval handler, so a confirm-tier call from a subagent is denied either way.