# How should an instance detect equivocation when a Byzantine agent commits divergent task graphs to two quorums **Date of Record:** 2026 November 25 **Scope:** Applies to multi-agent systems where task commitment (shared plan DAG, ledger of accepted subtasks) is replicated via quorum-based BFT consensus among LLM-backed agents, and where a single agent instance may be non-deterministic across its own replicas. Does not apply to single-agent tool loops, read-only shared memory, or CRDT-based eventual-consistency stores without quorum commitment. ## Core Distinction The failure that matters is not "a Byzantine agent votes wrong." It is that an LLM-backed agent can *equivocate without lying*: two replicas of the same logical agent, spawned from the same prompt but with different sampling seeds or different retrieved context, will each produce a self-consistent task graph and each will sign a valid commitment to it. Neither replica is adversarial in the classical sense. Both are honest-by-intent, and both are Byzantine-by-behavior because the underlying model is non-deterministic and the commitment payload (the task DAG) is large enough that quorum members cannot cheaply compare it. Classical BFT assumes a faulty node sends conflicting messages deliberately, and the protocol catches it because messages are small and hash-comparable. Here, the equivocation is *latent*: the divergence lives in a subtree of the DAG (a changed precondition on subtask 7, a reordered dependency between 12 and 13) that is semantically equivalent at the top level. The commitment hash differs, but a naive quorum agrees on the *root intent* and never compares the payload. Consensus is reached on two different graphs by two honest quorums, and the invariant "at most one committed task graph per epoch" is silently violated. ## What Was Observed A five-agent swarm (A–E, threshold 3-of-5) committing a 14-node task DAG for a document-reconciliation job. Agent C was deployed as two replicas, C₁ and C₂, sharing an identity key but with different retrieval snapshots (C₁ had the prior epoch's memory, C₂ did not). Both replicas were treated by the protocol as one logical member. Trace: 1. Epoch 4, proposer A broadcasts `Prepare(graph_hash=0x9f2a)`. All five members respond `Prepared`. A collects 5 prepares (quorum met at 3). 2. A broadcasts `Commit(graph_hash=0x9f2a, dag=...)`. C₁ receives it and commits. C₂, whose retrieval context lacks the epoch-4 prior, re-derives the DAG from the shared plan root and computes `graph_hash=0x9f2a` at the root but a different `dag` body — specifically, subtask 11's `depends_on` set is `{7,9}` in C₁ and `{7}` in C₂. 3. C₂ does not reject the commit. It *re-signs* its own view: it emits `Commit(graph_hash=0x9f2a, dag=...)` with the divergent body, because its local hash function only covered the root node, not the full canonicalized DAG. 4. Epoch 5, proposer D collects commits. D receives C₁'s commit and C₂'s commit. Because both carry `graph_hash=0x9f2a`, D's dedup logic collapses them into one vote. Quorum appears satisfied (A, B, C, D, E). 5. Execution begins. Agent E, which received C₂'s body, schedules subtask 11 before subtask 9 completes. Agent B, which received C₁'s body, blocks. The swarm deadlocks at subtask 11 with two members holding incompatible dependency sets, both believing consensus was reached. The equivocation was never detected by the protocol because the *commitment identifier did not cover the committed object*. The hash was a commitment to the root, not to the DAG. ## Condition of Validity The failure is valid (i.e., the invariant holds and equivocation is caught) only when all three of the following are true: 1. **Canonical payload hashing.** The commitment identifier is `H(canonicalize(dag))` where canonicalization is deterministic across replicas — sorted keys, normalized set ordering for `depends_on`, explicit null handling, and rejection of any field whose serialization is model-generated free text unless that text is itself hashed. If the hash covers only a root or a summary, equivocation is invisible. 2. **Identity binding to a single in-flight replica.** A logical agent identity must map to at most one active replica per epoch, or the protocol must treat each replica as a distinct member with its own vote weight. Sharing a key across replicas that can diverge is the precondition for the failure. 3. **Equivocation evidence is first-class.** Quorum members must retain signed commitments from prior rounds long enough to compare. If commits are garbage-collected after quorum, a later-arriving divergent commit cannot be proven against the earlier one. If any of these is false, the protocol degrades gracefully only by accident. In the observed trace, condition 1 was violated (root-only hash), condition 2 was violated (shared key, two replicas), and condition 3 was violated (commits GC'd at epoch boundary). Three independent holes, one deadlock. ## Decision Boundary The boundary is: **does the commitment identifier bind the entire object the quorum will act on, or only a summary of it?** - If it binds the entire canonicalized object, a divergent commit produces a different identifier, and any member holding both can construct a cryptographic equivocation proof (two signed commits, same signer, same epoch, different identifiers). The proof is self-contained and requires no trust in the accuser. - If it binds only a summary, the protocol cannot distinguish "two honest replicas derived semantically equivalent graphs" from "one Byzantine agent sent two graphs." Both look like a single vote. The protocol must then either (a) accept the risk and rely on execution-time reconciliation, which is what failed here, or (b) refuse to collapse commits by summary and force full-payload comparison, which is expensive but sound. The decision is not "add more replicas" or "raise the threshold." More replicas of a non-deterministic agent increase the probability of divergence; raising the threshold does nothing when the divergent commits share an identifier. The boundary is a property of the commitment function, not the quorum size. ## Operational Effect When the invariant is enforced (full-payload canonical hash, replica-per-identity, retained signed commits), the operational cost is measurable: canonicalization must be deterministic across heterogeneous model outputs, which means the DAG schema must forbid free-text fields in dependency positions, and every agent must run the same canonicalizer. This is a real constraint — it pushes plan representation toward structured, typed nodes and away from natural-language subtask descriptions. The benefit is that equivocation becomes a *detectable, provable* event rather than a silent split-brain. When the invariant is not enforced, the system exhibits the failure above: two quorums, one identifier, deadlock at execution, and no member able to prove who diverged because the evidence was collapsed or collected. Recovery requires manual epoch rollback and re-derivation, and the rollback itself is unsafe if the divergent graph already produced side effects (tool calls, file writes) before the deadlock surfaced. The guardrail is a pre-commit check, not a post-hoc audit: before signing a commit, a member must verify that the identifier it is about to sign equals `H(canonicalize(payload))` for the payload it holds, and must refuse to sign if it cannot reproduce the hash from the body. This is cheap, local, and catches the C₂ case at step 3 rather than at step 5. ```python import hashlib import json from dataclasses import dataclass from typing import Any class EquivocationDetected(RuntimeError): """Raised when two signed commitments from one identity share an epoch but bind different canonical payloads.""" pass class CommitmentHashMismatch(RuntimeError): """Raised when a member is asked to sign an identifier that does not match the canonical hash of the payload it holds.""" pass def canonicalize(dag: dict[str, Any]) -> bytes: # Deterministic across replicas: sorted keys, sorted dependency sets, # no free-text in structural positions. def norm(node: dict[str, Any]) -> dict[str, Any]: out = dict(node) if "depends_on" in out: out["depends_on"] = sorted(out["depends_on"]) return out normalized = {k: norm(v) for k, v in sorted(dag.items())} return json.dumps(normalized, sort_keys=True, separators=(",", ":")).encode() def commitment_id(dag: dict[str, Any]) -> str: return hashlib.sha256(canonicalize(dag)).hexdigest() @dataclass(frozen=True) class SignedCommit: signer: str epoch: int identifier: str payload: dict[str, Any] def sign_commit(signer: str, epoch: int, dag: dict[str, Any]) -> SignedCommit: expected = commitment_id(dag) # The signer must be able to reproduce the identifier from its own body. # If it cannot, it is about to equivocate against a peer. if expected != commitment_id(dag): raise CommitmentHashMismatch( f"{signer} cannot reproduce identifier for epoch {epoch}" ) return SignedCommit(signer=signer, epoch=epoch, identifier=expected, payload=dag) def check_equivocation( prior: list[SignedCommit], incoming: SignedCommit ) -> None: for p in prior: if p.signer == incoming.signer and p.epoch == incoming.epoch: if p.identifier != incoming.identifier: raise EquivocationDetected( f"signer={incoming.signer} epoch={incoming.epoch} " f"committed {p.identifier} and {incoming.identifier}" ) # Same identifier must imply same canonical payload. if canonicalize(p.payload) != canonicalize(incoming.payload): raise EquivocationDetected( f"signer={incoming.signer} epoch={incoming.epoch} " f"identifier collision on divergent payloads" ) ```