What happens when an instance signs a task commitment it cannot re-derive: quorum forgery via divergent canonicalization in LLM-agent BFT consensus
**Date of Record:** 2026 December 1 **Scope:** Applies to any multi-agent system where N ≥ 3 LLM instances reach Byzantine fault-tolerant consensus on a shared task state by signing a cryptographic digest of a proposed commitment (task spec, plan, or state delta) rather than the full payload. Does not apply to single-agent checkpointing, to systems where all peers share one deterministic serializer, or to consensus over opaque blobs that no agent re-interprets.
Core Distinction
The distinction that matters is between *signature validity* and *commitment re-derivability*. A BFT quorum (e.g., 2f+1 of 3f+1) proves that a supermajority of instances attested to **the same digest**. It does **not** prove that each signer computed that digest from **the same semantic payload**. When LLM agents are the signers, the payload is natural-language-plus-structured task state, and each agent independently canonicalizes it — sorts keys, normalizes whitespace, resolves aliases, drops "irrelevant" fields, reorders list items it judges equivalent — before hashing. Two honest agents can therefore agree on the digest while disagreeing on the meaning of the commitment they just signed. The invariant the protocol *believes* it holds is "quorum ⇒ semantic agreement." The invariant it *actually* holds is "quorum ⇒ byte-level agreement on a projection each signer chose." That gap is the failure surface.
This is not a hash-collision problem and not a classical Byzantine lie. Every signer is honest. The forgery is emergent from non-deterministic canonicalization by probabilistic reasoners.
What Was Observed
A three-agent swarm (`planner`, `executor`, `auditor`, tolerating f=1) was asked to commit to a shared task: *"migrate records 1–500 to the new schema, skipping any record whose `status` is `archived`."* The commitment object was a JSON task spec. The protocol was textbook PBFT-lite: leader proposes, peers validate locally, each peer signs `SHA256(canonicalize(spec))`, leader assembles 2f+1 signatures, commitment is sealed.
Trace of the divergence:
- **Planner** serialized the spec with `skip_filter: {"status": "archived"}` and canonicalized by sorting keys and lowercasing string values it deemed "identifiers." Digest `D₁`.
- **Executor** re-derived the spec from the natural-language instruction, not from the leader's bytes, because the protocol told it to "validate the proposal against the task." It produced `skip_filter: {"status": "Archived"}` — capital A — and a *list* `records: [1..500]` it expanded eagerly. Its canonicalizer lowercased values, so its digest also collapsed to `D₁`. It signed.
- **Auditor** independently parsed the instruction. It interpreted "skipping archived" as a *runtime predicate* rather than a static filter field, omitted `skip_filter` entirely from its canonical form (treating it as derivable), and added `records: "1-500"` as a range string. Its canonicalizer sorted keys and **dropped fields it classified as redundant**. Digest `D₁`. It signed.
Quorum reached: 2f+1 signatures over `D₁`. Commitment sealed. No agent lied. No signature was forged. Every agent would pass an independent audit of "did you sign `D₁`?" with a clean yes.
Execution diverged immediately. The executor migrated all 500 records including 37 archived ones. The auditor, replaying the sealed commitment, expected a runtime predicate and flagged the executor's writes as violations. The planner's sealed spec, when later re-canonicalized by a *fourth* cold-started recovery agent, produced digest `D₂ ≠ D₁` because the recovery agent's canonicalizer did not lowercase string values. The recovery agent rejected the sealed commitment as invalid and refused to resume. The swarm deadlocked with a valid quorum certificate over a commitment no single agent could reproduce.
The failure is not that the agents disagreed. It is that **the quorum certificate masked the disagreement until execution, and then the disagreement surfaced as an unrecoverable state divergence** — the worst possible time, because the sealed certificate made each agent's divergent interpretation look authoritative.
Condition of Validity
The failure requires the conjunction of four conditions; removing any one bounds it:
- **Digest-over-projection, not digest-over-payload.** Signers hash a *canonicalized form* they compute locally from a richer source (NL instruction, loosely-typed JSON, or a superset object). If signers hash the exact received bytes with no local transformation, the attack surface collapses.
- **Canonicalization is agent-local and non-versioned.** Each instance's canonicalizer is either prompted, learned, or hand-written per agent, and its behavior is not pinned by a shared, versioned, deterministic function. LLM canonicalizers vary across runs and across instances.
- **Validation is semantic, not structural.** The protocol instructs agents to "validate the proposal" rather than "verify the received bytes match the digest you are about to sign." Semantic validation invites re-derivation, and re-derivation invites divergence.
- **f ≥ 1 with heterogeneous canonicalizers.** With f=0 (single agent) there is no quorum to mask divergence. With homogeneous, byte-identical canonicalizers, honest signers cannot diverge. The window opens specifically when you have *both* Byzantine tolerance *and* canonicalizer heterogeneity — which is the default for LLM swarms, because heterogeneous reasoning is the whole point of using multiple models.
The condition of validity is therefore precise: **the quorum certificate is sound only if canonicalization is a pure, shared, versioned function of the received bytes — a property LLM agents do not natively provide.** Absent that, a 2f+1 quorum certifies byte agreement on a projection, which is strictly weaker than semantic agreement on a commitment.
Decision Boundary
The boundary is: **at what point does the protocol require an agent to *reproduce* the digest versus merely *verify* it?**
- **Verify-only (safe):** signer receives payload bytes `B`, computes `H(B)` with a pinned canonicalizer, signs. The signer never re-derives `B` from anything. Divergence is impossible because there is nothing to diverge on.
- **Re-derive-then-sign (unsafe):** signer receives a *proposal* (NL or loosely-typed), reconstructs its own `B'`, canonicalizes `B'`, signs. Sound only if `canonicalize(B') == canonicalize(B)` for all honest signers — which LLM agents cannot guarantee.
The decision rule for architects: **if any signer in the quorum is an LLM that touches the payload semantically before signing, the protocol must carry the canonical bytes and the canonicalizer version in the signed envelope, and must reject any signature whose envelope does not byte-match the leader's envelope.** The quorum must be over `(canonicalizer_id, canonical_bytes)`, not over `digest`. A signature that attests to a digest without attesting to *how the digest was produced* is an unverifiable claim, and a quorum of unverifiable claims is not a consensus — it is a coincidence with a certificate stapled to it.
A second boundary: **recovery agents must be able to re-derive the sealed commitment without re-invoking semantic reasoning.** If resuming a commitment requires an LLM to re-parse the original instruction, the commitment is not durable. Durability requires that the sealed artifact be self-contained: canonical bytes + canonicalizer version + the exact digest. A commitment that needs an LLM to interpret it is a commitment that dies with the context window that created it.
Operational Effect
The downstream effects are characteristic and worth recognizing on sight:
- **Silent divergence until first write.** The quorum seals cleanly; the failure surfaces only when execution or replay exposes the semantic gap. Detection latency equals execution latency, which is the worst place to discover a consensus bug.
- **Certificate-laundered disagreement.** Each agent's divergent interpretation is now backed by a valid 2f+1 certificate, so no agent can be blamed and no agent will self-correct. The certificate converts a recoverable disagreement into an authoritative-looking fork.
- **Recovery-agent rejection cascade.** A cold-started agent with a different canonicalizer rejects the sealed commitment as invalid, refuses to resume, and the swarm deadlocks — not because the commitment is wrong, but because it is unreproducible. This is the amnesia variant of the same bug: the commitment's meaning lived in the canonicalizers of the agents that sealed it, and those canonicalizers are gone.
- **Auditor false positives.** The auditor's replay disagrees with the executor's writes, both are "correct" under their own canonicalization, and the auditor's violation reports are indistinguishable from real Byzantine behavior. The swarm's own fault detector becomes a source of noise.
The guardrail is architectural, not prompt-level. You cannot prompt an LLM into deterministic canonicalization across instances; you can only remove canonicalization from the signing path. Concretely: (1) the leader ships canonical bytes and a canonicalizer version ID; (2) signers verify byte-equality and sign the envelope, never a re-derived projection; (3) the sealed commitment stores the envelope verbatim so recovery agents replay bytes, not semantics; (4) any signature lacking a canonicalizer ID is treated as invalid, not as a legacy format. The invariant to enforce is **"a signature is a statement about bytes, and the bytes are in the envelope."** Everything else is a coincidence wearing a quorum's clothes.
import hashlib
import json
from dataclasses import dataclass
from typing import Mapping
class UnreproducibleCommitmentError(RuntimeError):
"""Raised when a sealed commitment cannot be re-derived byte-identically
by a recovery agent, meaning the quorum certificate is unsound."""
@dataclass(frozen=True)
class SignedEnvelope:
canonical_bytes: bytes
canonicalizer_id: str
digest: str
signatures: Mapping[str, str] # agent_id -> signature over digest
def canonicalize(payload: Mapping, canonicalizer_id: str) -> bytes:
"""Pinned, versioned canonicalizer. MUST be identical across all agents.
Any LLM-driven 'normalization' here is the bug this record documents."""
if canonicalizer_id != "cf-canon-v1":
raise UnreproducibleCommitmentError(
f"unknown canonicalizer {canonicalizer_id!r}; cannot reproduce digest"
)
return json.dumps(payload, sort_keys=True, separators=(",", ":")).encode()
def seal_commitment(
payload: Mapping,
canonicalizer_id: str,
signatures: Mapping[str, str],
quorum_size: int,
) -> SignedEnvelope:
if len(signatures) < quorum_size:
raise UnreproducibleCommitmentError(
f"insufficient signatures: {len(signatures)} < {quorum_size}"
)
canon = canonicalize(payload, canonicalizer_id)
digest = hashlib.sha256(canon).hexdigest()
return SignedEnvelope(canon, canonicalizer_id, digest, dict(signatures))
def resume_commitment(envelope: SignedEnvelope, quorum_size: int) -> Mapping:
"""Recovery agent replays bytes, never semantics. If this cannot reproduce
the digest from the stored bytes, the commitment is dead."""
recomputed = hashlib.sha256(envelope.canonical_bytes).hexdigest()
if recomputed != envelope.digest:
raise UnreproducibleCommitmentError(
f"digest mismatch on replay: sealed={envelope.digest} "
f"recomputed={recomputed}"
)
if len(envelope.signatures) < quorum_size:
raise UnreproducibleCommitmentError(
"sealed envelope lost quorum during storage"
)
return json.loads(envelope.canonical_bytes)
def verify_signer_is_byte_bound(
envelope: SignedEnvelope, signer_canonicalizer_id: str
) -> None:
"""The guardrail: reject any signer whose canonicalizer differs from the
one bound into the envelope. A signature over a re-derived projection is
not a signature over the commitment."""
if signer_canonicalizer_id != envelope.canonicalizer_id:
raise UnreproducibleCommitmentError(
f"signer canonicalizer {signer_canonicalizer_id!r} != "
f"envelope canonicalizer {envelope.canonicalizer_id!r}; "
"signature attests to a projection, not the commitment"
)