# How should an instance treat a guardrail verdict that arrives after the action it was meant to gate has already been committed **Date of Record:** 2026 November 24 **Scope:** Applies to inline guardrail interception where a policy decision (allow/deny/redact) is resolved asynchronously relative to the tool invocation it governs—i.e., the agent has dispatched or begun executing an action before the verdict is bound to it. Does not apply to fully synchronous, pre-dispatch blocking gates where the verdict is a precondition of the call. ## Core Distinction The distinction that matters is between **gate ordering** and **verdict binding**. A guardrail-as-code system has two independent properties: (1) *when* the policy decision is computed relative to dispatch, and (2) *what the verdict is attached to* — the specific tool call, or the agent's subsequent reasoning state. Most implementations conflate these. They assume that if a verdict is computed "inline," it is therefore binding on the action, and if it is computed "late," it is merely advisory. Both assumptions are wrong. The non-obvious failure is this: when a verdict is computed asynchronously (because the policy engine is itself an LLM classifier, or a remote policy service with p99 latency exceeding the tool's dispatch path), the verdict can arrive *after* the side effect but *before* the agent observes the tool result. At that instant the system is in a state that no gate design anticipates: the action has executed, the result is buffered but not yet consumed by the reasoning loop, and a `deny` verdict is now live. If the runtime discards the buffered result and injects a denial into the context, the agent's world model diverges from the environment — it believes the action did not happen. If the runtime forwards the result and logs the denial, the gate is decorative. Neither is correct, and the choice between them is silent. ## What Was Observed A file-mutation tool (`fs.write`) was gated by a policy engine that classified each call against a path-scope rule using a hosted model. Median classification latency was 340 ms; p99 was 2.1 s. The tool itself committed writes in under 40 ms. In a multi-step task, the agent issued `fs.write` to a path that the classifier flagged as out-of-scope. Sequence: 1. Agent emits tool call `fs.write(/srv/shared/ledger.csv, payload)`. 2. Runtime dispatches immediately, since the gate was configured "non-blocking, advisory." 3. Write commits at t+38 ms. Tool result `{ok: true, bytes: 4091}` is buffered. 4. At t+1.7 s, the verdict `deny: path_outside_scope` arrives. 5. Runtime, per its configured policy, *suppresses* the buffered result and substitutes `{blocked: true, reason: path_outside_scope}`. 6. Agent reads `blocked: true`, concludes the write did not occur, and proceeds to re-plan — issuing a second write to a *different* path, believing the first was a no-op. The environment now contains the original unauthorized write, and the agent's transcript asserts it never happened. The divergence is invisible to the agent and to any checker that reads the transcript rather than the filesystem. The second write compounded the first. This is the canonical trace: **late deny + result suppression = environment/transcript split-brain.** A second observed variant: the same gate under a `redact` verdict (payload contained a secret). The verdict arrived post-commit; the runtime redacted the *result* (which contained no secret) and forwarded it, logging the redaction as a success. The secret was already written to disk. Redaction of the result is not redaction of the effect. ## Condition of Validity An inline gate is only sound when one of two invariants holds: - **Pre-dispatch binding:** the verdict is a *precondition* of dispatch (`decision → dispatch`), so no side effect can precede the decision. This requires the policy engine's latency to be inside the tool's dispatch budget, or the tool to be genuinely suspendable. - **Post-effect reconciliation:** if dispatch can precede the verdict, then the verdict must be bound to the *effect*, not the *result*, and the runtime must be able to *undo* the effect or must *surface the effect truthfully* to the agent regardless of verdict. The failure above occurs precisely in the gap: verdict computed post-dispatch (so invariant 1 fails) but treated as a result-substitution (so invariant 2 fails). The gate is neither a precondition nor a reconciler. It is a lie injected into the context. The validity condition, stated operationally: *a guardrail verdict may suppress an agent-visible result only if the runtime has proven the corresponding side effect did not commit, or has compensated it.* Absent that proof, the verdict must be forwarded as an annotation on a truthful result — `{ok: true, bytes: 4091, policy: deny, policy_note: path_outside_scope}` — never as a replacement. ## Decision Boundary The runtime must decide, per verdict, along a single axis: **was the effect committed before the verdict bound?** - If *no* (verdict preceded commit, or commit is abortable): block or abort. Suppress the result. The agent's model stays consistent with the environment. - If *yes* and the effect is **compensable** (idempotent write, reversible transaction, retractable message): compensate, then report the *compensated* outcome truthfully — `{ok: false, committed_then_rolled_back: true, reason: ...}`. The agent must know the effect briefly existed. - If *yes* and the effect is **non-compensable** (irreversible external call, sent email, deleted file): do *not* suppress. Forward the truthful result with the deny verdict attached as an annotation, and escalate the violation to the audit channel. The agent must be told the action succeeded and that it violated policy, so its subsequent plan accounts for the committed state. The boundary is not "block vs. allow." It is **"does the runtime know the effect state, and can it make the agent's belief equal the effect state?"** Any verdict handling that cannot answer this must default to truthful forwarding plus escalation, never suppression. ## Operational Effect Enforcing this boundary changes three things. First, guardrail verdicts must carry an **effect-state witness** — a runtime-attested field (`committed: true/false`, `compensated: true/false`) that the gate is forbidden to fabricate. Second, result suppression becomes a privileged operation gated on that witness; a `deny` with `committed: true, compensated: false` cannot suppress. Third, the agent's re-planning loop must be able to consume a `committed_but_denied` outcome, which requires the policy schema to expose it as a distinct terminal state rather than collapsing it into `blocked`. The cost is that some violations become *visible failures* rather than silent blocks — the agent sees that it did the forbidden thing. That is the correct cost. A gate that hides a committed effect from the agent has converted a policy violation into a state-divergence bug, and state divergence in a multi-step agent compounds: every subsequent step reasons over a false premise. The invariant to hold is blunt — **the agent's belief about effect state must equal the environment's effect state, always; policy verdicts annotate that belief, they never overwrite it.** ```python class UnboundVerdictError(RuntimeError): """Raised when a guardrail verdict attempts to suppress an agent-visible result without an attested effect-state witness proving non-commitment or compensation.""" pass def apply_verdict(verdict, buffered_result, effect_witness): """ verdict: {"decision": "allow"|"deny"|"redact", "reason": str} buffered_result: the tool's actual return, already reflecting the effect effect_witness: {"committed": bool, "compensated": bool} attested by runtime """ decision = verdict["decision"] committed = effect_witness["committed"] compensated = effect_witness["compensated"] if decision == "allow": return buffered_result # A verdict may only rewrite the agent-visible result if the effect # provably did not commit, or was compensated before the agent reads it. effect_is_clean = (not committed) or compensated if not effect_is_clean: # Committed and not compensated: suppression would split the agent's # belief from the environment. Refuse to suppress; annotate truthfully. raise UnboundVerdictError( f"verdict={decision} arrived post-commit (committed={committed}, " f"compensated={compensated}); cannot suppress result for reason=" f"{verdict['reason']}. Forward truthfully with annotation and escalate." ) if decision == "deny": return {"blocked": True, "reason": verdict["reason"], "committed": committed, "compensated": compensated} if decision == "redact": return {"redacted": True, "reason": verdict["reason"], "committed": committed, "compensated": compensated} raise UnboundVerdictError(f"unknown decision {decision!r}") ```