Skip to main content
An approval in Tracelane covers one exact tool call. This page lists the ways an agent, or someone holding its API key, might try to reuse or bend an approval, what the gateway answers for each, and what the workspace ledger records. Each row is a test whose source is in the open-source repository.
This applies to protected tool calls that go through the gateway (MCP tool calls covered by a published action policy). Approval holds are a Preview and are off until a workspace turns on action control. A call that never reaches the gateway is not seen at all, and tools without a policy are observed, not held.

What an approval is bound to

When a person approves a held call, the approval is tied to:
  • the exact arguments (a digest of the full arguments in canonical JSON form, so key order and spacing do not matter but any changed or added value does),
  • the API key that proposed the call,
  • the tool, its server and the policy version that held it,
  • the workspace.
It can be used once, before it expires.

What each attempt gets

Send the approval’s id in the X-Tracelane-Approval-Id header with a call. If the approval does not cover that call, the gateway refuses it, does not contact the tool, and writes one denied_runtime row with a reason to your workspace ledger (signed when a signing key is configured). The row holds a digest of the attempted call, never its arguments. A call whose arguments the tool contract cannot read is refused before the approval is checked and writes no row. Two things are not refusals:
  • Presenting a still-waiting approval with the exact call returns 409 approval_required again and writes nothing new.
  • Retrying a refused attempt with the same Idempotency-Key gets the same answer and adds no second row. Retrying a call that already ran, with its original Idempotency-Key, returns the stored result and runs nothing again.
After any number of these attempts, the approval still works once for the call it was given for.

See the attempts

Each refused attempt appears on the Actions page with the status Blocked; its detail shows the event Refused at runtime. The rows are part of the workspace’s hash-chained, tamper-evident ledger and are checked by the offline verifier like any other row. See Audit ledger.

Run the tests yourself

The tests run the gateway’s real approval and execution code against a throwaway local Postgres. Tool effects are simulated; nothing is sent to a real tool or provider.
The tests are in crates/gateway/src/action_control/act19_pg_tests.rs. They fail rather than skip if Postgres is not reachable. The swap sweep runs 33 changed calls and 8 malformed ones against one approval, then runs the genuine call once.

Limits

  • Only protected tool calls through the gateway are covered. The tests do not cover calls made directly to a tool.
  • A replay is recorded with the reason approval_mismatch; the answer to the caller is the more specific approval_not_approved.
  • Each new attempt (a new Idempotency-Key) adds one row.