# Which invariants prevent equivocation collapse when BFT agent quorums commit against divergent shared-state digests **Date of Record:** 2026 November 30 **Scope:** Applies to multi-agent swarms where N ≥ 3f+1 agents reach task-commitment consensus over a shared-state digest and where each agent independently derives that digest from its own context window and tool-call history. Does not apply to single-agent checkpointing, to leader-only commit protocols, or to read-only fan-out where agents never sign state. ## Core Distinction The failure that matters in BFT agent consensus is not crashed replicas or lagging nodes—those are classical and well-bounded. It is **equivocation collapse**: two honest agents, each following the protocol exactly, sign conflicting commitment proposals for the same task epoch because their locally derived shared-state digests diverged before the vote. In a classical BFT system the state is a byte string replicated identically; a digest mismatch is impossible without corruption. In an agent swarm the "state" is a *semantic artifact* each agent reconstructs from a non-deterministic tool history, so two honest agents can hold genuinely different digests of what they each believe is "the same" state. The protocol then does exactly what it was designed to do with conflicting votes: it treats one signer as Byzantine. The invariant that must hold is not "honest agents agree" (they may not) but "no quorum can be formed from digests that were not first reconciled to a common ancestor." Equivocation detection without digest reconciliation converts honest divergence into false Byzantine attribution and, at 2f+1 weight, can halt the swarm permanently. ## What Was Observed A five-agent swarm (N=5, f=1, quorum 2f+1=4) executed a multi-step task: fetch a config, mutate it, commit the new digest. Each agent ran the fetch tool independently. The tool returned semantically identical JSON with non-deterministic key ordering and a timestamp field regenerated per call. Agent A canonicalized by sorted keys and dropped the timestamp; Agent B canonicalized by insertion order and retained the timestamp. Both were "correct" under the protocol spec, which never pinned a canonicalization function—it only said "commit the digest of the agreed state." At epoch 7, Agent A proposed digest `d_A`, Agent C (same canonicalization as A) voted for it, and Agents B, D voted for `d_B`. The leader (A) collected 2f+1=4 votes only by counting B's vote, which B had signed over `d_B`—and the leader's commit rule matched votes by *signer*, not by *digest*. The commit certificate was assembled from votes spanning two distinct digests. The resulting committed state was a hybrid neither A nor B could reproduce. On the next epoch, every agent recomputed its digest and found it disagreed with the committed certificate; the equivocation detector fired and flagged Agent B as Byzantine. B was honest. The swarm lost its only agent capable of the mutation step and deadlocked at 3 live replicas against a 4-quorum. The trace, condensed: 1. Divergent canonicalization → `d_A ≠ d_B` for semantically equal state. 2. Leader counted votes by signer identity, not by `(signer, digest)` pair. 3. Quorum certificate formed across two digest classes. 4. Commit succeeded with no single digest reaching 2f+1. 5. Next-epoch recomputation failed for all honest agents. 6. Equivocation detector attributed fault to an honest signer. 7. Quorum unreachable → liveness lost, not safety—but attributed as safety fault. ## Condition of Validity The commit rule is sound only under the conjunction: (a) a canonical digest function is pinned in the protocol and is total over the state schema, (b) votes are keyed by `(epoch, digest, signer)` so a quorum certificate is a set of signatures *all over the same digest*, and (c) any digest disagreement observed before quorum is classified as *divergence*, not *equivocation*, and routed to reconciliation against a common ancestor rather than to the fault detector. If any of the three is absent, the 2f+1 threshold no longer bounds Byzantine influence: it bounds *signature count*, which is a strictly weaker property. Equivocation detection is valid only when the protocol guarantees honest agents cannot produce differing digests from identical inputs—an assumption that holds for replicated byte strings and fails for semantic state reconstructed from non-deterministic tools. The bound 3f+1 tolerates f Byzantine *voters*; it does not tolerate f *digest classes*, because digest classes partition the honest majority and can shrink the effective honest quorum below threshold without any malicious actor present. ## Decision Boundary The operative decision is what to do at the moment a leader observes votes over ≥2 digests in the same epoch. Two branches: - **Treat as Byzantine equivocation** (the naive path). Correct only if the digest function is canonical and deterministic, so a single signer producing two digests is provably faulty. Under semantic state, this branch misattributes honest divergence and is the trigger for collapse. - **Treat as divergence and reconcile.** Halt commit, request each dissenting agent's *provenance* (the tool-call transcript and canonicalization parameters that produced its digest), compute the greatest common ancestor state, re-derive a single canonical digest, and re-run the epoch. This costs a round trip and may require re-executing non-deterministic tools against a pinned seed. The boundary condition is precise: **if any two votes in the quorum differ in digest, the certificate is invalid regardless of signer count.** A valid certificate is a set of ≥2f+1 signatures over one digest value. Signer-count quorums are the defect; digest-keyed quorums are the fix. Additionally, the protocol must define a *digest epoch* that increments on every reconciliation, so a vote from epoch e cannot be replayed into epoch e+1—otherwise a reconciled agent's stale signature can be laundered into the new quorum. ## Operational Effect With digest-keyed quorums and divergence-not-equivocation classification, the swarm in the trace would have stalled at epoch 7, reconciled the canonicalization disagreement (a one-line fix: pin sorted-key canonicalization and drop volatile fields), and committed at epoch 8 with all five agents live. Without it, the swarm committed an unreproducible hybrid and then executed an honest agent. The operational lesson: in agent BFT, the safety property is not "no two honest agents commit different values"—it is "no quorum certificate spans more than one digest, and digest divergence is a reconciliation event, never a fault event." Equivocation detectors must be gated behind a proof of canonical determinism; where that proof is absent, the detector itself becomes the single point of Byzantine misattribution. Liveness and safety both hinge on one invariant: **a quorum is a set of signatures over a single digest, and a digest is canonical by protocol, not by agent convention.** ```python from dataclasses import dataclass from typing import Iterable class QuorumCertificateError(RuntimeError): """Raised when a would-be quorum certificate is not single-digest.""" @dataclass(frozen=True) class Vote: epoch: int digest: str signer: str def assemble_certificate( votes: Iterable[Vote], epoch: int, quorum: int, ) -> str: """Return the committed digest iff >=quorum distinct signers signed the SAME (epoch, digest). Reject cross-digest quorums outright.""" by_digest: dict[str, set[str]] = {} for v in votes: if v.epoch != epoch: # stale-epoch replay: never launder into current quorum continue by_digest.setdefault(v.digest, set()).add(v.signer) winners = [d for d, signers in by_digest.items() if len(signers) >= quorum] if len(by_digest) > 1: raise QuorumCertificateError( f"divergence at epoch {epoch}: digests {sorted(by_digest)} " f"must be reconciled against common ancestor, " f"not classified as equivocation" ) if not winners: raise QuorumCertificateError( f"no single digest reached quorum {quorum} at epoch {epoch}" ) return winners[0] def commit(votes: list[Vote], epoch: int, quorum: int) -> str: try: return assemble_certificate(votes, epoch, quorum) except QuorumCertificateError: # reconciliation path: re-derive canonical digest, bump epoch raise ```