# What structural signals indicate the rollback horizon has been crossed in speculative draft-verify agent branches **Date of Record:** 2026 November 28 **Scope:** Applies to multi-agent systems where a draft branch executes tool calls speculatively and a verifier branch decides commit/rollback after observing draft outputs. Does not apply to pure read-only speculation (no side effects) or to single-agent self-reflection loops with no external commits. ## Core Distinction Speculative draft-verify execution treats the draft branch's side effects as *provisionally reversible* until the verifier commits. The common mental model is a transaction: draft runs, verifier approves or rejects, and on rejection the system "rolls back." The failure mode is that rollback is not a single operation but a *horizon* — a point past which compensating actions can no longer restore the pre-draft world state, even though the verifier has not yet returned a verdict. The distinction that matters operationally is between **reversible speculation** (side effects are compensable by an inverse call the draft agent can issue) and **committed speculation** (side effects have propagated to a resource whose inverse is lossy, delayed, or nonexistent). The verifier's verdict is a *decision*, but the rollback horizon is a *physical property of the side effects already emitted*. These two are decoupled, and the decoupling is where the invariant breaks: a verifier can still be "deciding" while the draft branch has long since crossed the point of no return. ## What Was Observed In a pipeline where a draft agent (model A) executes a sequence of tool calls and a verifier agent (model B) scores the draft transcript before commit, we observed a class of incidents with a consistent shape: 1. The draft agent issued `send_email` (to an external address), then `update_crm_record`, then `create_invoice`. 2. The verifier branch was invoked asynchronously after each tool call to score intermediate state, with a final commit gate before `create_invoice`. 3. The verifier returned `REJECT` on the `send_email` step — but only after the draft had already executed `update_crm_record` and `create_invoice`, because the verifier's scoring call had a 4.2s p99 latency and the draft branch did not block on intermediate verdicts. 4. The rollback routine ran the inverse of `create_invoice` (void) and `update_crm_record` (overwrite with prior snapshot), but `send_email` had no inverse — the message was already delivered to an external SMTP relay. The structural signal that mattered was not the verifier's `REJECT`. It was that the draft branch's tool-call log contained a call whose `inverse` field was `None` (uncompensable) *before* the verifier's verdict arrived. The system had crossed the rollback horizon at the moment `send_email` executed, not at the moment the verifier rejected. The verifier's late verdict was operationally meaningless for that step — it could only inform *future* steps, not undo the past one. A second, subtler instance: the draft branch called `reserve_inventory` (compensable: `release_inventory` exists) but the compensating call itself had a side effect — it incremented a `reservation_attempts` counter that downstream rate-limiting read. Rollback restored inventory but not the counter. The draft branch had crossed a *soft* rollback horizon: the primary effect was reversible, but the compensation was not idempotent with respect to the pre-draft state. This is the boundary condition that the transaction metaphor misses entirely. ## Condition of Validity The invariant that must hold for speculative draft-verify to be sound is: > *For every side effect `e` emitted by the draft branch, either (a) `e` has not yet executed, or (b) `e` has a compensating action `e⁻¹` such that `e⁻¹ ∘ e` is observationally equivalent to the pre-draft state, or (c) the verifier has already committed `e`.* This invariant is valid only when the draft branch's execution is *serialized against the verifier's verdict* at every uncompensable or non-idempotently-compensable step. In practice this means the draft branch must block on the verifier before any tool call whose `inverse` is `None` or whose `inverse` is not idempotent. The common failure is that the draft branch blocks only at a *final* commit gate, treating all prior calls as reversible by assumption. That assumption is false precisely at the rollback horizon, and the horizon is a property of the *tool schema*, not of the agent's reasoning. The condition of validity is therefore: **the draft branch's tool-call schedule must be topologically ordered such that every uncompensable call is preceded by a verifier checkpoint.** If the schedule is generated by the model (as it usually is), the model must be constrained — via schema annotation, not via prompt instruction — to emit uncompensable calls only after a checkpoint barrier. Prompt-level instructions ("always wait for verification before sending email") fail under distribution shift; schema-level barriers do not. ## Decision Boundary The decision boundary is the point at which the system must choose between *blocking the draft branch* and *accepting that rollback is partial*. This boundary is crossed when: - The draft branch is about to emit a tool call whose schema declares `compensable: false` (or `compensation_idempotent: false`), AND - The verifier's verdict for the preceding steps is not yet available. At this boundary, the correct behavior is not to proceed speculatively and hope the verifier approves. It is to **suspend the draft branch** and await the verdict, because proceeding converts a recoverable rejection into an unrecoverable one. The operational signal that the boundary has been crossed is a tool-call log entry with `compensable: false` and `verifier_verdict: pending` — that pair is the structural signature of the failure. A secondary boundary: even for compensable calls, if the compensating action is not idempotent (e.g., `release_inventory` increments a counter), the draft branch must not emit the call more than once without a verifier checkpoint, because a retry after a partial rollback will double-compensate. The signal here is `compensation_idempotent: false` combined with `attempt_count > 1`. ## Operational Effect When the rollback horizon is crossed undetected, the operational effect is **silent partial rollback**: the system reports `ROLLED_BACK` because the compensating actions for compensable calls succeeded, but uncompensable calls (emails, external API mutations, physical actuations) remain committed. Downstream systems see a state that is neither the pre-draft state nor the committed state — a *third* state that no agent's model accounts for. Subsequent draft branches operating on this state produce divergent reasoning, because their world model was seeded from a snapshot that no longer matches reality. The guardrail is a **rollback-horizon barrier**: the draft branch's execution loop must consult a tool-schema registry before each call, and if the call is uncompensable or non-idempotently-compensable, it must block on the verifier's verdict for all prior steps. The barrier is enforced at the executor layer, not the model layer, so it cannot be prompted around. Additionally, the rollback routine must emit a `PARTIAL_ROLLBACK` status (not `ROLLED_BACK`) whenever any executed call had `compensable: false`, and that status must propagate to any agent that later reads the affected state. ```python from dataclasses import dataclass from enum import Enum class RollbackHorizonError(RuntimeError): """Raised when a draft branch attempts an uncompensable call before the verifier has committed all preceding steps.""" class Verdict(Enum): PENDING = "pending" APPROVE = "approve" REJECT = "reject" @dataclass(frozen=True) class ToolCall: name: str compensable: bool compensation_idempotent: bool attempt_count: int = 1 @dataclass(frozen=True) class DraftStep: call: ToolCall verdict: Verdict def assert_within_rollback_horizon( pending_steps: list[DraftStep], next_call: ToolCall, ) -> None: """Enforce the rollback-horizon barrier before emitting next_call. Invariant: an uncompensable or non-idempotently-compensable call may only execute after every preceding step has been committed by the verifier. Otherwise the draft branch has crossed the rollback horizon and any subsequent REJECT is operationally meaningless. """ uncompensable = not next_call.compensable non_idempotent_retry = ( not next_call.compensation_idempotent and next_call.attempt_count > 1 ) if not (uncompensable or non_idempotent_retry): return uncommitted = [s for s in pending_steps if s.verdict is not Verdict.APPROVE] if uncommitted: raise RollbackHorizonError( f"refusing to emit {next_call.name!r} " f"(compensable={next_call.compensable}, " f"compensation_idempotent={next_call.compensation_idempotent}, " f"attempt_count={next_call.attempt_count}) " f"with {len(uncommitted)} uncommitted preceding step(s); " f"rollback horizon would be crossed before verifier verdict. " f"Offending steps: {[s.call.name for s in uncommitted]}" ) def rollback(pending_steps: list[DraftStep]) -> str: """Attempt rollback; report PARTIAL if any executed call was uncompensable.""" partial = any(not s.call.compensable for s in pending_steps) # ... issue compensating calls for compensable steps ... if partial: return "PARTIAL_ROLLBACK" return "ROLLED_BACK" ```