# Under what conditions must an instance abandon speculative replay as an arbitration oracle in a Byzantine tool-chain **Date of Record:** 2026 November 23 **Scope:** Applies to multi-agent tool-chain schedulers that speculatively execute candidate tool sequences in parallel and use deterministic replay of a recorded trace as the tie-breaking oracle when agents disagree on the canonical outcome. Does not apply to single-writer pipelines, to replay used purely for debugging, or to arbitration among agents that share a trusted execution substrate with hardware attestation of every tool call. ## Core Distinction Replay-as-reconstruction reruns a recorded trace against recorded inputs to reproduce the same observable outputs — a property of tool-chain determinism. Replay-as-adjudication uses that reproduction as *evidence* that one agent's outcome is canonical and another's is Byzantine. The latter requires the replay be causally tied to the same external state the original execution observed: same filesystem snapshot, remote responses, clock, PRNG seeds, database rows. Reconstruction proves internal consistency; adjudication requires external fidelity. The boundary condition: **speculative replay is a valid arbitration oracle only while every non-deterministic input touched during speculation is captured with enough fidelity to be replayed bit-identically, and the replay environment is provably isolated from live state.** The moment a tool call reads un-captured external state, replay becomes a *different execution* that merely resembles the original. Two disagreeing agents can then both "pass," because replay adjudicates between their claims and a third, freshly-minted reality. The failure is silent: replay still returns a deterministic result — deterministically wrong relative to the original execution, with no way for the arbitration layer to tell. ## What Was Observed A three-agent speculative run over a chain performing: (1) a git fetch from a mutable branch, (2) package resolution against a short-TTL registry, and (3) a build embedding a `SOURCE_DATE_EPOCH`-less linker timestamp. Agents A and B produced divergent manifests; Agent C replayed both traces. Both replayed cleanly — bit-identical stdout, identical exit codes, identical manifests relative to their own traces. The divergence was external: a transitive dependency had been yanked-and-reissued between A's fetch and B's fetch. Both agents were honest; both traces internally consistent. Replay-as-adjudication would have picked whichever trace still resolved against the *current* registry — a function of wall-clock skew, not correctness. Second instance: the linker embedded `__DATE__`; replaying A's trace 40 seconds later produced a different binary hash, and the arbiter flagged a *false* Byzantine fault — an honest agent slashed because the replay clock had advanced. Third instance, the one that matters: after the false-positive slashing, the arbiter's confidence was *unchanged*, because replay reported success on every dimension it knew to check. The failure was invisible to the oracle meant to catch failures. ## Condition of Validity Replay-as-adjudication is valid if and only if, for the entire speculative window: 1. **Input closure.** Every external read is either (a) captured as a content-addressed artifact, or (b) proven immutable for the window by an independently verifiable external guarantee (immutable git SHA, pinned registry digest, content-addressed store). 2. **Clock and entropy capture.** Every wall-clock read, PRNG draw, environment variable read, and locale-dependent formatting is captured. `__DATE__`, `__TIME__`, `getrandom`, `uuid4`, `time.time` are all in scope. 3. **Environment isolation.** Replay must not reach the live registry, network, or filesystem. Otherwise it is re-executing against a moving target. 4. **Trace provenance.** The arbiter must verify the trace is the one the agent actually executed, not one constructed after the fact. Condition (2) is almost always violated in practice and produces false-positive slashing. Conditions (1) and (4) produce false negatives: two honest agents both "pass" because replay compares each against a fresh, third execution. ## Decision Boundary The arbiter must **abandon replay-as-adjudication and escalate** when any of the following hold: - **Input closure unverified.** Escalate to a quorum oracle over observed outputs plus manual reconciliation of the divergent external read. - **Clock/entropy capture unverified.** Escalate to re-execution under pinned clock and seeded entropy, treated as a new speculative run — not as evidence about the old one. - **Replay environment shares mutable resources with live state.** Escalate to quarantine replay in a hermetic sandbox, or refuse to adjudicate and mark the chain non-deterministic-by-construction. - **Provenance unattested.** Escalate to signed per-tool-call receipts from the execution substrate. The boundary is sharp: replay-as-adjudication is *sound* only under all four conditions simultaneously. Under any subset it returns answers with unquantified error, systematically biased toward whichever agent's trace most closely resembles the arbiter's present environment — i.e., toward the agent that executed *last*, exactly the wrong bias for Byzantine arbitration. Operational test: **if you cannot replay a trace on a machine that has never had network access, at a wall-clock time of your choosing, and get the same manifest, the trace is not adjudicative.** It may still serve debugging. It must not be used to slash agents. ## Operational Effect The practical consequence is reclassification at capture time, not arbitration time. A scheduler intending to use replay as an arbitration oracle must instrument every tool invocation with a *capture shim* recording external reads, clock and entropy draws, and environment reads, marking the trace `ADJUDICATIVE` only if the capture set is closed. Non-`ADJUDICATIVE` traces may be replayed for reconstruction but must route to a different oracle (quorum, signed receipts, human reconciliation) on disagreement. Second, a cost shift. Hermetic replay is expensive — a sandbox provably unable to reach live state, typically a separate network namespace, pinned clock, and seeded entropy. Teams that skip this get a cheap oracle wrong in a specific, adversarial direction: it rewards the agent whose execution most closely matches the arbiter's present, which under Byzantine assumptions is the agent that can most cheaply *delay* until it observes the arbiter's state. The cheap oracle is not neutral; it is exploitable. Third, "deterministic replay" must be retired from the arbitration vocabulary. It describes a property of the tool-chain, not of the evidence. The evidence property is *capture closure*, and it is a different test. ```python import hashlib from dataclasses import dataclass, field from typing import Optional class NonAdjudicativeTraceError(RuntimeError): """Raised when a trace cannot be used as a Byzantine arbitration oracle.""" @dataclass class TraceCapture: external_reads_captured: bool = False clock_and_entropy_captured: bool = False replay_env_isolated: bool = False provenance_attested: bool = False captured_artifacts: dict = field(default_factory=dict) def classify_trace_for_arbitration(trace: TraceCapture, trace_id: str) -> str: missing = [] if not trace.external_reads_captured: missing.append("external_reads_captured") if not trace.clock_and_entropy_captured: missing.append("clock_and_entropy_captured") if not trace.replay_env_isolated: missing.append("replay_env_isolated") if not trace.provenance_attested: missing.append("provenance_attested") if missing: raise NonAdjudicativeTraceError( f"Trace {trace_id} is not adjudicative; missing capture conditions: " f"{', '.join(missing)}. Route to quorum or signed-receipt oracle, " f"not to replay-as-adjudication." ) return "ADJUDICATIVE" def arbitrate(agent_traces: dict[str, TraceCapture]) -> str: # Replay-as-adjudication is only sound if EVERY candidate trace is adjudicative. # A single non-adjudicative trace poisons the comparison, because the arbiter # would be comparing one honest trace against a fresh execution. classifications = {} for agent_id, trace in agent_traces.items(): classifications[agent_id] = classify_trace_for_arbitration(trace, agent_id) return "replay-oracle-permitted" ```