Guardrails and approvals
Approvals
How a risky action waits for a person, and how it runs once approved.
When a server's guardrails or an exception say Ask a person, Tracehold holds the call. Nothing reaches your cloud until a person decides, in Tracehold or in Slack.
What the agent sees#
The tool call returns an error the agent can read:
Action requires human approval: ...
Action ID: 3f2c...
Approval expires at: 2026-09-28 10:15:00+00:00
To wait for the decision, call tracehold_wait_for_approval with this Action
ID: it waits up to 25 seconds at a time, so keep calling it until a person
decides or the request expires (people can take several minutes). Once a
person approves, it runs this call and returns its result. Repeating this
exact call after approval also runs it. Changing the arguments starts a new
approval request.
How the agent learns the decision#
Nobody has to tell the agent. Every server lists Tracehold's own tool
tracehold_wait_for_approval beside the tools you chose. The agent calls it
with the Action ID; it waits up to 25 seconds (or wait_seconds) and answers:
| The person | The tool |
|---|---|
| Approved | Runs exactly the call they approved, once, and returns its result |
| Rejected | Says who rejected it; nothing runs |
| Has not decided | "Still waiting for a person (0 of 1 approval so far)": the agent calls it again, until the request is decided or expires |
| Let it expire | Says so; the agent can ask again with a new call |
It sees only the held calls of that server's own agent, it can approve nothing, and it acts on nothing but the approved call. Works with any MCP client: it is an ordinary tool call.
An agent that stops waiting (it ended its turn, or its person told it to) does not hear the decision by itself: a server cannot start an agent's turn. Tell it to carry on, and it waits again or repeats the call, which then runs if it is within 15 minutes of the approval.
For CI jobs, code-driven steps and agent frameworks, with tested code, see Agents in pipelines.
Agents you run from code#
An orchestrator (LangGraph, the OpenAI Agents SDK, CrewAI or your own loop) can also pause a run and resume it on a webhook (Team and Enterprise). Set a URL and a signing secret under Settings → Organization; when the request is decided (approved by the last person a rule needs, or rejected), Tracehold posts:
{"event_id": "…", "event_type": "action.approved", "organization_id": "…",
"action_id": "3f2c…", "agent_id": "…", "action_identifier": "aws:s3:DeleteObject", …}
with X-Tracehold-Event-Type (action.approved or action.rejected),
X-Tracehold-Event-Id (for deduplication) and, with a secret,
X-Tracehold-Signature: sha256=<HMAC-SHA256 of the raw body>. Check the
signature, find the run waiting on that action_id, and resume it: its next
step calls tracehold_wait_for_approval (or repeats the call), which runs it.
Tracehold's server makes that request, so the URL must be https and its
host must resolve only to public addresses. Localhost, private networks
(10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, fc00::/7), carrier-grade
NAT and link-local addresses, cloud metadata at 169.254.169.254 among
them, are refused. Tracehold checks when you save the URL and again before
every post, since DNS can change in between; it posts to the address it just
checked and does not follow redirects (a 3xx is a failed delivery, so give
the final URL).
What the reviewer sees#
Approvals shows each held action in plain English ("Agent wants to delete object (AWS S3)", or for an agent signed in as a person, "Claude Code for Maya Chen wants to ..."), the exact arguments (which bucket, which key), its risk, the account's environment and whether it can be undone, what the key for that call will be able to do on that cloud, and a countdown to expiry. Arguments are stored encrypted and values that look like secrets (passwords, tokens) are masked.
With Slack connected, the same request is posted to your channel with Approve and Reject buttons. People whose Slack email matches their Tracehold account decide there under the same rules as in the app; anyone else is told, privately, why nothing was decided. Wherever the decision is made, the Slack message then shows who made it.
How it runs#
Approving does not execute anything by itself: the agent is holding the
call, so the agent asks again, by waiting with tracehold_wait_for_approval
or by repeating the call.
- A reviewer approves. The approval is written to the audit chain, attributed to them.
- The agent's wait returns, or it repeats the identical call: same server, same action, same arguments.
- Tracehold recognises it and hands it to your connector, which runs it once with a key for that action. The execution is written to the audit chain. If no connector is online, the approval is not used up.
A repeat after that is a new request and needs its own approval. Two retries arriving at the same moment cannot both run it: the approval is claimed with a single conditional update.
While the action is still pending, a retry returns "Still waiting for approval" with the same action ID rather than creating a new request, so an agent that polls does not flood the queue.
Rules that keep it honest#
| Rule | Why |
|---|---|
| Arguments must match exactly | An approval for one object cannot be spent deleting another |
| One approval, one execution | An approval is not a standing permission |
| Owners and admins decide; others only their own agent's calls, as allowed | Agents never approve; viewers never decide (below) |
| One person cannot count twice toward a two-person rule, and the person the agent acts for never counts | Multi-approver rules mean other people |
| One person's agent cannot wait on or spend another's approval | An approval is for the call a person's agent made |
| Only pending actions can be rejected | A rejection cannot rewrite an action that already ran |
| Every approval, rejection and expiry is in the audit chain | The mutable actions table is not evidence |
Your own agent's calls#
An agent signed in as a person makes calls that are theirs. Whether people may approve them is the organization's choice: Approving your own agent's calls. Anyone may reject their own agent's call, and a member whose agent's call is held is emailed when they may approve it.
Two-person rules and expiry#
When you create an Ask a person exception under Guardrails → Exceptions, you choose how many different people must approve (1, or on Team and Enterprise 2 or 3) and when the request expires. The Approvals card shows progress ("1 of 2 approvals"); the first approver cannot approve again.
A held action expires after the rule's window, or the organization default
(Settings, 30 minutes unless changed) when the rule does not set one. An
expired action is blocked and recorded as action.approval_expired. After
approval, the call must run within 15 minutes: the agent's wait, or its
repeat of the call.
Servers in monitor mode#
A server in Monitor mode decides every call as production would. Allowed calls run; a call production would hold is only recorded, and nobody is asked: its sessions show Would ask there. Switch the server to Production to enforce.