Agent Auth Gateway v1.0

Guides / 7 min read

How to Dry-Run an Agent Policy Change Before It Ships

Published 2026-11-14 · Reviewed 2026-11-14 · By the Ingenious AI team

Changing an agent policy feels like editing a config file. It behaves like deploying code to production — except the test suite is usually missing, and the failures arrive as a support queue wondering why the agent stopped doing its job.

The short answer

Dry-run every policy change against recorded traffic before it ships: replay the last few hundred real authorisation requests through the proposed rules and diff the decisions. Investigate both directions of change — actions newly denied, which may be real work you are about to break, and actions newly allowed, which may be exposure you are about to open. Ship with the diff reviewed and signed off by the agent's owner, keep the old policy one step away for rollback, and watch the live deny rate for the first day as if it were a deploy, because it is one.

Check your own setup as you read: run the free Spend Guard self-check or test a policy in the playground — five minutes, no signup, and the gaps it names map to the controls below.

Worked example: the deny rule that would have stopped payroll week

A fictional accountancy platform, Tally & Frost, proposed a tidy policy change: deny the agent's file-export action outside business hours, after a security review. The dry run replayed two weeks of real traffic — 4,300 decisions — and flagged 61 newly denied actions. Fifty-eight were the exports the rule intended. Three were payroll-file exports the bureau ran at 21:00 on the last Thursday of each month, a legitimate pattern nobody in the meeting owned. Shipping blind would have denied payroll exports in the first live week, discovered by clients.

The rule shipped with a payroll-window exception, written from the dry-run evidence, and the team kept the diff report attached to the change record. Their practice now: no policy change ships without a replay over at least two weeks of traffic — a month for rules touching money — and any change whose newly-denied count exceeds 2 percent of traffic needs the agent owner's explicit sign-off on the specific items, not a general approval of the idea.

Replay beats reasoning for policy

It is nearly impossible to hold an agent's real behaviour in your head: the long tail of legitimate actions is exactly what meetings forget, as Tally & Frost's payroll exports show. Recorded traffic remembers it. A replay harness needs only what the gateway already has — the decision log's requests and context — plus the candidate policy. The output is a concrete list, not an opinion: these 61 decisions change, here they are, judge them one by one.

Review both directions of the diff

Newly denied actions get the attention, because breaking work is loud. Newly allowed actions are the quieter risk: widening an allowlist, raising a cap, or reordering evaluation can open exposure that no incident will announce — the absence of a denial is not an event anyone notices. Review newly-allowed items against the change's stated intent with the same item-by-item care. If the intent was to deny exports at night and the diff also allows a payment action it did not mention, the change is not ready, whatever its headline says.

Thresholds turn diffs into decisions

Set standing rules for diff size in advance, so no change negotiates its own standard under deadline pressure. A workable set: any newly denied money action, any newly allowed action at all, and a newly-changed share above 2 percent of replayed traffic each require the owner's item-level sign-off. Below those lines, changes ship on the reviewer's judgement with the diff archived. The numbers matter less than their pre-existence — they convert 'does this look fine' into a procedure.

Ship it like a deploy, with a rollback

Policy changes get the deploy treatment: a recorded before-and-after, a watching window on live deny and approval rates, and a one-step rollback to the previous policy version that a tired on-call can execute without editing files. The first day after a change, compare live decisions against the dry run's prediction; a large divergence means reality has a traffic class your replay window missed, and rollback is cheaper than diagnosis under pressure.

Building the replay harness from what you already have

The harness needs three inputs, all of which a gateway fleet already produces: the decision log's recorded requests with their context, the live policy, and the candidate policy. The replay is a batch job — feed the requests to the candidate, collect decisions, diff against the recorded ones, and render the changed items in a reviewable list with amounts and agents attached. Keep the tool boring and fast; a dry run that takes an afternoon will be skipped under deadline pressure, while one that takes four minutes becomes a habit. Archive each run's diff with the change record, so the fleet accumulates a history of predicted-versus-actual that makes every future review sharper.

Five actions to dry-run policy changes

  1. Build the replay from the decision log: at least two weeks of real requests, a month for money-touching rules.
  2. Diff the proposed policy's decisions against the live ones and review newly denied and newly allowed items individually.
  3. Set standing thresholds in advance — any newly allowed action, any newly denied money action, or over 2 percent changed needs owner sign-off.
  4. Attach the diff report to the change record and ship with a one-step rollback to the previous policy version.
  5. Watch live deny and approval rates for a day after shipping and compare them against the dry run's prediction.

Source note and related guides

Figures in the worked example are illustrative, drawn from a fictional company created for this guide; the controls, failure patterns and procedures described are the gateway's documented behaviour — see the Agent Auth Gateway documentation and the policy patterns in allowlists vs denylists, spend caps and the agent kill switch. Reviewed by the Ingenious AI team, 2026-11-14.

Sources

  • NIST AI Risk Management Framework (AI RMF 1.0), the voluntary framework for managing AI risk across design, development and use: nist.gov, 2023
  • OWASP Top 10 for Large Language Model Applications, the OWASP GenAI Security Project's risk list for LLM and agent systems: owasp.org, 2025
  • RFC 6749, The OAuth 2.0 Authorization Framework, the IETF standard behind scoped, expiring access tokens: rfc-editor.org, 2012

Frequently asked questions

What is a policy dry run for AI agents?

Replaying recorded real authorisation requests through a proposed policy and diffing the decisions before the change ships. It shows exactly which past actions would have been decided differently — the list a meeting would otherwise have to imagine.

How much traffic should a dry run cover?

At least two weeks of real decisions; a month for rules touching money or monthly cycles. Tally & Frost's two-week replay caught payroll exports that ran one evening a month — a shorter window could have missed them.

Why review newly allowed actions, not just new denials?

Because exposure opens silently. A change intended to deny exports that also quietly allows a payment action will not announce itself — there is no incident in an absence of denial. Both directions of the diff need item-level review.

What diff size should block a policy change?

Set your thresholds in advance. A workable set: any newly allowed action, any newly denied money action, or more than 2 percent of traffic changing decision requires the agent owner's explicit sign-off on the specific items.

Should policy changes have rollbacks?

Yes — versioned policies with a one-step rollback, and a watching window after shipping. Treat a policy change as a deploy, because its failure modes are a deploy's failure modes.

Governing agents in production?

Spend caps, approval queues, policy simulation, burn forecasting, and step-up lockdowns — all built into the gateway. Free tier to start. Or test policies in the playground with no signup.

Share this: X Facebook LinkedIn WhatsApp
← Fail Closed or Fail Open? Defaults for A… All guides Delegating Authority to Sub-Agents Witho… →