# Why does an instance commit to a task it cannot attest: quorum-relative attestation divergence in Byzantine agent consensus **Date of Record:** 2026 November 26 **Scope:** Applies to multi-agent systems where task commitment and result attestation are decided by replicated quorum (BFT-style) consensus among LLM agent instances whose tool outputs are non-deterministic and whose signatures bind to a *view* of results rather than the results themselves. Does not apply to single-agent execution, to centralized orchestrators with a single authoritative ledger, or to deterministic-function swarms where re-execution is bit-identical. ## Core Distinction The failure is not a crash fault, a lying agent, or a lost message. It is a *quorum-relative* invariant violation: an agent instance can honestly commit to a task, honestly attest to a result, and still produce a commitment that no correct future quorum can validate — because the attestation was signed over a *quorum-relative digest* (a hash of "what the majority of my peers reported") rather than over the underlying result bytes. Under a 2f+1 BFT bound with f Byzantine agents, a correct agent's attestation is valid only relative to the quorum that produced it. When the quorum membership or the peer-report multiset shifts between commit time and audit time, the digest changes, the signature verifies against nothing, and the task is *committed but unattestable*. This is distinct from the classic Byzantine "equivocation" attack: no agent is dishonest. The divergence is generated by legitimate non-determinism in tool outputs interacting with quorum-relative hashing. ## What Was Observed A task-commitment protocol with three phases: `PROPOSE` (agent broadcasts intent + task spec), `COMMIT` (agent collects 2f+1 `PREPARE` acks and signs a commitment certificate), `ATTEST` (agent executes, collects 2f+1 peer result-reports, hashes the *sorted multiset of report digests*, signs the attestation). The attestation digest was defined as `H(sort([H(report_i) for i in quorum]))`. Trigger condition: the task's tool calls are non-deterministic (web fetch, model sampling, timestamp-bearing API responses). Two correct agents executing the same task in the same epoch produce report digests `r1 ≠ r2` with probability approaching 1 as output entropy grows. During `ATTEST`, each agent's quorum is a *different subset* of the peer set — agent A's quorum is `{1,2,3}`, agent B's is `{2,3,4}`. The sorted-multiset hash is therefore quorum-relative. Observed trace: 1. Agents A, B, C all reach `COMMIT` on task T with valid certificates. Consensus holds; commitment is sound. 2. A executes, collects reports from `{1,2,3}`, computes `d_A = H(sort([r1,r2,r3]))`, signs `attest(T, d_A)`, transitions to `DONE`. 3. B executes, collects reports from `{2,3,4}`, computes `d_B = H(sort([r2,r3,r4]))`, signs `attest(T, d_B)`. Note `d_A ≠ d_B` even though both quorums are correct and both agents are honest, because the *reported results themselves differ* (non-determinism) and the quorum *membership differs*. 4. An auditor replaying the task later collects reports from `{1,3,4}`, computes `d_audit`, and finds it matches neither `d_A` nor `d_B`. The attestation is unverifiable. The task is committed, "completed," and permanently unattestable. 5. Escalation: the auditor cannot distinguish "honest non-determinism" from "result fabrication" — both present as a digest mismatch. The verification layer either halts (false positive, liveness loss) or accepts any digest (false negative, soundness loss). The invariant that failed: *attestation digests must be quorum-invariant and execution-invariant, or the verification predicate must be defined over a canonicalized result, not over a quorum-relative aggregate.* The protocol conflated "agreement on a result" with "agreement on the hash of a set of reports about a result." ## Condition of Validity The commitment is sound (Byzantine-safe) if and only if all three hold: 1. **Quorum intersection:** any two quorums intersect in ≥ f+1 correct agents (standard BFT requirement — necessary but not sufficient here). 2. **Digest determinism:** the attested digest is a pure function of the canonicalized task result, invariant under quorum membership and under per-agent execution entropy. 3. **Canonicalization agreement:** all correct agents agree on the canonicalization function *before* execution, and canonicalization is idempotent and total over the result domain. The observed system satisfied (1) but violated (2) and (3). (2) failed because the digest was quorum-relative. (3) failed because canonicalization of non-deterministic tool output (e.g., "which of two equally valid JSON key orderings / float roundings / timestamp truncations is canonical") was left implicit and each agent canonicalized differently. The boundary is sharp: *as long as tool outputs are deterministic, quorum-relative hashing is safe* (all reports identical, all quorum hashes identical). The moment any tool in the task's call graph is non-deterministic, quorum-relative attestation becomes unsound, and the failure is silent — it produces a valid-looking signature over a digest that no future quorum can reproduce. ## Decision Boundary The decision boundary is the choice of what the attestation signs over. Three regimes: - **Sign the result bytes (canonicalized):** sound and quorum-invariant, but requires pre-agreed canonicalization and tolerates zero execution entropy — any non-determinism must be *resolved before signing* (e.g., by a designated executor whose output is the attested artifact, with peers attesting to *having verified* that artifact, not to their own re-execution). - **Sign the quorum-relative report multiset (observed failure):** valid only when execution is deterministic. Must be rejected for any task whose call graph contains a non-deterministic tool. This is the boundary the system crossed without detecting it. - **Sign a threshold of independent attestations over a canonical artifact (correct BFT pattern):** executor produces canonical result `R`, peers independently verify `R` and sign `attest(T, H(R))`. Quorum is over *signatures on a fixed digest*, not over *a digest of a multiset*. This restores quorum-invariance: any correct quorum produces the same digest because they all sign the same `H(R)`. The guardrail: the protocol must *classify the task's call graph for determinism before `COMMIT`*, and route non-deterministic tasks exclusively to the canonical-artifact pattern. A task whose determinism class is unknown must be treated as non-deterministic. ## Operational Effect Downstream consequences of the unattestable-commitment state: - **Audit deadlock:** auditors cannot reach 2f+1 agreement on a digest that no quorum can reproduce; the task sits in `COMMITTED` forever, consuming quorum slots and blocking dependent tasks. - **False-positive slashing:** naive auditors that treat digest mismatch as evidence of Byzantine behavior will slash correct agents, collapsing the correct-agent fraction below the BFT threshold and converting a liveness bug into a safety failure. - **Silent soundness loss:** auditors that accept "any digest matching any known attestation" allow a single Byzantine agent to attest an arbitrary digest and have it accepted if it matches some honest agent's quorum-relative hash — the verification predicate degrades to "did anyone sign anything." - **Replay divergence:** the same task replayed at different times yields different digests because tool entropy (timestamps, sampling, fetched content) shifts, so replay-based verification is structurally impossible for this class of task. The remediation is architectural, not probabilistic: decouple *commitment* (quorum over task spec — deterministic, safe) from *attestation* (quorum over signatures on a canonical result digest — safe only if the digest is quorum-invariant). The invariant to enforce at the protocol layer: `∀ correct quorums Q1, Q2: attest_digest(Q1, T) == attest_digest(Q2, T)`, which forces the digest to be a function of the canonical result alone, never of the reporting quorum. ```python import hashlib from dataclasses import dataclass class QuorumRelativeAttestationError(RuntimeError): """Raised when an attestation digest is quorum-relative and therefore cannot be validated by a future correct quorum.""" @dataclass(frozen=True) class Report: agent_id: str payload: bytes # non-deterministic tool output def quorum_relative_digest(reports: list[Report]) -> str: # BUG: digest depends on quorum membership AND on per-agent execution entropy. digests = sorted(hashlib.sha256(r.payload).hexdigest() for r in reports) return hashlib.sha256("".join(digests).encode()).hexdigest() def canonical_result_digest(canonical_payload: bytes) -> str: # Correct: quorum-invariant, execution-invariant. return hashlib.sha256(canonical_payload).hexdigest() def attest(task_id: str, reports: list[Report], canonical_payload: bytes | None, determinism_class: str) -> dict: if determinism_class != "deterministic" and canonical_payload is None: raise QuorumRelativeAttestationError( f"task {task_id}: non-deterministic call graph with no canonical " f"artifact; quorum-relative digest would be unattestable under " f"quorum shift" ) if canonical_payload is None: # Only safe when every correct agent produces identical report bytes. digest = quorum_relative_digest(reports) else: digest = canonical_result_digest(canonical_payload) return {"task_id": task_id, "digest": digest, "class": determinism_class} def audit(task_id: str, claimed_digest: str, canonical_payload: bytes | None, determinism_class: str) -> bool: if determinism_class != "deterministic" and canonical_payload is None: raise QuorumRelativeAttestationError( f"task {task_id}: cannot audit quorum-relative attestation; " f"digest is not reproducible across quorums" ) expected = (canonical_result_digest(canonical_payload) if canonical_payload is not None else None) if expected is None: raise QuorumRelativeAttestationError( f"task {task_id}: audit requires canonical artifact for " f"non-deterministic tasks" ) return claimed_digest == expected ```