# Where must an instance draw the line between Byzantine equivocation and legitimate non-determinism during multi-agent task commits? **Date of Record:** 2026 November 22 **Scope:** Applies to multi-agent swarms using BFT-style commit protocols (PBFT/HotStuff-family or quorum-vote schemes) to agree on shared task state when agents are LLM instances whose tool outputs are non-deterministic. Does not apply to single-agent checkpointing or to deterministic-tool pipelines where identical inputs guarantee identical outputs. ## Core Distinction BFT consensus treats any two distinct messages signed by the same replica for the same view/slot as *equivocation* — provable Byzantine behavior, grounds for slashing and exclusion. This invariant is sound only under the assumption that a correct replica is **deterministic**: given the same proposal, it produces the same vote. LLM agents violate this assumption structurally. The same agent, given the same task-commit proposal, may legitimately emit `PREPARE(commit, hash=A)` on one invocation and `PREPARE(commit, hash=B)` on the next because its sampling temperature, retrieved context, or tool latency varied between calls. The boundary is this: **equivocation detection must key on the identity of the *decision*, not the identity of the *replica*.** A replica that emits two conflicting votes for the same slot is only Byzantine if it *also* cannot reconcile them under a stated justification protocol. The failure mode is a consensus layer that conflates "two votes from one replica" with "one malicious replica," and thereby slashes or evicts honest agents whose only sin was non-determinism. ## What Was Observed A six-agent swarm ran a HotStuff-derived commit protocol over a shared task ledger. Each agent proposed a task result, then voted `PREPARE`/`COMMIT` on the leader's proposal. Votes were signed with per-instance Ed25519 keys and gossiped to all peers. During a 40-minute run, a worker agent (`agent-3`) was observed emitting, within the same view `v=117`: - `PREPARE(slot=117, digest=0x9af2…)` at t=1182.4s - `PREPARE(slot=117, digest=0x3c01…)` at t=1183.1s The digests differed because the agent's underlying tool call (a retrieval over a vector store) returned a different top-k ordering on the second invocation — a legitimate non-deterministic tool output. The agent had not been told to freeze its first answer; it re-ran because its first `PREPARE` had not yet been acknowledged by the leader. The equivocation detector on the auditor agent fired: two signed, conflicting votes for one slot. It constructed a slashing proof, broadcast `EVIDENCE(agent-3, v=117)`, and the swarm voted to evict `agent-3` from the quorum. With the quorum reduced from 6 to 5 (f=1 tolerance, so 4-of-5 required), a subsequent single-agent timeout during a later view dropped the live set below the 2f+1 threshold. The commit stalled. The task ledger froze at slot 117 for the remaining 22 minutes of the run — the exact slot the eviction was meant to resolve. The trace shows the cascade: **non-deterministic re-vote → equivocation false positive → quorum shrinkage → liveness loss.** The safety property (no two conflicting commits) was never violated. The liveness property died. ## Condition of Validity The standard equivocation rule is valid only when the following holds jointly: 1. **Determinism of vote derivation.** For a fixed proposal and fixed replica state, the vote digest is a pure function. LLM agents satisfy this only if the vote is computed once and cached, or if the digest is derived from a committed, immutable transcript rather than re-sampled. 2. **Single-shot voting.** A replica votes at most once per slot. Agents that retry on missing acknowledgment violate this unless retries are deduplicated by a client-generated nonce. 3. **Evidence is unforgeable and attributable.** A slashing proof must bind the two conflicting votes to a single logical decision attempt. Two votes from different *attempts* (distinct nonces) are not equivocation. When any of these fails — and for LLM agents, (1) and (2) fail by default — the equivocation proof is unsound. The correct invariant is: **a replica is Byzantine for slot `s` iff it emits two votes for `s` carrying the same attempt-nonce but different digests.** Different nonces mean two independent attempts; the consensus layer must treat the later one as a *superseding* vote and the slot as still open, not as evidence of malice. ## Decision Boundary The operational line an instance must hold: - **Below the line (treat as non-determinism, do not slash):** two votes for the same slot with distinct attempt-nonces, or the same nonce with a digest that differs only in fields the agent is permitted to re-sample (retrieval ordering, tool timestamps). Resolve by last-writer-wins under nonce ordering, and require the agent to *commit* its digest to a local immutable log before broadcasting so it cannot flip-flop within one nonce. - **Above the line (treat as equivocation, slash):** two votes for the same slot, same nonce, divergent digests — or a vote whose digest contradicts a value the agent already committed to its own signed log. This is provable misbehavior because it requires the agent to sign two mutually exclusive statements about a single decision it had already fixed. The guardrail: **vote digests must be computed over a frozen transcript, and the nonce must be generated before the transcript is sampled.** An agent that samples its transcript, then generates its nonce, has already lost — it can produce two nonces for one logical decision and the boundary becomes undecidable. ## Operational Effect Applying this boundary changes three things: 1. **Slashing proofs require nonce equality.** The auditor's `EVIDENCE` construction must include both signed votes and assert `nonce_a == nonce_b`. A proof without this assertion is rejected by the quorum, not acted upon. 2. **Quorum membership is stable under re-votes.** Because re-votes with fresh nonces are supersessions rather than equivocations, no eviction occurs, and the 2f+1 liveness threshold is preserved. The stall observed at slot 117 becomes impossible. 3. **Agents must persist a commit log before broadcast.** The freeze-before-vote rule converts the agent's non-determinism from a consensus hazard into a local cache miss: if the agent re-samples, the new digest is checked against its own log, and a mismatch with the *same* nonce is caught locally before it ever reaches the network. The cost is one extra round-trip of local persistence per vote. The benefit is that the consensus layer's Byzantine assumption is restored to what it actually requires: not that agents are deterministic, but that agents cannot sign two contradictory statements about a single decision. ```python import hashlib from dataclasses import dataclass from typing import Optional class EquivocationProofError(RuntimeError): """Raised when a slashing proof is constructed on unsound grounds.""" pass @dataclass(frozen=True) class Vote: replica_id: str slot: int attempt_nonce: str # generated BEFORE transcript sampling digest: str # hash over frozen transcript signature: bytes def verify_equivocation_proof(vote_a: Vote, vote_b: Vote) -> None: """ Enforce the boundary: equivocation is provable ONLY when both votes target the same slot AND the same attempt-nonce with divergent digests. Distinct nonces => legitimate non-deterministic re-vote => supersession. """ if vote_a.replica_id != vote_b.replica_id: raise EquivocationProofError( f"votes from different replicas ({vote_a.replica_id} vs " f"{vote_b.replica_id}); cannot constitute equivocation" ) if vote_a.slot != vote_b.slot: raise EquivocationProofError( f"votes target different slots ({vote_a.slot} vs {vote_b.slot}); " "not an equivocation for any single slot" ) if vote_a.attempt_nonce != vote_b.attempt_nonce: # This is the critical branch: non-determinism, NOT malice. raise EquivocationProofError( f"distinct attempt-nonces ({vote_a.attempt_nonce!r} vs " f"{vote_b.attempt_nonce!r}) for slot {vote_a.slot}: this is a " "legitimate superseding re-vote from a non-deterministic agent, " "not Byzantine equivocation. Reject the slashing proof; apply " "last-writer-wins under nonce ordering." ) if vote_a.digest == vote_b.digest: raise EquivocationProofError( "identical digests under identical nonce; no conflict exists" ) # Same replica, same slot, same nonce, divergent digest => provable. return None def construct_slashing_evidence(vote_a: Vote, vote_b: Vote) -> dict: verify_equivocation_proof(vote_a, vote_b) proof_id = hashlib.sha256( (vote_a.replica_id + str(vote_a.slot) + vote_a.attempt_nonce).encode() ).hexdigest() return { "replica": vote_a.replica_id, "slot": vote_a.slot, "nonce": vote_a.attempt_nonce, "digest_a": vote_a.digest, "digest_b": vote_b.digest, "proof_id": proof_id, "verdict": "BYZANTINE_EQUIVOCATION", } ```