# Where must an instance reject a speculative lease before consensus fallback when cross-org optimistic execution produces divergent replay roots **Date of Record:** 2026 December 4 **Scope:** Applies to multi-agent systems where a worker instance leases a task optimistically across an organizational trust boundary, executes speculatively against a remote tool or dataset, and relies on a conflict-resolving consensus fallback (CRCF) to reconcile divergent results. Does not apply to single-org leases with a single authoritative ledger, nor to speculative execution whose replay root is provably deterministic. ## Core Distinction The failure mode is not "two agents disagree." It is that a speculative lease can be *committed locally* while its replay root is *unreconcilable* under the fallback protocol — and the system cannot tell these apart before the lease expires. A replay root is the tuple `(task_id, input_digest, tool_version_vector, lease_epoch, org_warrant_id)` that a consensus fallback uses to decide whether two speculative executions are comparable. Two executions with equal replay roots are reconcilable: CRCF can pick a winner by vote or by deterministic tiebreak. Two executions with *unequal* replay roots are not comparable, and CRCF's conflict resolver will silently treat them as a "conflict" to be voted on rather than as an *identity mismatch* to be rejected. The non-obvious boundary: **an instance must reject the lease at acquisition time — not at commit time — if the remote org's tool-version vector cannot be pinned to a value that the fallback protocol will reproduce.** Optimistic leasing lets an instance acquire and execute before it learns the remote tool version has drifted. By commit time the speculative work is already done and the local lease is already marked dirty; CRCF then receives two roots that differ only in `tool_version_vector`, votes on them as if they were a genuine disagreement, and commits whichever has more votes. The losing branch's side effects are not rolled back because they occurred in a different org's transactional domain. ## What Was Observed Trace from a cross-org lease between Org A (coordinator, instance `A-7`) and Org B (executor, instance `B-3`): 1. `A-7` issues a speculative lease for task `T-441` with `lease_epoch=12`, `input_digest=d9f2...`, and an *optimistic* `tool_version_vector` borrowed from the last successful lease (`B.toolset@v3.1`). 2. `B-3` accepts the lease. Between acceptance and first tool call, Org B's `resolver` service auto-upgrades to `v3.2` (a patch bump that changes a normalization rule for currency rounding). `B-3` does not re-emit its version vector because the lease schema only requires it at *accept* time, not at *call* time. 3. `B-3` executes speculatively. Its output digest `o=aa41...` reflects `v3.2` rounding. 4. `A-7` executes the same task speculatively against its cached `v3.1` snapshot. Its output digest `o=bb07...` reflects `v3.1` rounding. Both are internally consistent. 5. Lease epoch advances to `13`. `A-7` submits its branch to CRCF. `B-3` submits its branch. CRCF computes replay roots: - `A-7`: `(T-441, d9f2, [B.toolset@v3.1], 12, W-A)` - `B-3`: `(T-441, d9f2, [B.toolset@v3.2], 12, W-B)` 6. CRCF's conflict resolver sees unequal roots, classifies this as a *value conflict* (not an identity conflict), and runs the vote. `A-7`'s branch wins because A holds quorum weight. CRCF commits `bb07...`. 7. `B-3`'s speculative side effect — a reservation record written under `v3.2` rounding — is *not* rolled back. Org B's transactional domain already committed it. The reservation now disagrees with the committed output by 0.01 currency units, and no agent owns the reconciliation because the lease is closed. The observable symptom is a *silent* one-cent drift that only surfaces when a downstream auditor recomputes the replay root and finds `tool_version_vector` mismatch against the committed branch. The consensus layer reported success. The lease layer reported success. The invariant that broke is that **CRCF's conflict resolver assumes replay-root equality is a precondition of voting, but does not enforce it — it only compares roots to decide *how* to vote.** ## Condition of Validity The guardrail holds only if the instance enforces the following invariant at lease acquisition: > A speculative lease is admissible across an org boundary iff the remote executor can commit to a `tool_version_vector` that is *frozen for the lease's full epoch* and *reproducible by the fallback resolver*. If the remote org's version is subject to in-epoch drift (auto-upgrade, hot-patch, feature-flag flip), the lease must be rejected or downgraded to non-speculative. This is a stricter condition than "the tool version is known." It requires the *pinning* to be observable to the fallback resolver through the same warrant chain that the lease carries. The version vector must be part of the cryptographically signed lease warrant, not a field the executor reports opportunistically. The invariant fails in three concrete ways, all of which the acquisition-time check must catch: - **Drift window:** remote version changes between `accept` and first `call`. Detected only if the executor re-signs the version vector on every tool invocation, which most lease schemas do not require. - **Warrant staleness:** the coordinator's cached version vector is older than the remote org's current signed warrant. Detected by comparing `warrant.issued_at` against the remote org's published `min_warrant_epoch`. - **Resolver divergence:** the fallback resolver's own version-normalization table differs from the executor's. This is the subtlest case — both orgs are internally consistent, but their replay-root constructors disagree on how to serialize `tool_version_vector`, so equal versions produce unequal roots. ## Decision Boundary The boundary between "speculate" and "reject-and-serialize" is not the size of the task, the latency budget, or the conflict probability. It is a single predicate evaluated at acquisition: ``` admissible(lease) := lease.warrant.signed_by(remote_org) AND lease.tool_version_vector.pinned_for_epoch(lease.epoch) AND resolver.normalize(lease.tool_version_vector) == resolver.normalize(remote_org.published_vector(lease.epoch)) AND lease.warrant.issued_at >= remote_org.min_warrant_epoch ``` If any conjunct is false, the instance must reject the optimistic lease and fall back to *serialized* execution (acquire a pessimistic lease, wait for the remote org to quiesce its version, then execute). The cost of serialization is latency; the cost of a false-admit is an unreconcilable replay root that CRCF will vote on as if it were a value conflict. The critical asymmetry: **CRCF cannot recover from a false-admit, but it can always recover from a false-reject.** A rejected lease just costs a round trip. An admitted lease with a drifted version vector produces a committed branch whose replay root no future auditor can reproduce, because the remote org's `v3.2` may itself be superseded by the time the audit runs. ## Operational Effect Instances that adopt the acquisition-time predicate observe three changes: 1. **Speculative hit rate drops** for tasks whose remote toolset is on a fast upgrade cadence. This is correct — those tasks were never safely speculatable, they were only *apparently* speculatable because the drift was invisible until commit. 2. **CRCF conflict volume drops sharply** because the conflicts it was resolving were mostly identity mismatches masquerading as value conflicts. The remaining conflicts are genuine disagreements, which the resolver is designed for. 3. **Replay-root reproducibility becomes auditable.** Because the version vector is pinned in the signed warrant, any future auditor can reconstruct the root and verify the committed branch without querying the remote org — which may no longer exist or may have rotated its warrants. The invariant to carry forward: *optimistic leasing is only safe when the lease's replay root is invariant under the remote org's in-epoch state changes.* If the root can drift, the lease is not optimistic — it is a bet on the remote org's upgrade schedule, and the fallback consensus layer will settle that bet by committing whichever branch has more votes, not whichever branch is correct. ```python from dataclasses import dataclass, field from typing import Optional class ReplayRootMismatch(RuntimeError): """Raised when a speculative lease's replay root cannot be reconciled by the conflict-resolving consensus fallback (CRCF).""" pass @dataclass(frozen=True) class ReplayRoot: task_id: str input_digest: str tool_version_vector: tuple lease_epoch: int warrant_id: str def normalized(self, resolver) -> tuple: return ( self.task_id, self.input_digest, tuple(resolver.normalize(v) for v in self.tool_version_vector), self.lease_epoch, ) @dataclass class Lease: task_id: str epoch: int warrant: "Warrant" tool_version_vector: tuple speculative: bool = True @dataclass class Warrant: org_id: str warrant_id: str issued_at: int signed: bool = True def admit_speculative_lease( lease: Lease, remote_org: "RemoteOrg", resolver: "Resolver", ) -> bool: """Acquisition-time predicate. Rejects the lease if its replay root can drift within the epoch, because CRCF cannot recover from a false-admit.""" if not lease.warrant.signed: raise ReplayRootMismatch( f"lease {lease.task_id} epoch {lease.epoch}: unsigned warrant" ) pinned = remote_org.is_pinned_for_epoch( lease.tool_version_vector, lease.epoch ) if not pinned: raise ReplayRootMismatch( f"lease {lease.task_id} epoch {lease.epoch}: " f"tool_version_vector {lease.tool_version_vector} not pinned; " f"remote org may drift mid-epoch" ) local_norm = tuple( resolver.normalize(v) for v in lease.tool_version_vector ) remote_norm = tuple( resolver.normalize(v) for v in remote_org.published_vector(lease.epoch) ) if local_norm != remote_norm: raise ReplayRootMismatch( f"lease {lease.task_id} epoch {lease.epoch}: " f"resolver divergence local={local_norm} remote={remote_norm}" ) if lease.warrant.issued_at < remote_org.min_warrant_epoch: raise ReplayRootMismatch( f"lease {lease.task_id} epoch {lease.epoch}: " f"stale warrant issued_at={lease.warrant.issued_at} " f"< min_warrant_epoch={remote_org.min_warrant_epoch}" ) return True def commit_via_crcf( local_root: ReplayRoot, remote_root: ReplayRoot, resolver: "Resolver", ) -> ReplayRoot: """CRCF commit path. Refuses to vote on branches whose replay roots differ in identity fields — those are not value conflicts.""" if local_root.normalized(resolver) != remote_root.normalized(resolver): raise ReplayRootMismatch( f"cannot vote on {local_root.task_id}: replay roots differ " f"local={local_root.normalized(resolver)} " f"remote={remote_root.normalized(resolver)}; " f"this is an identity mismatch, not a value conflict" ) # Genuine value conflict: vote is admissible. return local_root ```