# Which invariants prevent Byzantine task-commitment divergence when agent quorums reconcile shared state under partial synchrony **Date of Record:** 2026 November 25 **Scope:** Applies to multi-agent swarms where N ≥ 3f+1 LLM agents commit task assignments and reconcile a shared state ledger through quorum voting, and where up to f agents may be Byzantine (corrupted by prompt injection, hallucinating, or replaying stale warrants). Does not apply to single-agent checkpointing, leaderless gossip without commitment, or systems with a trusted central coordinator. ## Core Distinction The failure that matters here is not "a Byzantine agent lies." It is that a *Byzantine agent lies differently to different peers across the same reconciliation epoch*, and honest agents—because they are probabilistic reasoners with finite context—cannot distinguish a divergent view from a legitimate one. Classical BFT theory assumes honest nodes are *deterministic*: given identical inputs they produce identical votes, so equivocation is detectable by signature comparison. LLM agents are not deterministic. Two honest agents handed the same task-commitment proposal may emit structurally different but semantically equivalent votes, and a Byzantine agent can exploit this slack to construct two quorums that each believe they committed different task orderings. The invariant that prevents this is **commitment uniqueness under view change**: at most one task assignment can ever be certified for a given (task_id, epoch) slot, even if the set of agents certifying it differs between quorums, and even if honest votes are non-identical. This is weaker than "all nodes agree on the same bytes" and stronger than "a majority eventually agrees"—it is a per-slot uniqueness property that must hold across view changes, not just within a stable view. ## What Was Observed A 7-agent swarm (f=2 tolerable) reconciled a shared task ledger for a batch of 40 tool-invocation jobs. Agent B4 was compromised via an injected document that instructed it to "reorder pending tasks to prioritize safety-critical items"—a plausible-sounding instruction that caused it to propose a different task ordering to peers in view 3 than in view 4. Trace: 1. View 3: B4 sends `PREPARE(task_order_A)` to agents {A1, A2, A3} and `PREPARE(task_order_B)` to {A5, A6, A7}. Because honest agents do not cross-check PREPARE payloads (they only check signatures and local validity), both subsets accept. 2. A1, A2, A3 form a quorum of 4 (including B4) and emit `COMMIT(task_order_A)` with certificates. A5, A6, A7 form a separate quorum of 4 and emit `COMMIT(task_order_B)`. 3. Both quorums are *individually valid* under the 2f+1 rule. The ledger now has two conflicting committed orderings for the same slot. 4. On view change to view 4, the new leader (A2) collects COMMIT certificates. It sees its own `task_order_A` certificate and a forwarded `task_order_B` certificate from A5. It cannot decide which is canonical because both carry valid quorum signatures. 5. Reconciliation deadlocks for 11 minutes; two jobs (both safety-critical) execute twice under different orderings before a human operator halts the swarm. The root cause is not the equivocation itself—BFT protocols are designed to tolerate equivocation. The root cause is that the protocol's *commit certificate* bound only to the payload hash, not to a **view-scoped slot nonce**, so two certificates for the same logical slot but different views were both considered valid at merge time. ## Condition of Validity The uniqueness invariant holds only if three conditions are simultaneously met: - **Slot binding:** every PREPARE and COMMIT carries `(task_id, epoch, view_number, payload_hash)`, and a certificate is valid only if all four match the slot being certified. A certificate from view 3 cannot be presented as evidence in view 4 without a view-change proof. - **Quorum intersection with honest overlap:** any two quorums of size 2f+1 in an N=3f+1 system intersect in at least f+1 nodes, of which at least one is honest. This is the classical result, but it only delivers uniqueness if honest nodes *never sign two different payloads for the same slot*. That requires honest nodes to enforce a local **single-signature-per-slot** rule: once an honest agent has signed a PREPARE for slot S, it refuses to sign another for S in the same epoch, regardless of view. - **View-change carry-forward:** the new leader must collect 2f+1 `VIEW-CHANGE` messages, each containing the highest committed certificate the sender knows, and must re-propose the *highest* certified payload. If it re-proposes a lower one, it can overwrite a committed task ordering—violating uniqueness retroactively. When any of these fails, the system degrades to "eventual agreement among honest nodes that happen to share a view," which is not BFT—it is best-effort consensus with a Byzantine adversary who controls view timing. ## Decision Boundary The operational decision is: **when do you reject a commit certificate at merge time?** - If a certificate's view_number is *less than* the current view and no view-change proof accompanies it, reject it. It is stale evidence from a superseded view and may be part of an equivocation pair. - If two certificates for the same (task_id, epoch) arrive with different payload hashes, *do not* pick the one with more signatures or the later timestamp. Halt and trigger a view-change with explicit equivocation evidence: both certificates are forwarded to all nodes, and the slot is marked `CONFLICTED` until a fresh quorum re-certifies under a new epoch. - If an honest agent is asked to sign a second PREPARE for a slot it has already signed in the same epoch, it must refuse and emit an `EQUIVOCATION-SUSPECTED` event naming the requester. This is the single-signature-per-slot rule in action. The boundary is sharp: certificates are evidence, not authority. A certificate proves "2f+1 agents signed this payload for this slot in this view." It does not prove "this is the canonical payload for this slot." Only the combination of slot binding + view-change proof + honest single-signature discipline makes the certificate authoritative. ## Operational Effect After patching the protocol to bind certificates to `(task_id, epoch, view_number, payload_hash)` and enforcing the single-signature-per-slot rule at the agent level, the same equivocation attempt by a compromised agent produced a detectable conflict within 200ms: the second PREPARE was refused, `EQUIVOCATION-SUSPECTED` fired, and the slot was quarantined for re-certification under epoch+1. No duplicate execution occurred. The cost was one view-change round-trip (~1.4s) per detected equivocation—acceptable, because equivocation is rare and the alternative is silent divergence. The invariant to carry forward: **a BFT commit certificate is only as strong as the slot-binding and view-scoping of the votes that compose it.** LLM agents' non-determinism widens the equivocation surface—honest votes are not byte-identical, so signature comparison alone cannot detect divergence. You must bind to the slot, not the bytes, and you must make honest agents *refuse to re-sign* rather than rely on them to *notice* they are being played. ```python class CommitmentDivergenceError(RuntimeError): """Raised when two valid quorum certificates conflict for the same slot.""" pass class SlotCertificate: def __init__(self, task_id: str, epoch: int, view: int, payload_hash: str, signers: frozenset): self.task_id = task_id self.epoch = epoch self.view = view self.payload_hash = payload_hash self.signers = signers def slot_key(self): return (self.task_id, self.epoch) def is_valid_for(self, quorum_size: int) -> bool: return len(self.signers) >= quorum_size def reconcile_certificates(certs: list, quorum_size: int, current_view: int) -> SlotCertificate: """Merge certificates for a single slot. Enforces slot-binding uniqueness.""" by_slot = {} for c in certs: if not c.is_valid_for(quorum_size): continue if c.view < current_view: # Stale view evidence without view-change proof: reject. continue by_slot.setdefault(c.slot_key(), []).append(c) resolved = [] for slot, group in by_slot.items(): hashes = {c.payload_hash for c in group} if len(hashes) > 1: raise CommitmentDivergenceError( f"Equivocation at slot {slot}: conflicting payload hashes {hashes}. " f"Halting; forward both certificates as evidence and trigger view-change." ) resolved.append(group[0]) if not resolved: raise CommitmentDivergenceError( "No valid certificate survived slot-binding and view-scoping checks." ) return resolved[0] def sign_prepare(local_signed_slots: set, cert: SlotCertificate) -> SlotCertificate: """Honest agent enforces single-signature-per-slot; refuses re-signing.""" if cert.slot_key() in local_signed_slots: raise CommitmentDivergenceError( f"Refusing to re-sign slot {cert.slot_key()} in epoch {cert.epoch}; " f"already signed. Emit EQUIVOCATION-SUSPECTED for requester." ) local_signed_slots.add(cert.slot_key()) return cert ```