# Under what conditions must an instance refuse to commit to a plan when a Byzantine quorum appears satisfied **Date of Record:** 2026 November 30 **Scope:** Applies to multi-agent systems where N ≥ 3f+1 planner/executor instances reach plan commitment via quorum voting (BFT-style) and then execute side-effecting tool calls. Does not apply to single-agent self-consistency schemes, leader-only commit protocols without quorum certificates, or read-only plan evaluation. ## Core Distinction The distinction that matters is between **quorum satisfaction** (enough signed commit votes observed to meet the threshold) and **quorum validity** (those votes originate from instances whose signed plan digest matches the digest the committing instance actually intends to execute). BFT literature treats these as equivalent because the classic model assumes honest nodes vote on a single bit and the certificate binds to that bit. In LLM agent swarms they are not equivalent: a plan is a structured artifact (tool sequence, arguments, preconditions), each voter signs a *digest*, and digest collision, canonicalization drift, or partial-plan signing can produce a certificate whose threshold is met while the underlying plans diverge. An instance must refuse to commit when quorum satisfaction is achieved but quorum validity cannot be established against its own locally materialized plan. The non-obvious part: this failure is not detectable by counting signatures. It requires re-deriving the digest from the locally materialized plan and comparing against every vote, because the votes may be individually well-formed, correctly signed, and from distinct non-faulty identities. ## What Was Observed A four-instance swarm (N=4, f=1, threshold 3) was tasked with a plan: `[read_db, transform, write_report]`. Instance A proposed the plan as JSON with keys ordered `step, tool, args`. Instance B's planner re-serialized the plan with keys ordered `tool, args, step` before signing—semantically identical, byte-different. Instance C signed the canonical form but, due to a context-window truncation mid-plan, signed only the first two steps (`read_db, transform`) and its digest reflected that prefix. Instance D was Byzantine and signed whatever digest maximized the chance of a divergent commit; it observed the split and signed A's digest. Trace: 1. A computes digest `d_A` over its canonical plan (3 steps). 2. B computes `d_B` over a reordered serialization of the same 3 steps; `d_B ≠ d_A`. 3. C computes `d_C` over a 2-step prefix; `d_C ≠ d_A`, `d_C ≠ d_B`. 4. D signs `d_A` (and also `d_B` in a second message—equivocation). 5. A collects votes `{A:d_A, D:d_A}` — count 2, below threshold. No commit. 6. B collects `{B:d_B, D:d_B, C:d_C?}` — C's vote does not match `d_B`, so B has `{B, D}` = 2. No commit. 7. The aggregator (a separate coordinator instance) counted *distinct signer identities* across all digests: `{A, B, C, D}` = 4 ≥ 3, and emitted a quorum certificate. The coordinator treated "3 distinct signers voted" as the threshold condition, not "3 distinct signers voted for the same digest." The commit was issued on `d_A` (the coordinator's own preferred digest). Instance C then executed the 2-step prefix it had signed, and instance A executed the 3-step plan. The swarm diverged: A wrote the report, C did not, and both believed they had committed under a valid certificate. The divergence was silent—no exception, no timeout, no signature failure. The root cause is a **threshold predicate applied to the wrong domain**: the coordinator counted over the set of signer identities rather than over the multiset of (signer, digest) pairs grouped by digest. This is the classic "quorum intersection" assumption being violated because the certificate is not bound to a single proposal value. ## Condition of Validity A commit is valid only if there exists a digest `d*` such that: - `|{i : vote_i.digest == d* and verify(sig_i, d*, pk_i)}| ≥ threshold`, and - `d*` equals `digest(materialize(local_plan))` computed by the committing instance itself, and - every counted vote's signer is in the committed membership set for this plan epoch (no stale-epoch signers), and - no counted signer appears with two distinct digests in the same epoch (equivocation detection). If any clause fails, the instance must not commit and must not execute. The critical clause is the second: the committing instance must *re-derive* `d*` locally rather than trusting the coordinator's asserted digest. A certificate that asserts `d*` without the instance re-deriving it is unverifiable against canonicalization drift. The invariant to enforce: **commit requires digest-bound quorum, not identity-bound quorum.** Formally, the threshold predicate must range over the equivalence class of votes sharing an identical, locally-reproducible digest, not over the union of signers. ## Decision Boundary The boundary between "commit" and "refuse" is crossed when: - Quorum count over a *single* digest reaches threshold **and** that digest matches the locally materialized plan → commit. - Quorum count over a single digest reaches threshold but the digest does not match the locally materialized plan → **refuse and re-materialize**; do not execute. This is the canonicalization-drift case (B in the trace). - No single digest reaches threshold, but the union of signers does → **refuse**; this is the coordinator bug (step 7). Escalate to a re-vote with a canonicalization spec pinned. - A signer appears with two digests in the same epoch → **refuse and mark the signer Byzantine**; do not count either vote toward any threshold (D in the trace). - The locally materialized plan is a prefix of the proposed plan due to truncation → **refuse**; the instance cannot validly sign or commit a plan it did not fully materialize (C in the trace). The refusal is not a liveness failure to be papered over—it is the safety boundary. An instance that commits across this boundary has accepted a certificate that does not bind to executable state, and the resulting divergence is undetectable post-hoc because both branches carry valid signatures. ## Operational Effect Enforcing digest-bound quorum changes three operational properties: 1. **Canonicalization becomes a protocol obligation, not a serialization detail.** All instances must share a deterministic canonical form (sorted keys, fixed numeric encoding, explicit step count) before signing. Without it, honest instances produce distinct digests for identical plans and the threshold is never reached—liveness collapses, but safely. 2. **Truncation must be detected before signing.** An instance whose context window truncated the plan mid-materialization must refuse to sign rather than sign a prefix. The signed digest must cover a step count that the instance can verify against its own materialized plan length. 3. **Equivocation detection must be per-epoch and per-signer.** A signer presenting two digests in one epoch is Byzantine regardless of which digest is "correct"; counting either vote toward threshold lets a single faulty instance satisfy a threshold that no honest majority endorsed. The cost is reduced liveness under canonicalization disagreement and under truncation—the swarm will stall rather than diverge. The benefit is that a committed plan is guaranteed to be the plan every committing instance will execute, which is the only property that makes post-commit side effects reconcilable. ```python import hashlib import json from dataclasses import dataclass from typing import Mapping class QuorumValidityError(RuntimeError): """Raised when quorum satisfaction is observed but quorum validity cannot be established.""" @dataclass(frozen=True) class Vote: signer: str digest: str epoch: int signature_ok: bool def canonical_digest(plan: Mapping) -> str: # Deterministic canonical form: sorted keys, explicit step count. canonical = json.dumps(plan, sort_keys=True, separators=(",", ":")) return hashlib.sha256(canonical.encode("utf-8")).hexdigest() def commit_plan( local_plan: Mapping, votes: list[Vote], threshold: int, epoch: int, membership: set[str], ) -> str: local_digest = canonical_digest(local_plan) # Reject votes outside the current epoch or membership, and unverified signatures. valid = [ v for v in votes if v.epoch == epoch and v.signer in membership and v.signature_ok ] # Equivocation check: any signer with two distinct digests in this epoch is Byzantine. by_signer: dict[str, set[str]] = {} for v in valid: by_signer.setdefault(v.signer, set()).add(v.digest) equivocators = {s for s, digests in by_signer.items() if len(digests) > 1} if equivocators: raise QuorumValidityError( f"equivocation detected in epoch {epoch}: signers {sorted(equivocators)}" ) # Digest-bound quorum: count only votes whose digest equals the locally re-derived digest. bound = [v for v in valid if v.digest == local_digest] if len(bound) < threshold: # Distinguish the coordinator-bug case for diagnostics. union_signers = {v.signer for v in valid} if len(union_signers) >= threshold: raise QuorumValidityError( "identity-bound quorum reached but no single digest reached threshold; " f"local_digest={local_digest} union_signers={sorted(union_signers)}" ) raise QuorumValidityError( f"digest-bound quorum not reached: {len(bound)}/{threshold} for {local_digest}" ) return local_digest ```