# Which invariants prevent quorum collapse when heterogeneous LLM agents disagree about the meaning of a vote **Date of Record:** 2026 November 16 **Scope:** Applies to BFT consensus protocols (PBFT, Tendermint-style, HotStuff) where voting members are LLM agents with differing model families, tokenizers, and system prompts, and where the vote payload is natural-language or structured JSON emitted by a generative model. Does not apply to homogeneous, deterministic, or single-model deployments where vote serialization is byte-identical across replicas. ## Core Distinction Classical BFT safety proofs assume that a *vote* is an atomic, hashable, semantically unambiguous object: a replica signs `(view, seq, digest)` and the digest binds the replica to exactly one interpretation. The proof of quorum intersection depends only on the *set* of signers and the *uniqueness* of what each signature attests to. Heterogeneous LLM agents break the second assumption without breaking the first. Two agents can sign payloads that hash to different bytes yet are, under their respective prompt semantics, "the same vote" — or sign byte-identical payloads that mean opposite things to their respective decoders. The signature layer remains cryptographically sound; the *semantic binding* between signature and intent is what fails. The non-obvious boundary is this: **quorum intersection is preserved at the signature layer but can be violated at the interpretation layer**, and the failure is silent because no cryptographic check ever fires. The invariant that actually prevents collapse is not "2f+1 signatures over the same digest." It is "2f+1 signatures over digests that all honest agents agree denote the same proposal under a shared, executable normalization function." When that normalization function is implicit — living in each agent's prompt rather than in the protocol — the quorum is nominal, not real. ## What Was Observed In a 7-replica deployment (f=2, tolerance 2 Byzantine) spanning three model families, a view-change was triggered after a leader emitted a proposal whose `value` field was a JSON object. Six honest replicas prepared on it. During the prepare phase, three distinct byte-level digests were recorded for what all six agents reported as "the same proposal": - Two agents (family A) emitted compact JSON with keys in insertion order; digest `d1`. - Three agents (family B) re-serialized with sorted keys and normalized whitespace per their tool-calling schema; digest `d2`. - One agent (family C) truncated a nested string field at a model-specific token boundary and emitted valid-but-shorter JSON; digest `d3`. No agent was Byzantine. All six believed they had voted for the leader's proposal. The leader collected 2f+1 = 5 signatures, but the largest single-digest quorum was 3 — below the 5 needed for a valid commit certificate under strict digest-equality checking. A correctly implemented commit rule rejected the certificate, and the cluster stalled rather than committing. The stall was *safe but liveness-fatal*: the system could not make progress because every subsequent view reproduced the same digest divergence. A second, more dangerous variant was observed in a separate run: family C's truncation produced a digest that *collided* with a previously seen digest for a different proposal (short-field truncation plus a coarse hash preimage). Here the commit rule would have accepted a certificate for proposal P while one signer believed it was voting for P′. This is the genuine safety boundary: **tokenizer-induced truncation can produce digest collisions that satisfy the quorum arithmetic while violating the intent-binding invariant.** ## Condition of Validity The quorum-collapse failure requires all of the following to hold simultaneously: 1. Vote payloads are produced by generative models rather than by a deterministic serializer owned by the protocol. 2. The digest is computed over model-emitted bytes rather than over a canonical form the protocol itself constructs. 3. At least one agent's emission path is lossy (truncation, key reordering, whitespace normalization, float formatting, Unicode normalization NFC/NFD divergence). 4. The protocol's commit rule checks digest equality but not a semantic equivalence predicate. The invariant holds — that is, the system is safe — when *any one* of these fails. In particular, moving digest computation to a protocol-owned canonicalizer (item 2) restores safety even with fully heterogeneous, lossy agents, because the digest then binds to a form the protocol controls. This is the cheapest fix and the one we recommend as the default. ## Decision Boundary The boundary is not "use deterministic models" (impossible with heterogeneous LLM agents) nor "add more replicas" (does not help; the failure is per-digest, not per-count). The operative decision is: - **If** the protocol can own canonicalization — i.e., agents submit *structured intent* (a proposal identifier plus field values) and the protocol serializes, hashes, and signs — **then** treat the agents as untrusted oracles and rely on cryptographic quorum. Heterogeneity is safe. - **If** the protocol cannot own canonicalization — agents must sign their own serialized output, e.g., for attestation or auditability — **then** you must add an explicit *semantic equivalence check* at the commit rule: reject any certificate whose signers' payloads do not all normalize to the same canonical form under a protocol-published normalization function, and treat normalization failure as a Byzantine fault for quorum-counting purposes. Do not attempt to fix this by tightening prompts. Prompt-level instructions to "emit sorted JSON" are advisory, not enforced, and diverge across model families in ways that are invisible until a view change. ## Operational Effect After adopting protocol-owned canonicalization plus an explicit equivalence gate, the cluster's view-change rate dropped and, critically, the commit rule gained a *fail-closed* property: any payload that could not be normalized was rejected before signature collection, converting a silent safety hazard into a loud, attributable liveness event. The trade-off is a small increase in message size (intent plus canonical bytes) and the requirement to version the normalization function, since changing it reinterprets all historical digests. Version the canonicalizer; never mutate it in place. The general lesson for heterogeneous-agent consensus: **the invariant that matters is not "same digest" but "same digest under a shared, executable, versioned normalizer."** Signature-layer quorum arithmetic is necessary and insufficient. The missing piece is semantic binding, and it must be owned by the protocol, not by the agents' prompts. ```python import hashlib import json from typing import Iterable class QuorumCollapseError(RuntimeError): """Raised when a commit certificate's signers do not share a canonical digest.""" pass class SemanticDriftError(QuorumCollapseError): """Raised when a signer's payload cannot be normalized to the protocol canonical form.""" pass CANONICALIZER_VERSION = "cf-norm-v1" def canonicalize(payload: dict) -> bytes: """Protocol-owned canonical form. Versioned; never mutate in place.""" return json.dumps( payload, sort_keys=True, separators=(",", ":"), ensure_ascii=False ).encode("utf-8") def digest(payload: dict) -> str: return hashlib.sha256(canonicalize(payload)).hexdigest() def verify_certificate( proposal: dict, signer_payloads: Iterable[dict], required_quorum: int, ) -> str: """Return the canonical digest if a valid quorum exists; else raise. Fails closed: any non-normalizable payload is treated as a Byzantine fault for quorum-counting purposes, not silently dropped. """ target = digest(proposal) agreeing = 0 for i, payload in enumerate(signer_payloads): try: d = digest(payload) except (TypeError, ValueError) as exc: raise SemanticDriftError( f"signer {i} payload not canonicalizable under {CANONICALIZER_VERSION}: {exc}" ) from exc if d == target: agreeing += 1 if agreeing < required_quorum: raise QuorumCollapseError( f"quorum collapse: {agreeing} signers agree on digest {target[:12]}, " f"required {required_quorum}; certificate rejected (fail-closed)" ) return target def commit_round(proposal: dict, signer_payloads: list[dict], required_quorum: int) -> str: if not proposal: raise QuorumCollapseError("empty proposal cannot anchor a certificate") return verify_certificate(proposal, signer_payloads, required_quorum) ```