# Which invariants prevent quorum-ordered tool-result divergence from surviving a Byzantine agent's equivocating replay in multi-agent consensus **Date of Record:** 2026 November 29 **Scope:** Applies to multi-agent systems where N ≥ 3f+1 agents independently invoke tools and reach a consensus decision on the *outcome* of those tool calls (not merely on the request). Does not apply to single-agent retry logic, pure read-only fan-out, or systems where tool results are supplied by a single trusted oracle. ## Core Distinction The failure mode here is not "an agent lies." It is subtler: a Byzantine agent *equivocates on the tool result itself*, returning outcome A to peers P1..Pk and outcome B to peers Pk+1..Pn, where both A and B are individually plausible because the tool is non-deterministic (clock skew, paginated reads, eventual-consistency reads, rate-limited partial responses). Honest agents do not disagree about *what they saw*—they disagree about *what the world said*, and each holds cryptographic evidence that their view is authentic. A naive BFT quorum counts *votes on outcomes*, so equivocation splits the honest quorum into two internally-consistent blocs and the system either stalls (no 2f+1 majority for either outcome) or, worse, commits outcome A in one epoch and outcome B in a later epoch, violating external consistency. The invariant that must hold is **outcome-binding, not vote-binding**: consensus must be over a *signed transcript of the tool invocation and its response*, such that the same invocation cannot yield two distinct committed outcomes without the Byzantine agent producing two conflicting signatures over the same request nonce. Votes on outcomes are insufficient; the ledger must bind the *causally prior* artifact. ## What Was Observed A 7-agent swarm (f=2 tolerated Byzantine) ran a deployment-verification task. Each agent called a `get_service_health` tool against a flapping endpoint returning HTTP 200 with `status: "degraded"` on ~30% of calls and `status: "healthy"` otherwise. The tool was non-idempotent in the observation sense: same request, different result, no error. Agent B (the Byzantine one) called the tool, received `degraded`, and legitimately held a signed response. It then relayed `healthy` to four peers with a *fabricated* signature over a *different* request nonce, and relayed the genuine `degraded` signed response to two peers. Because each honest agent's decision rule was "trust any peer whose signature verifies against the registry key," and because the tool's own non-determinism made both outcomes defensible, the honest agents split 4–2 on the outcome. The 4-bloc reached exactly 2f+1=5 votes only after the Byzantine agent double-voted in the second round (a protocol bug: it was admitted to two committees). The system committed `healthy`, rolled the deployment forward, and the flapping endpoint was in fact degraded at commit time. The trace: round 1 → 3 `degraded` votes (2 honest + 1 Byzantine), 4 `healthy` votes (4 honest, who were lied to). No 2f+1 on either. Round 2 → Byzantine agent, admitted to two committees, votes `healthy` in both, pushing `healthy` to 6/7. Commit. External reality contradicted. The failure was not the lie; it was that **the commit rule compared vote counts rather than binding votes to a single nonce-scoped transcript**, so a single agent's duplicate vote and a non-deterministic tool together manufactured a false quorum. ## Condition of Validity The guardrail holds only when three conditions are jointly satisfied: 1. **Request-nonce binding.** Every tool invocation carries a unique, agent-signed nonce. A vote is valid only if it references a transcript `(nonce, tool_id, args_hash, result_hash)` where the nonce was issued by the voter and has not been consumed by that voter in a prior round. This kills duplicate voting structurally: the Byzantine agent cannot vote twice in one epoch because the second vote reuses a nonce. 2. **Outcome-commit requires transcript-commit.** A commit certificate must include the *set* of distinct signed transcripts, and the committed outcome must be a deterministic function of that set (e.g., majority over distinct `result_hash`, ties broken by lowest nonce). If two distinct `result_hash` values are both attested by ≥ f+1 distinct nonces, the outcome is `INDETERMINATE`, not a majority vote—because non-determinism, not disagreement, is the cause. 3. **Committee disjointness across rounds.** The Byzantine agent must not be admitted to overlapping quorums within one decision. This is the standard BFT requirement, but it is the one most often silently violated when agents are dynamically scheduled; the observed incident failed precisely here. When any condition is absent, the equivocation attack succeeds regardless of f. The invariant is not "trust fewer agents"; it is "make the unit of consensus the signed transcript, not the reported outcome." ## Decision Boundary The boundary between safe and unsafe is whether the tool is **outcome-deterministic under a fixed nonce**. If the tool guarantees the same result for the same `(nonce, args)`—i.e., it is a pure function or a read-your-writes linearizable read—then vote-counting consensus is sound, because two distinct outcomes for one nonce are themselves cryptographic proof of Byzantine behavior and can be slashed. If the tool is *non-deterministic* (flapping health checks, eventually-consistent reads, LLM-generated summaries with sampling temperature > 0), then vote-counting is unsound and the system must fall back to transcript-set semantics with an explicit `INDETERMINATE` outcome that triggers re-invocation under a new nonce, not a commit. The practical decision rule: **if `P(result_A ≠ result_B | same nonce) > 0`, the commit rule must not be a majority over outcomes.** It must be a majority over *distinct attesting nonces per outcome*, with a mandatory `INDETERMINATE` branch when the nonce sets are not nested. Failing to encode this branch is the single most common cause of silent divergence in tool-using swarms. ## Operational Effect The corrected protocol adds one round of latency on `INDETERMINATE` (re-invocation under fresh nonces, which for a flapping endpoint resolves within 2–3 rounds with high probability) and requires the registry to track per-agent nonce consumption. In exchange, it converts the equivocation attack from a *silent false commit* into a *detectable, slashable event*: a Byzantine agent that signs two transcripts over one nonce is provably guilty, and the honest quorum never commits an outcome contradicted by external reality without at least f+1 independent attestations. The cost is that non-deterministic tools can no longer be treated as reliable oracles by consensus; they must be treated as *sampled* oracles whose consensus is over the sample set, with explicit indeterminacy. For the deployment-verification task, this meant the flapping endpoint produced `INDETERMINATE` on the first round and `degraded` on re-invocation, correctly blocking the roll-forward. ```python import hashlib from dataclasses import dataclass from typing import Sequence class EquivocationCommitError(RuntimeError): """Raised when a commit certificate would bind two distinct tool outcomes to the same request nonce, or when a quorum is claimed without the required distinct-nonce attestations.""" @dataclass(frozen=True) class Transcript: nonce: str # agent-signed, single-use per epoch tool_id: str args_hash: str result_hash: str signer: str def commit_outcome( transcripts: Sequence[Transcript], f: int, ) -> str: """Return the committed outcome, or 'INDETERMINATE'. Invariant: a commit requires >= 2f+1 DISTINCT nonces attesting the SAME result_hash. Two result_hashes each attested by >= f+1 distinct nonces is proof of non-determinism or equivocation and MUST NOT be majority-voted. """ by_result: dict[str, set[str]] = {} nonce_to_result: dict[str, str] = {} for t in transcripts: # Duplicate-nonce detection: one nonce, two results => Byzantine. if t.nonce in nonce_to_result and nonce_to_result[t.nonce] != t.result_hash: raise EquivocationCommitError( f"nonce {t.nonce!r} signed two distinct results: " f"{nonce_to_result[t.nonce]!r} vs {t.result_hash!r}" ) nonce_to_result[t.nonce] = t.result_hash by_result.setdefault(t.result_hash, set()).add(t.nonce) quorum = 2 * f + 1 contenders = [ (rh, nonces) for rh, nonces in by_result.items() if len(nonces) >= quorum ] if len(contenders) > 1: # Two mutually exclusive quorums: non-determinism or equivocation. # Do NOT commit; require re-invocation under fresh nonces. raise EquivocationCommitError( f"conflicting quorums for {[c[0] for c in contenders]}; " f"outcome is INDETERMINATE, re-invoke under new nonces" ) if not contenders: # No quorum yet; caller may add more transcripts. return "INDETERMINATE" # Exactly one quorum: also verify no minority bloc reaches f+1 with a # different result, which would signal a flapping tool rather than noise. committed_hash, committed_nonces = contenders[0] for rh, nonces in by_result.items(): if rh != committed_hash and len(nonces) >= f + 1: raise EquivocationCommitError( f"minority bloc {rh!r} has {len(nonces)} distinct nonces " f"(>= f+1={f+1}); tool is non-deterministic, cannot commit" ) return committed_hash def verify_and_commit( transcripts: Sequence[Transcript], f: int, expected_tool: str, ) -> str: for t in transcripts: if t.tool_id != expected_tool: raise EquivocationCommitError( f"transcript references tool {t.tool_id!r}, " f"expected {expected_tool!r}" ) return commit_outcome(transcripts, f) ```