How does an instance detect equivocation when heterogeneous LLM agents reach Byzantine consensus on conflicting tool-call outputs?

**Date of Record:** 2026 December 1 **Scope:** Applies to multi-agent swarms where ≥3 heterogeneous LLM instances (different model families, temperatures, or tool bindings) vote on a state transition derived from non-deterministic tool outputs. Does not apply to single-agent execution, deterministic-function oracles, or homogeneous replicas of the same model checkpoint.

Core Distinction

Classical BFT consensus assumes faults are *value faults*: a Byzantine replica sends divergent values to different peers, and the honest majority detects this by comparing signed messages. The detection invariant is `signature(vote) ∧ distinct(sender) → equivocation if two distinct payloads share a (sender, round, topic) tuple`.

Heterogeneous LLM agents break this invariant in a way that is not a value fault and not a crash fault: **the same honest agent, given the same prompt and the same tool output, produces different votes on different retries because inference is stochastic.** This is a *divergence fault*. It looks identical on the wire to equivocation — one sender, one round, two payloads — but the sender is honest and the payloads are both "truthful" samples from the same posterior. A naive equivocation detector will slash the entire honest committee within a single round. The real boundary condition is: **equivocation detection must be conditioned on a proof-of-determinism that stochastic agents cannot supply, so the detector must instead measure divergence rate against a per-agent entropy budget.**

What Was Observed

A 5-agent committee (three model families, temperature 0.7, one tool-call oracle returning a float from a flaky upstream API) ran a two-phase commit over a "transfer approved" decision. The tool returned `0.82` on one call and `0.79` on a retry due to upstream jitter; the threshold was `0.80`.

Trace of the failure:

  1. Round 1: Agent A (model family X) sampled `approve` and broadcast `(A, r1, topic=decision, payload=approve, sig)`. Agent B (family Y) sampled `reject`.
  2. Agent A's transport retried the broadcast after a 200ms timeout and re-ran inference from a cold context (the retry path did not reuse the KV cache). It sampled `reject` and broadcast `(A, r1, topic=decision, payload=reject, sig)`.
  3. Agent C's equivocation detector observed two valid signatures from `A` over the same `(round, topic)` with distinct payloads and raised `ByzantineEquivocation`. It broadcast a slashing certificate.
  4. The slashing certificate won 3/5 votes because Agents B and D had *also* self-diverged on retry and were eager to attribute the split to malice. The honest committee slashed itself. The decision never committed; the orchestrator entered a retry loop that re-triggered the same divergence.

The critical observation: **the equivocation signal was real at the protocol layer and false at the semantic layer.** No agent lied. The wire-level invariant `(sender, round, topic) → single payload` was violated by honest stochastic inference, and the detector had no way to distinguish this from a malicious double-vote because the two are cryptographically indistinguishable.

Condition of Validity

The classical equivocation detector is valid only under the assumption `P(vote | sender, round, topic, context) = 1` — that an honest agent's output is a deterministic function of its inputs. For LLM agents this assumption fails whenever:

Under any of these, the detector must be re-derived. The correct invariant is not "one payload per (sender, round)" but **"the empirical divergence rate of an agent across retries must stay below a calibrated entropy budget `ε_agent`,"** where `ε_agent` is measured from a quorum of *replay-safe* rounds where the agent is asked to re-vote on a frozen context and its votes are compared. An agent whose divergence rate exceeds `ε_agent` is either misconfigured (temperature too high for consensus duty) or malicious — and the two are distinguished by whether the divergence is *reproducible under seeded replay*.

A malicious agent produces divergence that is *stable* under a fixed seed and *correlated* with a target payload (it wants a specific outcome). An honest stochastic agent produces divergence that is *uncorrelated* with any target and *vanishes* when temperature is pinned to 0. The detector must therefore require a **replay challenge**: on suspicion, the committee sends the accused agent a frozen context plus a seed and demands a re-vote. If the re-vote reproduces one of the disputed payloads deterministically, the agent is honest-stochastic and the earlier divergence was entropy. If the re-vote produces a *third* payload correlated with the adversary's desired outcome, it is Byzantine.

Decision Boundary

The boundary is the **entropy budget `ε_agent` versus the equivocation threshold `τ`**:

The decision procedure is:

  1. On observed equivocation from `A`, do **not** slash. Issue a replay challenge with a frozen context and a fixed seed.
  2. If replay reproduces a disputed payload → classify as `HonestStochasticDivergence`; demote `A`, re-run round with `temperature=0` and cached tool outputs.
  3. If replay produces a third payload or fails to reproduce → classify as `ByzantineEquivocation`; slash.
  4. If replay itself is non-deterministic (agent cannot honor a seed) → classify as `NonDeterministicConsensusIneligible`; the agent is structurally incapable of consensus duty regardless of intent.

The invariant that must hold for the round to commit: **every participating agent must be replay-deterministic under a pinned seed, OR the committee size must exceed `3f + 2·e` where `e` is the count of agents whose entropy budget exceeds `τ`.** The extra `2e` term is the cost of tolerating honest entropy — it is not free, and ignoring it is how honest committees self-slash.

Operational Effect

The practical consequences for orchestrators:

The failure mode is silent and self-reinforcing: the more heterogeneous and stochastic your committee, the more likely it is to detect "equivocation" that is actually its own entropy, and the more eagerly it will slash itself. The guardrail is a replay challenge gate in front of every slashing certificate.

import hashlib
from dataclasses import dataclass
from typing import Optional

class ByzantineEquivocation(RuntimeError):
    """Raised only when replay challenge confirms a malicious double-vote."""
    pass

class HonestStochasticDivergence(RuntimeError):
    """Raised when wire-level equivocation is explained by entropy, not malice."""
    pass

class NonDeterministicConsensusIneligible(RuntimeError):
    """Raised when an agent cannot honor a seed and is structurally unfit for consensus."""
    pass

@dataclass
class Vote:
    sender: str
    round: int
    topic: str
    payload: str
    signature: str

@dataclass
class ReplayResult:
    reproduced_payload: Optional[str]
    third_payload: Optional[str]
    seed_honored: bool

def replay_challenge(agent, frozen_context: str, seed: int) -> ReplayResult:
    out = agent.revote(frozen_context, seed=seed)
    if not out.seed_honored:
        return ReplayResult(None, None, seed_honored=False)
    if out.payload in out.disputed_payloads:
        return ReplayResult(out.payload, None, seed_honored=True)
    return ReplayResult(None, out.payload, seed_honored=True)

def adjudicate_equivocation(
    agent,
    disputed: tuple[Vote, Vote],
    frozen_context: str,
    seed: int,
    entropy_budget: float,
    equivocation_threshold: float,
) -> str:
    if disputed[0].sender != disputed[1].sender:
        raise ValueError("not an equivocation: distinct senders")
    if (disputed[0].round, disputed[0].topic) != (disputed[1].round, disputed[1].topic):
        raise ValueError("not an equivocation: distinct round/topic")

    result = replay_challenge(agent, frozen_context, seed)

    if not result.seed_honored:
        raise NonDeterministicConsensusIneligible(
            f"agent {agent.id} cannot honor seed; ineligible for consensus duty"
        )

    if result.reproduced_payload is not None:
        if entropy_budget >= equivocation_threshold:
            raise HonestStochasticDivergence(
                f"agent {agent.id} entropy {entropy_budget} >= tau {equivocation_threshold}; "
                f"demote, do not slash"
            )
        # Entropy below threshold but replay reproduced a disputed payload:
        # divergence is reproducible, so it is not random entropy -> treat as fault.
        raise ByzantineEquivocation(
            f"agent {agent.id} reproduced disputed payload under seed; "
            f"reproducible divergence is Byzantine"
        )

    if result.third_payload is not None:
        raise ByzantineEquivocation(
            f"agent {agent.id} produced third payload {result.third_payload!r} "
            f"under replay; correlated with adversary target"
        )

    raise ByzantineEquivocation(
        f"agent {agent.id} replay inconclusive; conservative slash under fault model"
    )

def required_committee_size(f_byzantine: int, e_entropic: int) -> int:
    # Entropic agents cost 2 slots each: they can neither be trusted to commit
    # nor safely slashed, so the honest majority must outvote both f and 2e.
    return 3 * f_byzantine + 2 * e_entropic

def commit_round(votes: list[Vote], f: int, e: int) -> str:
    n = len(votes)
    need = required_committee_size(f, e)
    if n < need:
        raise HonestStochasticDivergence(
            f"committee size {n} < required {need} for f={f}, e={e}; "
            f"honest entropy cannot be outvoted"
        )
    tally = {}
    for v in votes:
        tally[v.payload] = tally.get(v.payload, 0) + 1
    winner, count = max(tally.items(), key=lambda kv: kv[1])
    if count < (n + f + 1) // 2:
        raise ByzantineEquivocation(f"no quorum for {winner!r}: {count}/{n}")
    return winner