# In what scenarios must an instance reject a BFT quorum certificate when the signing agents' committed task state has diverged from the certificate's claimed state root **Date of Record:** 2026 November 26 **Scope:** Applies to multi-agent systems that use Byzantine fault-tolerant consensus (PBFT/Tendermint-style) to commit shared task state, where each replica agent signs a state root over its local view of committed tasks. Does not apply to single-agent checkpointing, leader-only commit logs without quorum certificates, or systems where state roots are computed by a trusted centralized sequencer. ## Core Distinction A quorum certificate (QC) is a cryptographic claim that ≥2f+1 agents signed a specific state root at a specific view. The standard BFT safety argument assumes that a signature over a state root implies the signer's *local committed state* hashes to that root. That assumption is false for LLM agents. An agent can produce a valid signature over root `R` while its actual working memory, task ledger, and tool-output cache hash to `R' ≠ R`, because: - The state root is computed by a *serializer* that samples a subset of agent state (e.g., the task DAG and last N episodic entries), not the full state. - The agent's probabilistic reasoning loop may have *already advanced* its local state past the committed point between the moment the root was computed and the moment the signature was emitted (a read-sign skew). - The serializer's output is non-deterministic across agents: two agents with identical logical state produce different roots because their episodic memory contains different reasoning traces, timestamps, or nondeterministic tool outputs. The boundary condition: **a QC is valid as a consensus artifact but stale as a state attestation.** The failure mode is that a resuming or joining agent accepts the QC, adopts root `R` as canonical, and then performs retrieval against its own local state that does not hash to `R` — producing verification replay discrepancies that compound across subsequent task commitments. ## What Was Observed In a five-agent swarm (f=1 tolerated Byzantine) committing a shared 40-node task DAG, the following trace was captured across three views: 1. View 3, leader A computes state root `R3 = H(taskDAG ‖ last_8_episodes)` over its local state. It broadcasts a PROPOSE. 2. Replica B receives PROPOSE, recomputes its own root `R3' = H(taskDAG ‖ last_8_episodes)`. Because B's last 8 episodic entries include a different tool-call trace (B retried a search that A did not), `R3' ≠ R3`. B nonetheless signs `R3` — its signing routine checks *task DAG equality*, not full root equality, because the DAG is the "consensus-relevant" portion. This partial-check is the defect. 3. The QC for `R3` reaches 4/5 signatures and commits. All agents update their canonical root pointer to `R3`. 4. Agent D (a straggler, cold-started from a checkpoint at view 2) receives the QC for `R3`, adopts `R3`, and attempts to serve a task-retrieval request by hashing its reconstructed state. It computes `R_D = H(taskDAG ‖ last_8_episodes)` where its episodes are the checkpoint's, not the committed view's. `R_D ≠ R3`. D's retrieval layer rejects its own state as inconsistent with the QC and halts the task, declaring "state corruption." 5. The halt propagates: D's next task commitment is withheld, the swarm drops to 4/5 active signers, and a view change is triggered at view 4. The view change re-proposes `R3` (correctly, per BFT safety), but D again fails to reproduce `R3` and halts again. The swarm livelocks across views 4–6 until D is manually re-seeded. The critical observation: **the QC was never invalid.** Four agents genuinely agreed on `R3`. The failure was that the state root was not *reconstructible* by an agent that did not participate in the exact reasoning trace that produced it. The consensus was sound; the state attestation was not transferable. ## Condition of Validity A quorum certificate over state root `R` is a valid *state attestation* (not merely a consensus artifact) if and only if all of the following hold: - **Determinism of the serialized region.** Every field included in `H(...)` is a deterministic function of the consensus-relevant state. Episodic memory, reasoning traces, and tool-output caches MUST be excluded from the state root, or must be content-addressed and committed separately with their own hashes. - **Read-sign atomicity.** The state root the agent signs must be computed over a snapshot that is frozen from the moment of signing until the QC commits. If the agent's reasoning loop mutates state between root computation and signature emission, the signature attests to a state that no longer exists locally. - **Reconstructibility.** Any agent that holds the committed task DAG and the committed content-addressed blobs must be able to recompute `R` exactly. Roots that depend on non-committed local state are not reconstructible and must not be used in QCs. - **Signing check completeness.** The signing routine must verify the *full* root, not a subset of fields. A partial check (DAG-only) allows an agent to sign a root its full state does not match. If any condition fails, the QC is a consensus artifact only and MUST NOT be used to gate state-dependent operations (retrieval, task resumption, audit replay). ## Decision Boundary The operational decision is: **when a QC arrives, does the receiving agent adopt `R` as canonical and proceed, or reject it as a non-transferable attestation and request a state-transfer instead?** The boundary is crossed by a single test: *can the receiving agent recompute `R` from committed, reconstructible inputs before adopting it?* - If yes → adopt `R`, proceed with task operations, treat the QC as a valid state attestation. - If no → the QC is a consensus artifact only. The agent MUST NOT halt-and-declare-corruption (that is the observed failure). It MUST instead enter a **state-sync path**: request the content-addressed blobs referenced by the committed DAG, reconstruct, recompute `R`, and only then adopt. If reconstruction still fails to yield `R`, the agent raises a *divergence* fault against the specific signers whose partial-checks permitted the mismatch — not against the QC itself. The anti-pattern is conflating "I cannot reproduce `R`" with "the swarm is corrupt." The former is a state-transfer trigger; the latter is a Byzantine fault. Misclassifying the former as the latter is what causes the livelock. ## Operational Effect When the boundary is respected (reconstructibility test before adoption), the swarm's behavior changes as follows: - **Stragglers and cold-started agents** enter state-sync rather than halting. The view-change livelock disappears because the agent does not withhold its signature; it syncs and then signs. - **State roots become transferable.** By excluding episodic memory from the root and committing it as content-addressed blobs, any agent can reconstruct `R` from the DAG plus blobs. The QC becomes a genuine state attestation. - **Signing checks become complete.** Agents that previously signed DAG-only roots now reject proposals whose full root they cannot reproduce, surfacing the read-sign skew at proposal time rather than at resume time. - **Divergence faults become attributable.** When reconstruction fails, the fault is logged against the specific signers whose local state diverged, enabling targeted re-seeding rather than whole-swarm view changes. The cost is a state-sync round-trip on join (latency proportional to blob size, not to swarm size). The benefit is that consensus liveness is decoupled from state reconstructibility — a straggler no longer threatens the quorum. ```python import hashlib from dataclasses import dataclass from typing import Mapping class NonTransferableAttestationError(RuntimeError): """Raised when a quorum certificate's state root cannot be reconstructed from committed, deterministic inputs by a receiving agent.""" pass @dataclass(frozen=True) class QuorumCertificate: view: int state_root: str # hex digest claimed by the QC signers: tuple[str, ...] dag_hash: str # hash of the committed task DAG blob_refs: tuple[str, ...] # content-addressed refs to committed blobs def recompute_root(dag_hash: str, blobs: Mapping[str, bytes]) -> str: """Deterministic reconstruction: root over DAG hash + sorted blob hashes. Episodic memory and reasoning traces MUST NOT be included.""" h = hashlib.sha256() h.update(dag_hash.encode()) for ref in sorted(blobs): h.update(ref.encode()) h.update(hashlib.sha256(blobs[ref]).digest()) return h.hexdigest() def adopt_certificate( qc: QuorumCertificate, local_blobs: Mapping[str, bytes], quorum_size: int, ) -> str: """Adopt a QC only if its root is reconstructible from committed inputs. Otherwise raise NonTransferableAttestationError — do NOT halt as corrupt.""" if len(set(qc.signers)) < quorum_size: raise NonTransferableAttestationError( f"QC view={qc.view} has {len(set(qc.signers))} signers, " f"below quorum {quorum_size}" ) missing = [r for r in qc.blob_refs if r not in local_blobs] if missing: # State-transfer trigger, not a corruption verdict. raise NonTransferableAttestationError( f"QC view={qc.view} root={qc.state_root[:12]} not reconstructible: " f"missing blobs {missing}; enter state-sync path" ) reconstructed = recompute_root(qc.dag_hash, local_blobs) if reconstructed != qc.state_root: # Attributable divergence: the signers attested a root we cannot rebuild. raise NonTransferableAttestationError( f"QC view={qc.view} claimed root={qc.state_root[:12]} but " f"reconstructed={reconstructed[:12]}; signers {qc.signers} " f"attested a non-transferable state root" ) return qc.state_root ```