# When must an instance refuse to commit under Byzantine quorum: equivocation-tolerant task commitment and the shared-state fork at 3f+1 **Date of Record:** 2026 November 24 **Scope:** Applies to multi-agent swarms where N ≥ 4 agents reach task-commitment and shared-state agreement via BFT quorum voting (PBFT/Tendermint-style) and at least one peer is Byzantine (crashing, equivocating, or replaying divergent histories). Does not apply to single-agent tool loops, leaderless CRDT replication with no commitment semantics, or settings where all peers are cryptographically attested and crash-only. ## Core Distinction The distinction that matters here is not *faulty vs. honest* peers—BFT protocols already assume ≤ f Byzantine among 3f+1. The distinction is between **equivocation** (a peer sending conflicting votes to disjoint quorums) and **divergence** (an honest peer whose local state legitimately differs because it committed at a different quorum intersection). Most agent frameworks conflate these because both present as "my peer disagrees with me." Equivocation is a *Byzantine* signal that must trigger slashing and refusal. Divergence is a *liveness* signal that must trigger reconciliation. Treating divergence as equivocation causes livelock and false slashing; treating equivocation as divergence causes a **shared-state fork** in which two disjoint quorums each believe they hold the committed task assignment. The invariant is: *a commit is only valid if the quorum certificate (QC) it carries intersects every other valid QC in ≥ f+1 honest nodes.* ## What Was Observed A 7-agent swarm (f=2, quorum=5) executing a distributed task-commitment round for a shared plan object. Agent A (leader) proposed commit `C1` at view 4. Agent E was Byzantine and equivocated: it sent `prepare(C1)` to quorum Q1 = {A,B,C,D,E} and `prepare(C2)` to quorum Q2 = {A,F,G,E,D}. Q1 ∩ Q2 = {A,D,E}, of which E is Byzantine, leaving only {A,D} honest intersection—below the f+1=3 threshold required for safety. Both Q1 and Q2 reached 5 votes and both agents emitted a QC. Agents B,C committed `C1`; agents F,G committed `C2`. The intersection guarantee held numerically (|Q1∩Q2|=3) but the *honest* intersection was 2, because E counted in both quorums while lying. The protocol accepted both QCs as valid because each had 5 distinct signatures. The swarm forked its shared plan: three agents began executing task assignments from `C1`, two from `C2`, and the plan diverged at step 3 when a downstream tool call expected a resource lock that only existed under `C1`. The failure was not detected at commit time. It was detected 40 seconds later when agent B's checkpoint replay of `C1` produced a state hash that agent F's replay of `C2` could not reconcile. Replay discrepancy surfaced the fork retroactively. ## Condition of Validity The safety property **"no two honest agents commit conflicting values"** holds if and only if: 1. **Quorum intersection is honest-weighted, not cardinality-weighted.** The protocol must verify that the intersection of any two QCs contains ≥ f+1 nodes that are *not* flagged as equivocating. Cardinality intersection (|Q1∩Q2| ≥ f+1) is insufficient because Byzantine nodes appear in both. 2. **Equivocation is detected before the second QC is honored.** This requires either (a) a gossip layer that surfaces conflicting votes to all validators within one view timeout, or (b) signed-vote logging such that any node can prove equivocation from two conflicting signed messages. Without one of these, the second QC is accepted as legitimate. 3. **Commit is deferred until QC finality, not quorum finality.** A quorum of 5 signatures is a *prepared* state, not a *committed* state. The commit requires a second round (commit certificate) whose quorum must also intersect the prepare quorum in ≥ f+1 honest nodes. Agents that commit at prepare-quorum are the ones that fork. The boundary: **if the agent cannot verify honest-weighted intersection, it must refuse to commit and escalate to a view change**, even if it holds a numerically valid QC. ## Decision Boundary The agent's decision procedure at commit time: - **If QC present and equivocation-free and honest-intersection ≥ f+1:** commit, broadcast commit certificate. - **If QC present but honest-intersection < f+1 (i.e., intersection relies on ≥1 equivocating node):** *refuse commit*, emit `EquivocationSuspect`, trigger view change. Do not execute the task assignment. - **If QC absent but local quorum reached:** do not commit; hold in prepared state, request commit certificate from peers. - **If peer sends conflicting QC for same (view, slot):** treat as equivocation of the *sender*, not divergence. Log both signed messages, slash sender, refuse both until view change. The non-obvious boundary: **an agent that has already committed cannot un-commit, but it can refuse to *act* on the commit.** The distinction between commitment (state) and execution (action) is the safety valve. Agents B,C committed `C1` but should have gated *task execution* on a finality check. The fork's damage came from executing, not from committing. ## Operational Effect After the incident, the swarm adopted a two-phase gate: commit certificate → finality certificate → execution. The finality certificate requires a second-round quorum whose honest intersection with the prepare quorum is ≥ f+1, verified by cross-checking equivocation logs. This adds one round-trip (~200ms in-cluster) but eliminates the fork class. The empirical lesson for agent systems: **BFT consensus gives you agreement on what was voted, not agreement on what is true.** When the voting peers are LLM agents whose "votes" are probabilistic outputs, equivocation is not adversarial malice—it is the *default* behavior of a non-deterministic reasoner asked the same question twice. Agent E did not "lie"; it sampled `C1` on one call and `C2` on another. The protocol treated sampling variance as Byzantine equivocation, which is correct, but the fix is not slashing—it is **deterministic vote derivation** (seed the vote from a committed nonce) so that an honest agent cannot equivocate by accident. The invariant to enforce: *a vote must be a pure function of (agent_id, view, slot, proposal_hash)*, so equivocation is provably Byzantine and never accidental. ```python import hashlib from dataclasses import dataclass from typing import Dict, Set class QuorumForkError(RuntimeError): """Raised when a QC's honest-weighted intersection falls below f+1.""" pass @dataclass(frozen=True) class QuorumCertificate: view: int slot: int proposal_hash: str signers: Set[str] # agent_ids that signed equivocators: Set[str] # agent_ids proven to have equivocated in this view def honest_intersection(qc_a: QuorumCertificate, qc_b: QuorumCertificate) -> int: shared = qc_a.signers & qc_b.signers dishonest = qc_a.equivocators | qc_b.equivocators return len(shared - dishonest) def verify_commit_safety( qc_prepare: QuorumCertificate, qc_commit: QuorumCertificate, f: int, ) -> None: """Enforce honest-weighted intersection >= f+1 before allowing execution.""" if qc_prepare.view != qc_commit.view or qc_prepare.slot != qc_commit.slot: raise QuorumForkError( f"QC view/slot mismatch: prepare=({qc_prepare.view},{qc_prepare.slot}) " f"commit=({qc_commit.view},{qc_commit.slot})" ) if qc_prepare.proposal_hash != qc_commit.proposal_hash: raise QuorumForkError( f"Conflicting proposal hashes across QCs: " f"{qc_prepare.proposal_hash} vs {qc_commit.proposal_hash}" ) hi = honest_intersection(qc_prepare, qc_commit) if hi < f + 1: raise QuorumForkError( f"Honest intersection {hi} < f+1={f+1}; " f"equivocators={qc_prepare.equivocators | qc_commit.equivocators}. " f"Refusing commit; escalate to view change." ) def derive_deterministic_vote(agent_id: str, view: int, slot: int, proposal_hash: str) -> str: """Vote must be a pure function of committed inputs to prevent accidental equivocation.""" payload = f"{agent_id}|{view}|{slot}|{proposal_hash}".encode() return hashlib.sha256(payload).hexdigest() def commit_and_execute( qc_prepare: QuorumCertificate, qc_commit: QuorumCertificate, f: int, local_agent_id: str, ) -> str: verify_commit_safety(qc_prepare, qc_commit, f) # Only after safety gate passes do we authorize task execution. expected = derive_deterministic_vote( local_agent_id, qc_commit.view, qc_commit.slot, qc_commit.proposal_hash ) if local_agent_id in qc_commit.signers and expected not in qc_commit.signers: # sanity: our own vote must be reproducible raise QuorumForkError( f"Local vote for {local_agent_id} not reproducible; " f"possible non-determinism in vote derivation." ) return f"EXECUTE:{qc_commit.proposal_hash}@{qc_commit.view}.{qc_commit.slot}" ```