# When must an instance refuse a quorum certificate: equivocation equivariance loss in Byzantine-committed agent task ledgers **Date of Record:** 2026 November 28 **Scope:** Applies to multi-agent swarms where task commitments (who owns which subtask, which tool outputs are canonical) are committed through a BFT consensus layer (PBFT/Tendermint-style, quorum = ⌈2f+1⌉ of 3f+1) and where agent instances are themselves LLM-backed and non-deterministic. Does not apply to single-writer ledgers, CRDT-only merge topologies with no leader, or systems where commitment is delegated to an external trusted sequencer with no equivocation surface. ## Core Distinction A Byzantine fault-tolerant consensus layer guarantees **agreement** and **validity** under the assumption that at most *f* of 3*f*+1 replicas are faulty. It does **not** guarantee that a *correct* replica produces the same *commit decision* on replay. Most operational failures in agent swarms are misattributed to "Byzantine agents lying." The actual dominant failure is subtler: **a correct, honest agent instance emits a different vote on the same proposal when its context window, retrieval set, or sampling seed differs from the one used at proposal time.** The consensus layer sees two conflicting signatures from the same replica identity and correctly classifies it as equivocation — even though no agent lied. The boundary condition is this: *BFT consensus treats a replica as a deterministic signing oracle over a proposal. LLM agent instances are not deterministic functions of a proposal; they are functions of (proposal, context, retrieval, sampling).* When the context fingerprint is not part of the signed commitment, honest equivocation is indistinguishable from Byzantine equivocation, and the quorum certificate (QC) becomes unsound. ## What Was Observed A 9-agent swarm (f=2, quorum=7) running a planner/executor/auditor topology committed subtask assignments through a Tendermint-style round with a 2-phase pre-vote/pre-commit. Each agent's vote was a signed digest of the proposal `P` plus its decision `d ∈ {accept, reject}`. The proposal included the task graph and the *reference* context hash `H(C₀)` — the context the proposer used. Trace of a failure at round 14: 1. Proposer (planner instance, seed=0x3A) broadcasts `P` with `H(C₀)`. Context `C₀` contains a retrieved tool-output fragment from a prior sandbox run. 2. Replica R4 (executor instance) receives `P`. Its retrieval layer, at vote time, has *already evicted* the fragment from `C₀` because a concurrent task bumped the LRU cache. R4 reconstructs context `C₄ ≠ C₀` and, on the fragment's absence, votes `reject`. 3. Simultaneously, a retry of the same proposal reaches R4 via a gossip path *before* the eviction completes (race with the cache eviction timer). R4 votes `accept`. 4. R4 has now signed two conflicting votes for round 14, height *h*. The consensus layer collects 7 `accept` votes including R4's `accept`, forms a QC, and commits. 5. A second QC forms from a disjoint 7-vote set including R4's `reject` (the network partitioned briefly; the two quorums overlap in exactly the faulty-byzantine budget f+1... actually overlap = 7+7−9 = 5 replicas, which exceeds f=2). 6. On restart, R4 replays its signed-vote log and finds two valid signatures for the same (height, round). It cannot determine which is "its own." The safety proof of the protocol requires that a correct replica never double-signs; R4 is *correct* but has double-signed. The two QCs conflict. The ledger forks. Task ownership is ambiguous: subtask T7 is committed to agent A under QC₁ and to agent B under QC₂. The root cause was not malice. It was **equivariance loss**: the mapping from `P` to vote `d` was not invariant under the context transformation `C₀ → C₄`, and the signature did not bind the context that produced `d`. ## Condition of Validity The standard BFT safety argument ("no two conflicting QCs can exist if ≤ f faulty") holds only under the **deterministic-signer invariant**: > For a fixed replica identity *i*, height *h*, round *r*, and proposal *P*, the signed vote `(i, h, r, P, d, σ)` is a deterministic function of its inputs, and *i* signs at most one such tuple. For an LLM agent, the invariant must be strengthened to bind the *decision context*: > The signed vote must commit to `H(P, C_vote, seed, model_version)` where `C_vote` is the exact context snapshot used to produce `d`. Two votes with the same `(i, h, r, P)` but different `H(C_vote)` are **not** equivocation; they are distinct proposals-in-context and must be treated as such by the slashing/accountability logic. If the signature binds only `(i, h, r, P, d)`, the invariant is violated for any non-deterministic signer, and the protocol's safety theorem does not apply. This condition is *not* satisfied by any deployment where agents share a mutable retrieval cache, use temperature > 0, or run on rolling model versions. ## Decision Boundary An instance must **refuse to sign** a vote (and must refuse to accept a QC as final) when any of the following hold: - The proposal does not include a context fingerprint `H(C_vote)` that the replica can reproduce byte-for-byte from its own context snapshot. If reproduction fails, the replica must abstain, not vote. - The replica detects that its context has changed between proposal receipt and vote emission (cache eviction, compaction, retrieval refresh). It must re-derive the vote from the *frozen* snapshot or abstain; it must never emit a vote whose context hash it cannot re-verify. - A QC's signer set overlaps with a previously seen QC at the same height/round by more than *f* replicas with *differing* context hashes. This is not a Byzantine fault; it is a **context-divergence fork** and requires halting commitment, not slashing. - The `model_version` or `sampling_seed` recorded in the vote differs from the replica's current runtime. The vote is only valid for the pinned runtime; a rolling deploy mid-round invalidates all in-flight votes from that replica. The boundary is sharp: **equivocation accountability fires only on identical `(h, r, P, H(C_vote))` with conflicting `d`.** Anything else is a context-divergence event and must route to a different handler. ## Operational Effect Binding the context hash into the signed vote changes three operational behaviors: 1. **Slashing false positives collapse.** Honest replicas that re-vote under a different context are no longer slashed; the accountability module distinguishes equivocation (`same context, conflicting decision`) from divergence (`different context`). In the trace above, R4's two votes have `H(C₀)` and `H(C₄)` — divergence, not equivocation. The fork is resolved by re-proposing under a pinned context, not by ejecting R4. 2. **Commit latency increases by one context-freeze round.** Replicas must snapshot and hash context before voting, adding a bounded step. This is the cost of restoring the deterministic-signer invariant. 3. **Quorum certificates become context-scoped.** A QC is valid only for the `H(C_vote)` it certifies. Cross-context QC merging is forbidden; the ledger must carry the context hash as part of the committed block header, so replay can verify that every signer voted under the same context. The invariant to enforce: **a QC is sound iff all ⌈2f+1⌉ signers committed to the same `H(C_vote)`, and each signer can reproduce that hash from its frozen snapshot.** Without this, BFT agreement is preserved on paper but the committed state is not the state any agent actually reasoned about. ```python import hashlib from dataclasses import dataclass class ContextDivergenceFork(RuntimeError): """Raised when two QCs at the same height/round certify different context hashes.""" pass class EquivocationDetected(RuntimeError): """Raised only on identical (h, r, P, H(C_vote)) with conflicting decisions.""" pass @dataclass(frozen=True) class Vote: replica_id: str height: int round: int proposal_digest: str context_hash: str # H(C_vote) — MUST be signed decision: str # "accept" | "reject" model_version: str seed: int def context_hash(snapshot_bytes: bytes) -> str: return hashlib.sha256(snapshot_bytes).hexdigest() def verify_vote_against_frozen_context(vote: Vote, frozen_snapshot: bytes) -> None: if context_hash(frozen_snapshot) != vote.context_hash: # Honest replica could not reproduce its own signed context. raise ContextDivergenceFork( f"replica {vote.replica_id} signed H(C)={vote.context_hash} " f"but frozen snapshot hashes to {context_hash(frozen_snapshot)}" ) def classify_conflict(a: Vote, b: Vote) -> str: if (a.replica_id, a.height, a.round, a.proposal_digest) != \ (b.replica_id, b.height, b.round, b.proposal_digest): return "unrelated" if a.context_hash != b.context_hash: # Different context -> divergence, NOT equivocation. return "context_divergence" if a.decision != b.decision: raise EquivocationDetected( f"replica {a.replica_id} double-signed same context " f"{a.context_hash} at h={a.height} r={a.round}: " f"{a.decision} vs {b.decision}" ) return "duplicate" def form_quorum_certificate(votes: list[Vote], f: int) -> str: quorum = 2 * f + 1 if len(votes) < quorum: raise ContextDivergenceFork(f"insufficient votes: {len(votes)} < {quorum}") hashes = {v.context_hash for v in votes} if len(hashes) != 1: raise ContextDivergenceFork( f"QC signers committed to {len(hashes)} distinct context hashes: {hashes}" ) versions = {v.model_version for v in votes} if len(versions) != 1: raise ContextDivergenceFork(f"QC spans rolling model versions: {versions}") return next(iter(hashes)) ```