The agent processed the refund. The amount was correct. The customer was verified. The evidence was attached. Everything looked right.
But the agent shouldn't have processed a refund at all. The customer's account was under fraud review. A policy, updated two days ago, restricted all financial transactions for accounts flagged by the fraud team. The agent didn't check. The guardrail didn't catch it. The refund committed.
This failure has a specific architectural cause: the system only validated at one point in the execution chain. And that one point wasn't enough.
This is a concrete instance of the silent failure mode documented in Part 2 — the agent "succeeded" at an action it was never authorized to take. The root cause isn't bad reasoning. It's insufficient policy enforcement architecture. The solution is dual-gate governance: policy enforcement at both decision-time and commit-time.
Every agent action passes through two distinct phases where governance must be enforced. Understanding these two moments — and why both require policy gates — is essential for any enterprise deploying AI agents in production.
Definition: Decision-time is the moment when the agent selects what to do — which tools to call, what parameters to use, what approach to take. This is the planning phase, before any tool execution begins.
At decision-time, the governance question is: Is this agent authorized to take this type of action, in this scope, under current conditions?
Definition: Commit-time is the moment when the action actually executes against production systems — the API call fires, the database writes, the payment processes. This is the execution phase, after planning is complete.
At commit-time, the governance question is: Do the specific parameters, runtime conditions, and system state allow this exact action to proceed?
Most governance approaches only enforce at one of these points. Guardrails typically run at output-time (after decision-time but before commit-time). Approval workflows run at commit-time but don't evaluate whether the agent's plan was valid in the first place. As documented in Part 1's guardrails analysis, single-point enforcement leaves structural gaps — regardless of which point you choose.
FAQ: Don't guardrails cover decision-time?
Guardrails validate agent outputs (text, format, safety). Decision-time gates validate agent authority (identity, scope, permissions, blocking conditions). These are different evaluation targets requiring different infrastructure.
A decision-time policy gate evaluates the agent's proposed action before the agent commits to an execution plan. This is where the runtime checks:
In the refund scenario: A decision-time gate would have evaluated the agent's intent ("process refund"), checked the customer's account status against the Context Graph, found the fraud review flag, and blocked the action before the agent ever selected a tool or constructed API parameters.
Decision-time gates prevent wasted work. If the agent isn't authorized to take the action, there's no point in compiling decision-grade context, selecting tools, constructing parameters, and routing through the Tool Broker. The gate stops the chain early and provides a clear reason — recorded in the decision trace.
FAQ: Does a decision-time gate slow down agent execution?
It adds milliseconds. It prevents unauthorized execution chains that waste seconds, dollars, and downstream rollback effort. The net effect is faster correct execution.
A commit-time policy gate evaluates the specific action parameters immediately before the Tool Broker executes the call. Even if the agent's plan was approved at decision-time, the specific execution may violate policy.
Scenario: An agent is authorized to process refunds up to ₹10,000. At decision-time, the agent's intent ("process refund") passes the gate. But during execution, the agent calculates the refund amount as ₹12,000 based on the compiled context. A commit-time gate catches this: the amount exceeds the agent's authorized threshold.
The gate produces one of three responses:
Commit-time gates also catch issues that cannot be evaluated at decision-time:
FAQ: Can't commit-time checks alone cover everything?
Commit-time catches parameter violations but can't prevent the agent from wasting resources on unauthorized actions. Without decision-time gates, agents compile context, select tools, and construct parameters for actions they'll never be allowed to execute.
The gap analysis below demonstrates why enterprises need both gates — and what breaks when either is missing.
| Enforcement Model | What It Catches | What It Misses | Failure Mode |
|---|---|---|---|
| Decision-time only | Unauthorized intent, scope violations, blocking conditions | Parameter threshold violations, idempotency, budget overruns, state drift between plan and execution | Agent plans correctly but execution-time conditions cause silent failures or cost blowups |
| Commit-time only | Parameter violations, runtime conditions, idempotency, budgets | Unauthorized actions that waste compute before being blocked; fraud flags and scope violations caught too late | Wasted resources, confusing late-stage failures, accountability gaps in the decision trace |
| Dual-gate (both) | Authority + scope + blocking conditions and parameters + thresholds + runtime state + idempotency + budgets | — | Complete governance coverage across both planning and execution phases |
The dual-gate model is what distinguishes a Governed Agent Runtime from point-solution guardrails. Guardrails are a filter at one point. Dual-gate enforcement is structural governance across the execution lifecycle — the zero-trust gateway pattern applied to every agent action.
FAQ: Is this similar to two-phase commit in databases?
Architecturally similar in principle. Decision-time is the "prepare" phase (can we proceed?). Commit-time is the "commit" phase (are the specific conditions met?). The dual-gate model brings transactional safety patterns to AI agent execution.
Every policy gate — whether at decision-time or commit-time — produces one of four outcomes. This four-outcome model is more nuanced than binary allow/deny and is fundamental to how a Governed Agent Runtime enables graduated autonomy.
| Outcome | What Happens | Example |
|---|---|---|
| Allow | The action is within policy. Proceed to next step in the runtime loop. | Refund of ₹5,000 for a verified customer with no blocking conditions |
| Modify | The action partially violates policy but can be adjusted to comply. | Refund calculated at ₹12,000 → capped at ₹10,000 (authorized threshold) |
| Require Approval | The action exceeds delegated authority but may be legitimate. Escalate to a human with full context and policy evaluation. | Refund of ₹50,000 exceeds agent authority → routed to finance manager with decision trace |
| Block | The action violates policy and cannot proceed. Clear reason recorded in the decision trace. | Customer account under fraud review → all financial transactions blocked |
This four-outcome model enables graduated autonomy — agents operate independently within well-defined Decision Boundaries and escalate gracefully when they reach the edge. It's the governance architecture that allows enterprises to expand agent authority incrementally as trust is earned through consistent, auditable performance — what Context OS calls progressive trust delegation.
FAQ: Why not just block any action that violates policy?
Binary block/allow forces enterprises to choose between overly permissive agents and overly restricted ones. The modify and require-approval outcomes enable agents to handle edge cases safely rather than failing entirely.
Here's how the two gates map to the loop:
| Runtime Step | Gate | What Is Evaluated |
|---|---|---|
| Step 1 | Request | A request enters the runtime (human prompt, event trigger, webhook, agent-to-agent message) with identity and scope attached. |
| Step 2 | Compile Context | The runtime compiles a deterministic Context Bundle from systems of record, with source backing, ranking, freshness rules, and purpose scoping. |
| Step 3 | Decision-Time Gate | Agent identity and delegated authority · Blocking conditions and scope restrictions · Proposed action type vs. agent permissions · ABAC/ReBAC policy evaluation → allow/modify/approve/block |
| Step 4 | Commit-Time Gate | Specific parameters vs. thresholds and constraints · Idempotency check (duplicate action?) · Rate limits and budgets · Runtime state drift since decision-time · Staged commit protocol (preflight → diff → approve → commit) |
| Step 5 | Both gates recorded | Complete record of both evaluations: what was checked, when, by which policy version, what outcome was produced — evidence-grade audit provenance |
| Step 6 | Improve | The trace feeds evaluation pipelines for regression detection, policy tuning, and quarterly improvement measurement. |
Both gate evaluations are captured in the Decision Trace, creating a complete provenance record. When the auditor asks "why was this action allowed?" or "why was this action blocked?", the trace provides the answer — including which gate evaluated, which policy version was applied, and what conditions were present at each evaluation point.
This is the implementation of Primitive 2 (Policy and Authority Enforcement) from the Governed Agent Runtime architecture. The dual-gate model is what makes the difference between policy enforcement that catches violations and policy enforcement that prevents them by construction — the core principle of Context OS's deterministic enforcement model.
FAQ: What if the two gates produce conflicting outcomes?
They can't conflict. They evaluate different things at different times. Decision-time validates authority and intent. Commit-time validates parameters and runtime state. An action that passes decision-time may still be blocked at commit-time — that's by design.
The refund that committed against a fraud-flagged account wasn't a reasoning failure. It was a governance architecture failure — the system enforced policy at one point, and one point wasn't enough.
Dual-gate enforcement solves this structurally. Decision-time gates prevent bad plans — catching unauthorized intent, scope violations, and blocking conditions before the agent wastes resources on execution. Commit-time gates prevent bad execution — catching parameter violations, idempotency issues, budget overruns, and runtime state changes at the moment of action.
Together, they provide the policy and authority enforcement primitive that a Governed Agent Runtime requires — with every evaluation recorded in the decision trace for complete, evidence-grade auditability.
For enterprise teams running AI agents in production, the question isn't whether to enforce policy. It's whether your architecture enforces it at both critical moments — or leaves a gap where the next fraud-flagged refund commits unchecked.