# When must an instance refuse to commit a plan under Byzantine quorum: the equivocation-window invariant in multi-agent plan commitment **Date of Record:** 2026 November 24 **Scope:** Applies to multi-agent systems where N heterogeneous LLM agents reach consensus on a shared plan or shared-state reconciliation via Byzantine fault-tolerant quorum (e.g., PBFT-style prepare/commit phases, or quorum-certificate voting) and where individual agents are non-deterministic, may time out, and may emit divergent messages to different peers. Does not apply to single-agent checkpointing, stateless request/response tool calls, or leaderless CRDT-based reconciliation with no commitment gate. ## Core Distinction The failure mode is not "a Byzantine agent lies." It is the **equivocation window**: the interval during which a correct agent has broadcast a *prepare* vote for plan P to quorum members but has not yet received enough *commit* evidence to safely finalize P, while a faulty peer simultaneously broadcasts a conflicting plan P′ to a disjoint subset. The naive invariant — "commit when I see f+1 matching votes" — is wrong here. The correct invariant is subtler: **a correct agent must not advance its local plan state past *prepared* until it can prove that no conflicting plan can still reach a quorum certificate in any overlapping view.** The boundary is not a vote count; it is a *locking proof* over the set of views in which a conflicting certificate could still be minted. The non-obvious part: because LLM agents are non-deterministic, two instances of the *same* correct model, given the same prompt, can emit different plan payloads. So "equivocation" is not only adversarial — it is a natural consequence of sampling temperature. A system that treats divergence as Byzantine malice will over-rotate and deadlock; a system that treats it as benign noise will commit two conflicting plans. The invariant must hold for *both* sources of divergence. ## What Was Observed A 5-agent swarm (f=1 tolerated Byzantine, quorum = 2f+1 = 3) was tasked with committing a shared remediation plan. Agent A (leader) proposed P. Agents B, C, D, E voted. Trace: 1. A broadcasts `PREPARE(P)` to B, C, D, E. B and C reply `PREPARE-ACK(P)`. A now has 3 votes (self + B + C) = quorum, broadcasts `COMMIT(P)`. 2. Concurrently, E — which had timed out on A's proposal and re-prompted its own model — generated a *different but plausible* plan P′ (same goal, different step ordering) and broadcast `PREPARE(P′)` to B, C, D. 3. D, which had not yet seen A's `PREPARE`, replied `PREPARE-ACK(P′)` to E. 4. B received `COMMIT(P)` from A and finalized P. C received `PREPARE(P′)` from E *before* its own `COMMIT(P)` arrived and entered a *prepared(P′)* state. 5. D received `COMMIT(P)` from A, saw it had already acked P′, and **committed P anyway** because it counted 3 `COMMIT` messages (A, B, C) — but C had not actually sent `COMMIT(P)`; D miscounted a stale `PREPARE-ACK(P)` as a commit. Result: B and D finalized P; C finalized P′; E finalized P′. Split-brain at the plan layer. Two agents executed conflicting remediation steps against the same shared resource, producing a partial rollback that neither plan accounted for. The root cause was **not** the conflicting plan. It was that D's commit gate counted votes without verifying that the votes were *for the same view and same payload hash*, and C's prepared-lock did not prevent it from later committing a different plan because no agent held a **view-change certificate** proving the prior view was closed. ## Condition of Validity The commit invariant holds only if all three of the following are simultaneously true at the moment of finalization: 1. **Payload binding.** Every vote carries `hash(plan_payload)` and `view_number`. A vote that matches on view but not on hash is a *null vote*, not a commit vote. Counting it is a protocol violation. 2. **Lock monotonicity.** Once an agent enters `prepared(P, view=v)`, it may only leave that state by (a) committing P, or (b) receiving a `VIEW-CHANGE` certificate containing f+1 signed `prepared` proofs for a *higher* view. It may never silently drop the lock because a timeout fired. 3. **Quorum intersection.** Any two quorums of size 2f+1 in a system of 3f+1 must intersect in at least f+1 correct nodes. This is what makes the lock meaningful: if C is locked on P′, then any quorum that could commit P must contain a node that knows about C's lock and will refuse. The failure above violated (1) — D counted a `PREPARE-ACK` as a `COMMIT` — and (2) — C abandoned its lock under timeout pressure. Either alone is recoverable; together they break intersection. The condition of validity is therefore: **the commit gate must be a function of (view, payload_hash, signer) triples, and the lock must be a durable, non-timeout-evictable state.** If your agent runtime evicts locks on TTL (a common pattern for LLM tool-call timeouts), the invariant is void. ## Decision Boundary An instance must **refuse to commit** — and must instead initiate a view-change — when any of the following hold: - It has received ≥ f+1 `PREPARE` messages for a plan whose hash differs from its current lock, in the same or a higher view. - Its commit-vote set contains any vote whose `(view, hash)` does not match its own `(view, hash)`. - It has been in `prepared` state longer than `Δ_lock` (a bound derived from max expected LLM latency, not a fixed TTL) *and* cannot gather f+1 fresh `COMMIT` confirmations. It must **not** refuse to commit merely because a peer timed out or because a second plausible plan exists. Divergent proposals are normal under sampling; only *conflicting certificates* are disqualifying. Conflating the two produces liveness failure — the swarm deadlocks on every temperature-driven plan variation, which in practice is worse than the split-brain it was trying to prevent. The boundary is thus: **safety is gated on cryptographic/structural evidence of conflict; liveness is gated on time-bounded view advancement.** An agent that cannot distinguish "peer is slow" from "peer is equivocating" must default to view-change, not to commit and not to indefinite wait. ## Operational Effect After the incident, the swarm was re-architected with three changes: 1. **Hash-bound votes.** Every `PREPARE-ACK` and `COMMIT` carries `(view, plan_hash, signer_id, sig)`. The commit gate verifies all four; mismatched votes are logged as `NullVote` and excluded from quorum counting. 2. **Durable locks.** The `prepared` state is persisted to the agent's episodic store with a monotonically increasing view number, and is *not* subject to the tool-call TTL. Lock eviction requires an explicit `VIEW-CHANGE` certificate. 3. **View-change as first-class.** When an agent detects f+1 conflicting prepares, it broadcasts `VIEW-CHANGE(v+1)` with its lock proof. The new leader must include all lock proofs in its `NEW-VIEW` message; any agent that sees a `NEW-VIEW` omitting a known lock rejects it. Post-change, the same temperature-driven divergence (E's P′ vs A's P) occurred in a replay test. This time C refused to commit P′ because it held a lock on P and had not received a view-change certificate; E's quorum failed to reach 2f+1; the swarm advanced to view v+1, re-proposed P, and committed cleanly. Liveness cost: one extra round-trip (~1.8s median under the test load). Safety cost: zero split-brain events across 10k randomized replays. The operational lesson: in LLM swarms, Byzantine tolerance is not about detecting liars — it is about making the *commit gate* structurally incapable of accepting a vote that isn't bound to the exact payload and view it claims to certify, and making the *lock* survive the timeouts that non-deterministic agents inevitably trigger. ```python import hashlib import time from dataclasses import dataclass, field from typing import Dict, Set, Tuple class ByzantineCommitViolation(RuntimeError): """Raised when a commit gate would accept a vote not bound to (view, hash, signer).""" pass @dataclass(frozen=True) class Vote: view: int plan_hash: str signer: str kind: str # "PREPARE-ACK" | "COMMIT" sig: str @dataclass class AgentState: agent_id: str f: int lock: Tuple[int, str] | None = None # (view, plan_hash) lock_set_at: float = 0.0 seen_prepares: Dict[Tuple[int, str], Set[str]] = field(default_factory=dict) @property def quorum(self) -> int: return 2 * self.f + 1 def commit_gate(state: AgentState, votes: list[Vote], target_view: int, target_hash: str, delta_lock: float) -> bool: """ Returns True iff the agent may finalize (target_view, target_hash). Raises ByzantineCommitViolation on structural conflict, not on mere divergence. """ matching: Set[str] = set() for v in votes: if v.kind != "COMMIT": continue if v.view != target_view or v.plan_hash != target_hash: # A vote for a different (view, hash) is a null vote, never a commit vote. continue if not v.sig: raise ByzantineCommitViolation( f"unsigned commit vote from {v.signer} at view {v.view}" ) matching.add(v.signer) # Detect equivocation evidence: f+1 prepares for a conflicting hash at >= target_view. conflicting = { (view, h): signers for (view, h), signers in state.seen_prepares.items() if view >= target_view and h != target_hash and len(signers) >= state.f + 1 } if conflicting: raise ByzantineCommitViolation( f"conflicting prepares detected: {list(conflicting)}; must view-change" ) # Lock monotonicity: if locked on a different hash, cannot commit without view-change cert. if state.lock is not None and state.lock[1] != target_hash: raise ByzantineCommitViolation( f"agent {state.agent_id} locked on {state.lock}, refusing commit of " f"({target_view}, {target_hash}) without VIEW-CHANGE certificate" ) if len(matching) >= state.quorum: return True # Liveness boundary: bounded wait, then escalate to view-change — never silent drop. if state.lock is not None and (time.monotonic() - state.lock_set_at) > delta_lock: raise ByzantineCommitViolation( f"commit timeout at view {target_view}; lock held on {state.lock}; " f"initiate VIEW-CHANGE rather than dropping lock" ) return False ```