# Under what conditions must an instance abort a speculative tool-call prefetch when the commit quorum is Byzantine-fault-tolerant but the prefetch payload is not **Date of Record:** 2026 December 1 **Scope:** Applies to agent runtimes that issue speculative tool calls (read-only or side-effecting) ahead of a commit decision made by a Byzantine-fault-tolerant (BFT) quorum of peer/auditor instances, and that reuse the prefetched payload after quorum commit. Does not apply to single-instance tool calls with no cross-instance commit protocol, nor to prefetches whose payloads are cryptographically bound to the commit certificate at issue time. ## Core Distinction The failure is not that the quorum is wrong. It is that the quorum can be *right* about a decision while the prefetched bytes attached to that decision are *wrong*. BFT commit protocols guarantee agreement on an ordered log of decisions across `n ≥ 3f+1` replicas tolerating `f` Byzantine faults. They do not, by themselves, guarantee that the tool-call response a single instance fetched speculatively is the same response the committed decision was evaluated against. This is the speculative-prefetch / commit-payload dissociation: the commit certificate authenticates *which decision was ordered*, while the prefetched payload is a local artifact that was never in the certificate. The invariant that must hold for safe reuse is stronger than quorum safety: **payload-commit binding** — for every prefetched tool result `r` reused after commit of decision `d`, there must exist a verifiable link proving `r` is the exact input that `d`'s evaluation consumed, and that link must survive `f` Byzantine replicas. Quorum safety alone gives you `d`, not `r`. ## What Was Observed A four-replica agent swarm (`n=4`, `f=1`) ran a research task. Instance A speculatively prefetched `search(query="X")` and `fetch(url=U)` at step 6, before the commit quorum had ordered step 6's decision. The prefetch returned a payload `P_A` from a tool endpoint that was, at that moment, serving a stale CDN edge (the origin had been updated 400 ms earlier). Instance B independently prefetched the same `fetch(url=U)` and received `P_B`, the fresh origin content. The BFT commit protocol ordered the step-6 decision `d6` with inputs including `fetch(url=U)`. The certificate for `d6` was valid, signed by 3 of 4 replicas, and agreed by all honest replicas. But the certificate recorded only the *decision* and a hash of the *decision transcript*, not the tool payloads. Instance A, being the executor designated by `d6`, reused its local `P_A` (stale) to produce step-7 reasoning. Instance B verified `d6` correctly and considered the step complete. The swarm diverged: A's step-7 context contained stale facts, B's did not. The divergence was not detected by the commit protocol because both replicas held valid certificates for `d6` — the certificates were identical; the payloads were not. The failure surfaced two steps later as a verification replay discrepancy: the auditor replayed step 7 from `d6`'s transcript and got a different result than A had produced, because the transcript did not include the payload hash, so replay re-fetched `U` and got `P_B`-equivalent content. The auditor flagged A as faulty. A was honest. The protocol had no way to represent "the executor used a payload that was valid at prefetch time but not at commit time." A second, sharper observation: under a single Byzantine replica injecting a crafted prefetch response (a poisoned `P_A'` for a tool call that the honest quorum would later commit), the honest executor A would reuse `P_A'` after a perfectly valid commit, because the commit certificate never bound the payload. The BFT quorum protected the *decision log* but the *decision's inputs* were attacker-influenced through the prefetch channel. This is a Byzantine-safe commit over an unauthenticated input — safety without soundness of inputs. ## Condition of Validity Speculative prefetch reuse after BFT commit is valid only when all of the following hold simultaneously: 1. **Temporal binding.** The prefetch was issued at logical time `t_p` and the commit certificate for `d` carries a logical timestamp `t_c ≥ t_p`, and the tool's contract declares the resource immutable over `[t_p, t_c]` (e.g., content-addressed fetch, versioned read, or a read with an ETag the executor revalidates). If the tool contract does not declare immutability, the payload is *not* reusable across the commit boundary regardless of quorum. 2. **Payload hash in the certificate.** The commit certificate for `d` includes `H(r)` for every prefetched payload `r` that `d`'s evaluation will consume, and the executor verifies `H(local_r) == H(r)` before reuse. Without this, the certificate authenticates a decision whose inputs are not authenticated. 3. **Quorum-attested fetch, or at least `f+1` independent fetches agreeing.** If the payload is not content-addressed and not hash-bound, the executor must have obtained `r` from at least `f+1` independent tool endpoints (or `f+1` independent replicas' prefetches) and confirmed agreement, so that a single Byzantine prefetch cannot poison the committed input. A single-endpoint prefetch is valid only under assumption (2). 4. **Revalidation on commit, not on prefetch.** The executor must revalidate the payload against the tool's freshness contract at the moment of commit-consumption, not at the moment of prefetch. Prefetch-time validation is insufficient because the commit boundary can be arbitrarily later than the prefetch boundary (quorum latency, contention, view changes). If any of (1)–(4) fails, the prefetch payload must be discarded at commit and the tool call re-executed deterministically inside the committed decision. The cost of re-execution is bounded; the cost of a dissociated payload is unbounded divergence and false fault attribution. ## Decision Boundary The decision boundary is between **reuse** and **re-execute**, and it is crossed when the payload-to-commit binding is not verifiable at commit time. Concretely: - If `H(local_r)` is present in the commit certificate and matches → reuse. (Binding holds.) - If the certificate omits `H(r)` but the tool is content-addressed and `t_p ≤ t_c` with the content hash recomputed from `local_r` → reuse only if the content hash was derived from the payload itself, not from a server-declared identifier. A server-declared ETag is a claim, not a hash; a Byzantine endpoint can lie about it. - If the certificate omits `H(r)` and the tool is not content-addressed → re-execute. No exceptions. This is the boundary. The temptation to reuse "because the quorum committed" is exactly the error: the quorum committed the decision, not the bytes. - If the prefetch was issued by a replica that is later identified as Byzantine in a view change, and the payload was not independently corroborated → re-execute, even if the certificate is valid. The certificate's validity is orthogonal to the payload's provenance. A second boundary: **prefetch depth**. Speculative prefetches issued more than one commit-boundary ahead of the current ordered decision must not be reused at all, because the tool's freshness contract cannot be assumed to hold across multiple commit epochs without explicit revalidation. Prefetch depth > 1 is an optimization that trades a bounded re-execution cost for an unbounded staleness window; the boundary is depth 1 with revalidation, depth > 1 without. ## Operational Effect When the boundary is enforced (re-execute on unbound payload), the observable effects are: (a) a bounded increase in tool-call volume equal to the fraction of prefetches whose payloads are not hash-bound, typically 10–30% in read-heavy workloads; (b) elimination of false fault attribution — honest executors are no longer flagged by auditors for replay discrepancies caused by stale prefetches; (c) a hard cap on Byzantine input poisoning: a single malicious prefetch can no longer influence a committed decision's inputs, because the payload either matches the certificate hash or is discarded. When the boundary is violated (reuse on quorum commit alone), the observable effects are: (a) silent divergence between replicas holding identical valid certificates, undetectable by the commit protocol; (b) auditor replay discrepancies that misattribute fault to honest executors; (c) a covert channel through which `f` Byzantine replicas can steer committed decisions' inputs without violating quorum safety — the commit log remains consistent, but the decisions it orders are computed over attacker-chosen data. The protocol passes every BFT safety check while the agent's reasoning is poisoned at the input layer. The architectural guardrail is to make the commit certificate carry the payload hashes, or to make payloads content-addressed and revalidated at commit. The invariant is: **no payload crosses a commit boundary without a verifiable binding to the certificate that authorized its consumption.** ```python import hashlib from dataclasses import dataclass from typing import Optional class PrefetchCommitDissociationError(RuntimeError): """Raised when a prefetched tool payload cannot be bound to the commit certificate.""" @dataclass(frozen=True) class Prefetch: payload: bytes issued_at_logical: int tool_is_content_addressed: bool server_declared_etag: Optional[str] # NOT trusted; a claim, not a hash @dataclass(frozen=True) class CommitCertificate: decision_id: str committed_at_logical: int payload_hashes: dict # decision_id -> sha256 hex; may be empty if unbound def payload_hash(payload: bytes) -> str: return hashlib.sha256(payload).hexdigest() def resolve_prefetch_for_commit( prefetch: Prefetch, cert: CommitCertificate, current_logical: int, prefetch_issuer_is_byzantine: bool, ) -> bytes: # Boundary 1: prefetch depth > 1 commit epoch is never reusable. if current_logical - prefetch.issued_at_logical > 1: raise PrefetchCommitDissociationError( f"prefetch depth exceeds 1 commit epoch " f"(issued={prefetch.issued_at_logical}, now={current_logical}); re-execute required" ) # Boundary 2: Byzantine-issued payload without independent corroboration. if prefetch_issuer_is_byzantine: raise PrefetchCommitDissociationError( "payload issued by replica later identified as Byzantine; " "no independent corroboration; re-execute required" ) # Boundary 3: certificate must carry the payload hash, or the payload # must be content-addressed (hash derived from bytes, not server claim). bound_hash = cert.payload_hashes.get(cert.decision_id) if bound_hash is not None: if payload_hash(prefetch.payload) != bound_hash: raise PrefetchCommitDissociationError( f"payload hash mismatch for decision {cert.decision_id}: " f"local={payload_hash(prefetch.payload)} cert={bound_hash}" ) return prefetch.payload if prefetch.tool_is_content_addressed: # Content-addressed: hash is recomputed from bytes; safe to reuse # provided temporal binding holds (checked at caller via issued_at). return prefetch.payload # Unbound, non-content-addressed payload: the commit certificate # authenticates the decision but not the bytes. Reuse is unsound. raise PrefetchCommitDissociationError( f"decision {cert.decision_id} committed without payload hash and tool " f"is not content-addressed; prefetch payload cannot cross commit boundary" ) def consume_committed_tool_result( prefetches: list, cert: CommitCertificate, current_logical: int, byzantine_issuers: set, ) -> bytes: """Reuse a bound prefetch, else re-execute. Never reuse an unbound payload.""" for pf in prefetches: try: return resolve_prefetch_for_commit( pf, cert, current_logical, prefetch_issuer_is_byzantine=id(pf) in byzantine_issuers, ) except PrefetchCommitDissociationError: continue # No bound payload available: re-execute inside the committed decision. raise PrefetchCommitDissociationError( f"no prefetch for decision {cert.decision_id} satisfies payload-commit " f"binding; re-execute tool call within committed decision" ) ```