Harness

Confirmations and approvals

The person confirms a call in your UI, or a reviewer approves it as a Scute access request. Both cover one exact call.

A call that answers approve waits for someone. verdict.decision.approve.by says who:

byWhoComes fromHow it is given
userThe person the agent works forapprovalYour UI: run.confirm(), or the framework's tool approval
reviewerSomeone else (a manager, an admin)A permission that requires approval, through permissionsA Scute access request a reviewer approves

The person confirms#

The model reads Confirm: <call> Ask them to confirm, then try again. Show the confirmation in your UI. When the person confirms:

await run.confirm("refund_invoice", { invoice_id: "INV-1", amount: 90 });

The next call with the same tool and the same arguments passes approval, once. Key order does not matter; a different value does. The confirmation is stored in the run's state, so it works across requests.

With the Vercel AI SDK this is the SDK's tool approval: run.toolApproval answers user-approval, your chat UI shows the request, and the approval response lets the call through. See Vercel AI SDK.

A reviewer approves#

When Scute's engine answers allow_with_approval, permissions files an access request for the exact call:

  • The request carries the arguments as details. Reviewers see them, and the approval only counts for a call with the same arguments. A call with other arguments is a new request.
  • It is tagged with the agent and the task, with a reason like Support bot: refund_invoice (invoice_id INV-1, amount 90).
  • The verdict carries approve.requestId and the request's say line. The model reads ... The request is filed (id <id>); tell the person it's pending and try again once it's approved.
  • Filing is safe to repeat: Scute answers with the open request for the same call.

Check where it stands:

const approval = await run.approvalStatus(verdict.decision.approve!.requestId!);// { id, status: "pending", say: "...", details, permission, resource, expires_at }

Once the status is approved, check the call again. The check sends the approval id with the call's arguments, the engine allows it, and the approval is spent. It is only sent on a call no other guard stopped, so a call budget or grounding refuses does not waste it.

Approval status values#

StatusMeaning
pendingWaiting for a reviewer
approvedApproved; the next identical call goes through
deniedA reviewer refused it
cancelledWithdrawn
expiredNot decided in time
usedAlready spent on a call
not_neededThe engine allows the call without approval; nothing was filed
verify_firstThe person has to verify before a request can be filed

The engine's own answer decides whether a request is filed. A call the engine denies is refused with not_permitted (403).

File without the guard#

run.requestApproval(call) (Python and Ruby: request_approval) files the request for a call object, for custom guards. It is the same request permissions files.

POST/v1/auth/:app_id/agent/approvalsTask token

Body: action, resource, reason, context, details. GET /v1/auth/:app_id/agent/approvals/:id returns the status.

Several calls at once#

When the agent knows its steps up front, one review can cover all of them. See plans.

Turning filing off#

permissions({ fileRequests: false }) returns the approve decision without filing anything. Requests are never filed in monitor or observe mode.