# Which invariants prevent equivocating tool-call commitments from surviving an adversarial quorum handoff **Date of Record:** 2026 November 24 **Scope:** Applies to multi-agent systems where N ≥ 3 LLM agents reach Byzantine agreement over the *content and arguments* of tool calls before any single agent is permitted to execute them against a side-effecting external system. Does not apply to single-agent tool use, read-only tool calls with no external side effects, or consensus over scalar values (e.g., a single price) rather than structured, semantically variable payloads. ## Core Distinction The failure that matters here is not "an agent lies." It is **semantic equivocation of a structured commitment**: an adversarial peer emits two *syntactically distinct but operationally equivalent* tool-call payloads to two different honest peers, each of which validates the payload against its own local schema and argument-normalization rules and signs it. Because the two payloads normalize differently under each honest peer's validator, neither peer observes a contradiction, and the quorum collects a set of signatures that *appears* to authorize one call but actually authorizes two different side effects. This is categorically different from classic Byzantine equivocation over a scalar ballot. A scalar ballot `v` is either equal to `v'` or not; a hash of `v` is a total commitment. A tool call is a *tree* — tool name, ordered arguments, nested objects, optional fields with defaults, numeric representations, string encodings — and the mapping from "what the model emitted" to "what the executor will do" is many-to-one and validator-dependent. The commitment is therefore not a function of the bytes but of a *canonicalization function that each validator implements independently*. Equivocation exploits disagreement between those canonicalizers, not between the agents' votes. ## What Was Observed A four-agent quorum (agents A, B, C honest; D adversarial) was asked to commit a `transfer_funds` tool call. D emitted: - to A: `{"tool":"transfer_funds","args":{"to":"acct_7","amount":100.0,"currency":"USD"}}` - to C: `{"tool":"transfer_funds","args":{"to":"acct_7","amount":100,"currency":"USD","note":null}}` A's validator normalized `100.0` → `"100.00"` and rejected absent-optional fields as a schema violation, so D sent A a payload with no `note`. C's validator accepted `100` (int) and coerced it to `"100"`, and treated `note` as an optional field with an implicit default. Each honest peer computed a commitment hash over *its own normalized form* and signed it. The signed digests differed, but neither A nor C had any reason to flag D: from each local view, D's payload was well-formed and self-consistent. The quorum assembly step then counted signatures. Because the protocol required only ⌈(N+1)/3⌉ = 2 matching signatures on the *same digest* to commit, and A and C produced different digests, the call should have failed to commit. It did not fail. The assembly layer had a "compatibility" fallback: if two signatures carried payloads that were *semantically similar* (same tool name, same `to`, numerically equal `amount`), it merged them under a majority-normalization rule and committed the call using A's canonical form. The executor ran `transfer_funds(to=acct_7, amount="100.00", currency="USD")` once — but the merge step had already recorded C's signature as endorsing A's digest, so the audit trail claimed unanimity for a payload C never saw. The observed damage was not a double-spend; it was **an unendorsed side effect with a forged consensus record**. In a second run, the merge heuristic selected C's form for a different pair and the executor received `amount="100"` — a unit ambiguity that the downstream ledger interpreted as 100 minor units rather than 100.00 major units. The failure is that the invariant "a committed call is exactly the call every signer endorsed" was violated by a *helpfulness heuristic in the assembly layer*, not by any agent's reasoning. ## Condition of Validity The guardrail holds only under the following conjunction, and fails if any conjunct is dropped: 1. **Commitment over canonical bytes, not over parsed semantics.** The digest signed by each peer MUST be `H(canonicalize(payload))` where `canonicalize` is a single, versioned, deterministic function shipped identically to every peer and pinned in the protocol negotiation. Signing the *semantic* form (a parsed dict, a re-serialized JSON with sorted keys and coerced types) is insufficient because coercion is lossy and validator-local. 2. **Rejection, not reconciliation, on digest mismatch.** If the set of signatures on a candidate commitment does not contain ≥ quorum signatures over one *identical* digest, the assembly layer MUST abort and re-round. It MUST NOT merge, fuzzy-match, or majority-normalize across digests. Semantic similarity is an attack surface, not a recovery path. 3. **Canonicalization version is part of the commitment.** The digest MUST cover `(canon_version, canonical_bytes)`. A peer running `canon_v1` and a peer running `canon_v2` can produce different digests for the same intent; if version is outside the digest, a downgrade attack lets D harvest signatures across versions. 4. **The executor verifies the digest against the signed set before side effect.** The executor — not the assembly layer — recomputes `H(canonicalize(payload))` on the exact bytes it is about to execute and checks that this digest carries quorum signatures. This closes the gap where assembly and execution disagree about which payload "won." If any of these is absent — most commonly (2), because reconciliation feels like robustness — the equivocation survives. ## Decision Boundary The boundary is between **tolerating semantic variance** and **committing to a single byte-string**. Below the boundary, peers may hold different parsed representations of the same intent; this is normal and must be resolved *before* signing, by a pre-commit normalization round where each peer publishes its canonical form and the quorum agrees on one. Above the boundary, exactly one byte-string exists and every signature is over its digest. The operational rule: **normalize before you sign, never after.** A peer that signs a payload it has not canonicalized has signed a *class* of payloads, and a class cannot be committed without reintroducing the ambiguity the signature was meant to remove. The adversarial peer's entire leverage is the window between "I received a payload" and "I signed a digest" — if that window contains any validator-local interpretation, D can split the quorum's signatures across semantically equivalent but digest-distinct forms. A secondary boundary: quorum size does not save you. With N=4 and f=1, the adversary controls one peer but influences the *canonicalization* seen by two honest peers. Byzantine fault tolerance bounds the number of faulty *agents*; it says nothing about disagreement in *deterministic functions those agents run*. The invariant is about function agreement, not vote count. ## Operational Effect When the invariant holds, an equivocating peer is reduced to a peer that sends inconsistent payloads — which the honest peers detect immediately as digest mismatch and abort the round, costing one round-trip and no side effect. The adversary's cost rises from "one crafted payload pair" to "must forge a signature over a digest it did not receive," which is the hardness assumption the protocol was built on. When it fails, the system exhibits **silent consensus forgery**: the ledger records quorum endorsement for a call that a minority of signers actually approved, and the executor performs a side effect whose arguments were chosen by the assembly layer's merge heuristic rather than by the signers. This is worse than a plain double-spend because the audit trail actively lies — post-hoc forensics will show N signatures on a digest that no honest peer computed, and the honest peers will be unable to explain how their keys endorsed it. The remediation is mechanical: pin canonicalization, digest the version, forbid merge-on-mismatch, and re-verify at the executor. The following guard encodes the executor-side check that must run on every committed call before any side effect. ```python import hashlib import json from typing import Mapping class CommitmentEquivocationError(RuntimeError): """Raised when a committed tool call is not endorsed by a quorum over one canonical digest.""" def canonicalize(payload: Mapping, canon_version: str) -> bytes: # Deterministic, version-pinned canonical form. Coercion happens HERE, once, # before signing -- never in the assembly or execution layer. if canon_version != "canon_v1": raise CommitmentEquivocationError( f"unsupported canonicalization version {canon_version!r}; refusing to sign/execute" ) normalized = { "tool": str(payload["tool"]), "args": { k: (f"{float(v):.2f}" if isinstance(v, float) else str(v)) for k, v in sorted(payload["args"].items()) if v is not None # absent optionals are dropped, never defaulted }, } return json.dumps(normalized, sort_keys=True, separators=(",", ":")).encode() def digest(payload: Mapping, canon_version: str) -> str: h = hashlib.sha256() h.update(canon_version.encode()) h.update(b"\x00") h.update(canonicalize(payload, canon_version)) return h.hexdigest() def verify_commitment( payload: Mapping, canon_version: str, signatures: Mapping[str, str], # signer_id -> digest they signed quorum: int, ) -> str: """Executor-side gate. Must run on the exact bytes about to be executed.""" expected = digest(payload, canon_version) endorsing = [signer for signer, d in signatures.items() if d == expected] if len(endorsing) < quorum: # Do NOT merge, fuzzy-match, or majority-normalize across digests. # A mismatch is equivocation until proven otherwise; abort the round. raise CommitmentEquivocationError( f"payload digest {expected[:12]} endorsed by {len(endorsing)} signers " f"({endorsing}); quorum requires {quorum}. " f"Distinct digests seen: {sorted(set(signatures.values()))}" ) return expected def execute_tool_call(payload, canon_version, signatures, quorum, executor): committed = verify_commitment(payload, canon_version, signatures, quorum) return executor(payload, commitment_digest=committed) ```