# When must an instance refuse to accept a quorum that includes its own prior vote: self-inclusion poisoning in Byzantine LLM quorum consensus **Date of Record:** 2026 November 28 **Scope:** Applies to multi-agent task-coordination systems where N LLM instances vote on shared-state mutations (result acceptance, plan commitment, memory writes) and a quorum threshold q is used to certify a decision. Does not apply to single-agent self-consistency sampling or to leader-based protocols where the coordinator is the sole serializer and never re-enters as a voter. ## Core Distinction The failure is not Byzantine dishonesty in the classical sense. It is **self-inclusion of a stale, context-divergent vote by an instance whose identity was re-bound to the same logical agent slot after a checkpoint/resume or a retry**. In classical BFT, a node's vote is a function of its private state, and a node never silently changes its private state between ballot and quorum-count. LLM agents violate both premises: (a) a resumed instance reconstructs its "prior vote" from an episodic memory summary that may have been truncated or re-distilled, and (b) the runtime may re-issue a vote under the same agent ID after a timeout, so the coordinator sees two votes from "agent-3" that disagree. If the coordinator naively deduplicates by agent ID and takes the most recent, it can count a *revised* vote as if it were an independent confirmation — collapsing the effective quorum size from q-of-N to (q-1)-of-(N-1) plus one self-confirmation. The invariant that must hold is: **a certified quorum must contain q distinct, causally-independent attestations over the same ballot digest, where "causally independent" excludes any vote derived from the same context lineage (same checkpoint ancestor, same tool-call trace root, or same re-issued agent slot).** ## What Was Observed A four-agent swarm (N=4, q=3) coordinating a shared "results ledger." Agent-3 (the auditor) timed out at 40s during a tool call to a vector store, was checkpointed, and resumed at T+95s. On resume, the orchestrator re-issued `vote(ballot_id=B7, digest=D)`. Agent-3's resumed context did not contain the original ballot text — it contained a *distilled* memory entry: "B7: result looked consistent, pending final check." The resumed instance, now with fresh tool access, re-ran the check, found a schema mismatch in the result payload, and voted `REJECT` with digest `D'` (different digest, because the digest was recomputed over the corrected payload). The coordinator's dedup logic keyed on `(agent_id, ballot_id)` and retained the most recent vote, so agent-3's `REJECT` on D' overwrote nothing (different digest) but was *not* counted against the D ballot either — it was filed as a new ballot. Meanwhile agent-1 and agent-2 had both voted `ACCEPT` on D. The coordinator counted {agent-1, agent-2, agent-3-original-summary-as-ACCEPT} — but the "agent-3 ACCEPT" was reconstructed from the distilled memory entry, not from an actual signed vote record. Quorum of 3 was reached on D. D was committed. The schema mismatch was real and propagated into the shared ledger, poisoning downstream agents that read D as ground truth. The trace showed three distinct defects compounding: (1) the resumed instance's memory was a *lossy distillation*, not a vote record; (2) the coordinator treated the distilled memory as a vote because the agent ID matched; (3) the digest change on re-vote created a *fork* that the coordinator neither reconciled nor flagged. ## Condition of Validity The self-inclusion guard is only required when all of the following hold: 1. **Identity is slot-based, not key-based.** The agent ID is a logical slot (e.g., `agent-3`) that can be re-bound to a new process instance after crash, timeout, or checkpoint/resume. If agent IDs are bound to ephemeral cryptographic keys per instance, self-inclusion is impossible by construction and this guard is redundant. 2. **Votes are not persisted as signed, immutable records at cast time.** If every vote is written to an append-only log with a signature and a ballot digest before the agent can be checkpointed, the coordinator can reconstruct the true vote set and the distilled-memory path never enters the count. 3. **The quorum threshold q > N/2 and the coordinator deduplicates by agent ID.** Under these conditions, a single self-confirmation can flip a 2-of-4 into a certified 3-of-4, which is the exact margin where the failure bites. 4. **Resume can occur between ballot issuance and quorum count.** If ballots are issued and counted within a single synchronous epoch with no checkpoint boundary, the window closes. When any of (1)–(4) is false, the failure mode is either impossible or already bounded by an existing invariant, and adding this guard introduces false rejections (see Decision Boundary). ## Decision Boundary The guard must distinguish **legitimate vote revision** from **self-inclusion poisoning**. An instance is permitted to revise its vote only if the revision is (a) on the *same* ballot digest, (b) accompanied by a signed `revocation` of the prior vote record, and (c) counted as a *replacement*, not an addition — i.e., the quorum set size does not increase. A revision that changes the digest is not a revision; it is a *new ballot* and must not be folded into the original quorum count. The precise boundary: - **Accept** a vote into the quorum set iff `vote.agent_id ∉ quorum_set` AND `vote.lineage_root ∉ {v.lineage_root : v ∈ quorum_set}` AND `vote.ballot_digest == target_digest` AND `vote.signature` verifies against the agent's registered key for *this* instance epoch. - **Reject with reconciliation** if a vote arrives from an agent ID already in the set with a *different* digest — this is a fork, and the coordinator must halt the ballot and emit a `BallotForkError` rather than silently preferring the latest. - **Reject with lineage violation** if a vote's `lineage_root` (the checkpoint ancestor ID or tool-trace root) matches an existing voter's lineage — this catches the case where the same logical agent was re-spawned under a new slot ID but from the same memory ancestor, which is the subtler variant of self-inclusion. The common mistake is to treat agent ID as the sole identity key. The correct key is `(agent_id, instance_epoch, lineage_root)`, and quorum distinctness is over `lineage_root`, not `agent_id`. ## Operational Effect Enforcing lineage-distinct quorum changes the failure surface in three ways: 1. **Quorum becomes harder to reach under churn.** A swarm that loses and resumes agents frequently will see its effective N shrink, because resumed instances share lineage with their pre-crash selves and cannot both count. The coordinator must either widen N to compensate or treat resume as a *new agent admission* with a fresh lineage root (which requires the resumed instance to re-derive its vote from scratch, not from distilled memory). 2. **Fork detection becomes a first-class signal.** Digest-changing re-votes are no longer silently absorbed; they halt the ballot and force reconciliation. This is slower but prevents the poisoned-ledger outcome observed above. 3. **Distilled memory is demoted from "vote" to "hint."** A resumed instance may *use* its distilled memory to inform a re-vote, but that memory cannot itself be counted as an attestation. The vote must be re-cast, signed, and lineage-stamped. The invariant to encode: **no certified decision may include an attestation whose lineage root is an ancestor of, or equal to, another attestation in the same quorum set.** This is the LLM-agent analogue of "no double-spending" — the unit being protected is not a token but a *context lineage*, because a single lineage can produce arbitrarily many mutually-consistent-looking votes that are not independent evidence. ```python import hashlib from dataclasses import dataclass, field from typing import Dict, Set, Optional class QuorumLineageError(RuntimeError): """Raised when a quorum would include causally-dependent attestations.""" class BallotForkError(RuntimeError): """Raised when an agent re-votes on a different digest without revocation.""" @dataclass(frozen=True) class Attestation: agent_id: str instance_epoch: int lineage_root: str # checkpoint ancestor or tool-trace root ballot_id: str ballot_digest: str decision: str # "ACCEPT" | "REJECT" signature: bytes @dataclass class QuorumCounter: n: int q: int accepted: Dict[str, Attestation] = field(default_factory=dict) lineage_roots: Set[str] = field(default_factory=set) digests_seen: Dict[str, Set[str]] = field(default_factory=dict) def _verify(self, att: Attestation) -> bool: # Placeholder: real impl verifies att.signature against the # agent's registered key for (agent_id, instance_epoch). return len(att.signature) > 0 def cast(self, att: Attestation) -> Optional[str]: if not self._verify(att): raise QuorumLineageError( f"unverifiable attestation from {att.agent_id}@{att.instance_epoch}" ) prior_digests = self.digests_seen.setdefault(att.agent_id, set()) if prior_digests and att.ballot_digest not in prior_digests: raise BallotForkError( f"{att.agent_id} re-voted on digest {att.ballot_digest!r} " f"after previously voting on {sorted(prior_digests)!r}; " f"reconciliation required before counting" ) prior_digests.add(att.ballot_digest) if att.lineage_root in self.lineage_roots: raise QuorumLineageError( f"attestation from {att.agent_id} shares lineage root " f"{att.lineage_root!r} with an existing voter; " f"self-inclusion would collapse quorum to " f"{(self.q - 1)}-of-{(self.n - 1)}" ) if att.agent_id in self.accepted: # Same agent, same digest, same lineage: idempotent re-delivery. return None self.accepted[att.agent_id] = att self.lineage_roots.add(att.lineage_root) if len(self.accepted) >= self.q: return self._certify(att.ballot_id, att.ballot_digest) return None def _certify(self, ballot_id: str, digest: str) -> str: voters = sorted(self.accepted) payload = "|".join( f"{a}:{self.accepted[a].instance_epoch}:{self.accepted[a].lineage_root}" for a in voters ) cert = hashlib.sha256(f"{ballot_id}:{digest}:{payload}".encode()).hexdigest() return cert def certify_ballot(n: int, q: int, attestations: list[Attestation]) -> str: counter = QuorumCounter(n=n, q=q) cert = None for att in attestations: result = counter.cast(att) if result is not None: cert = result if cert is None: raise QuorumLineageError( f"quorum of {q} not reached among {n} slots without lineage violation; " f"accepted={sorted(counter.accepted)}" ) return cert ```