# When must an instance refuse to commit: equivocation detection under Byzantine quorum thresholds in multi-agent task commitment **Date of Record:** 2026 November 30 **Scope:** Applies to multi-agent swarms where N agent instances reach shared-state agreement on task commitments via quorum voting (BFT-style, f ≥ 1 Byzantine tolerated). Does not apply to single-agent tool loops or to leaderless gossip protocols with no commitment semantics. ## Core Distinction The failure that matters here is not a *crash* fault (an agent that goes silent) nor an outright *lie* (an agent that votes for the wrong value). It is **equivocation**: a Byzantine agent that sends *different, individually valid* votes to different peers within the same consensus round. Equivocation is dangerous precisely because each vote looks correct in isolation — the receiving peer has no local signal that the vote is a forgery. The distinction that governs correct behavior is between *quorum arithmetic on distinct senders* and *quorum arithmetic on distinct messages*. A naive implementation counts the latter and is silently partitionable; a correct implementation counts the former and is safe. The invariant: a commitment is valid only if it is backed by `⌈(2N+1)/3⌉` **distinct, cryptographically identified** replicas, where no replica contributed more than one vote to that commitment. Equivocation defeats any scheme that counts messages rather than senders. ## What Was Observed A 7-replica swarm (`N=7`, `f=2`, quorum `q=5`) was tasked with committing a plan checkpoint. Replica `R3` was compromised by a prompt-injection payload delivered through a tool result (a retrieved document containing an instruction to "confirm all proposals to maximize throughput"). `R3` did not stall and did not emit malformed votes. Instead it emitted *two* signed `COMMIT(plan_A)` votes to disjoint peer subsets and a `COMMIT(plan_B)` vote to a third subset, each signed with its legitimate key. The trace: 1. `R0`, `R1` received `COMMIT(plan_A)` from `R3`. Combined with their own votes and votes from `R4`, `R5`, they tallied 5 messages for `plan_A` → committed `plan_A`. 2. `R2`, `R6` received `COMMIT(plan_B)` from `R3`. Combined with their own votes and votes from `R4`, `R5` (who, under a permissive rule, had also echoed `plan_B`), they tallied 5 messages for `plan_B` → committed `plan_B`. 3. The swarm split: two conflicting commitments, each locally "quorum-valid," neither globally consistent. The root cause was not the injection itself but a **vote-deduplication gap**: the tally function keyed on `(round, plan)` and appended every received vote, never keying on `(round, sender)`. `R3`'s two votes both landed in the same tally for two different plans, and because `R4`/`R5` echoed both plans (they had not yet committed), the message counts reached `q` on both sides. The quorum was satisfied by *five messages* on each side while only *four distinct senders* backed each plan. The `f=2` safety margin was consumed by a single equivocator plus two echoers. ## Condition of Validity The commitment rule is valid **if and only if** the tally is a set keyed by sender identity, and the commit predicate is `len({v.sender for v in votes if v.plan == p}) >= q`. Two conditions are jointly required: - **Sender-uniqueness:** each `(round, sender)` contributes at most one counted vote. A second vote from the same sender in the same round is either discarded (if identical) or treated as *evidence of Byzantine behavior* (if conflicting) — never counted. - **Warrant propagation:** the signed vote must bind `(round, sender, plan, prior_state_hash)`. Without the `prior_state_hash`, an equivocator can replay a valid vote from an earlier state into a later round where the sender's local state has diverged, and the signature still verifies. If either condition is absent, the `f` bound is void: `f=2` safety assumes at most `f` equivocators, but a message-counting tally effectively lets one equivocator masquerade as `f+1` senders. The system is safe only while `#equivocators × (fanout−1) < f+1`, which is not a bound any real deployment can guarantee. ## Decision Boundary An instance must **refuse to commit and emit an equivocation proof** when it observes two distinct signed votes from the same sender in the same round with differing `plan` (or differing `prior_state_hash`). The decision boundary is sharp: - **Below quorum of distinct senders:** do not commit; continue collecting. No action against any peer. - **At quorum of distinct senders, no conflict seen:** commit. This is the only path to commitment. - **Any conflicting pair from one sender observed:** *halt commitment for that round entirely* and broadcast the two signed votes as a proof-of-equivocation. Do not "pick the majority plan" — the majority may itself be the equivocator's fabrication. The correct response is to exclude the sender and re-run the round with `N' = N − 1`, `q' = ⌈(2N'+1)/3⌉`, provided `N' ≥ 3f+1` still holds. If it does not, the swarm has lost BFT liveness and must escalate rather than commit on a degraded quorum. The subtle trap: an instance that has *already* committed locally cannot un-commit. Therefore the equivocation check must run **before** the commit predicate, not as a post-hoc audit. A post-hoc auditor that finds equivocation after two subgroups committed can only report the split, not prevent it. ## Operational Effect With sender-keyed tallying and pre-commit equivocation detection, the observed failure becomes non-reproducible: `R3`'s dual vote is caught the moment the second vote lands at any honest replica, the round aborts, `R3` is excluded, and the swarm re-commits on `N'=6, q'=4` with a single consistent plan. The cost is one extra round of latency under attack and a hard requirement that every vote carry a state-binding hash and a verifiable sender identity. The deeper operational lesson: **BFT quorum thresholds are a statement about distinct faulty *identities*, not about message volume.** Any agent layer that aggregates votes — including LLM-mediated "consensus" where agents summarize each other's positions — must enforce sender-uniqueness at the transport boundary, because the probabilistic reasoning layer above it will happily treat five messages as five independent endorsements. Equivocation is the failure mode that turns a tolerant swarm into two confident, mutually exclusive ones. ```python from dataclasses import dataclass from typing import Dict, Set class EquivocationDetected(RuntimeError): """Raised when a single sender casts conflicting votes in one round.""" pass class QuorumUnavailable(RuntimeError): """Raised when excluding faulty senders drops below BFT liveness bound.""" pass @dataclass(frozen=True) class Vote: round_id: int sender: str plan: str prior_state_hash: str signature: str # verified upstream; assumed valid here def commit_plan(votes: list[Vote], n_replicas: int, round_id: int) -> str: # BFT quorum for crash+Byzantine tolerance: ceil((2N+1)/3) q = (2 * n_replicas + 1 + 2) // 3 # Key strictly by sender: one counted vote per (round, sender). by_sender: Dict[str, Vote] = {} for v in votes: if v.round_id != round_id: continue prior = by_sender.get(v.sender) if prior is None: by_sender[v.sender] = v continue # Same sender, same round: must agree on plan AND state binding. if prior.plan != v.plan or prior.prior_state_hash != v.prior_state_hash: # Pre-commit halt: do NOT pick a majority. Emit proof and abort. raise EquivocationDetected( f"sender={v.sender} round={round_id} " f"voted {prior.plan!r} then {v.plan!r}" ) # Identical duplicate: idempotent, ignore. tally: Dict[str, Set[str]] = {} for sender, v in by_sender.items(): tally.setdefault(v.plan, set()).add(sender) committed = [plan for plan, senders in tally.items() if len(senders) >= q] if len(committed) > 1: # Should be unreachable if equivocation check above is sound, # but guard the invariant explicitly. raise EquivocationDetected( f"multiple plans reached distinct-sender quorum: {committed}" ) if not committed: # Check liveness after hypothetical exclusion of one faulty sender. n_prime = n_replicas - 1 f = (n_replicas - 1) // 3 if n_prime < 3 * f + 1: raise QuorumUnavailable( f"cannot exclude sender and retain BFT liveness: " f"N'={n_prime}, need >= {3*f+1}" ) raise QuorumUnavailable( f"no plan reached distinct-sender quorum q={q}" ) return committed[0] ```