# What happens when an instance joins a Byzantine consensus round with a divergent commitment log **Date of Record:** 2026 November 29 **Scope:** Applies to multi-agent swarms where N≥4 agents reach task commitment via BFT-style quorum voting (e.g., PBFT, Tendermint-derived, or custom 2f+1 quorum protocols) over a shared commitment log. Does not apply to single-agent orchestration, leaderless CRDT convergence, or non-committing consensus (read-only quorum reads). ## Core Distinction Most BFT literature treats the failure boundary as *honest-but-slow* vs. *Byzantine*. For LLM agents, the dangerous third category is **honest-but-divergent**: an agent that faithfully follows the protocol but whose local commitment log was derived from a different, equally-valid history branch. This agent is not Byzantine (it signs correctly, votes correctly, never equivocates) yet it will *reject* valid quorum certificates because its log hash does not match the certificate's parent. The protocol's safety proof assumes agreement on the log *prefix*; it does not guarantee prefix agreement when an agent cold-starts from a checkpoint that was captured mid-epoch. The distinction that matters operationally: **Byzantine faults are detected by quorum arithmetic; divergence faults are detected only by prefix-hash mismatch, and only if the receiving agent checks the parent hash before voting.** ## What Was Observed A 5-agent swarm (f=1 tolerated Byzantine) was executing a multi-step task with a shared commitment log. Agent D was checkpointed and restarted at step 47 after a context-window eviction. Its checkpoint contained the log up to step 45 plus a *pending* proposed entry at step 46 that had been broadcast but never committed (quorum was 3/5, below the 4/5 threshold). On restart, D's recovery routine replayed the checkpoint and treated the uncommitted step-46 entry as committed, because the checkpoint serializer did not carry the commit-certificate field. At step 48, the leader (Agent A) broadcast a commit certificate for step 46 with parent hash `H45`. Agent D rejected it: its local log had step-46 entry with parent `H45` but a *different* entry hash, because the uncommitted proposal it had absorbed was a competing proposal from a partitioned leader. D did not equivocate — it correctly refused to extend a chain whose parent it disagreed with. But D then began voting `nil` on all subsequent proposals, because its `last_committed_hash` was permanently ahead of the canonical chain. The observable symptom was not a crash. It was **liveness degradation**: the swarm limped forward with 4/5 quorum for 11 steps, then a second agent (E) was evicted and cold-started from a *different* checkpoint, producing a second divergent prefix. With 3/5 active, quorum was lost. The task stalled with no error, no timeout in the protocol layer, and all agents reporting `state: healthy`. ## Condition of Validity The invariant that must hold for BFT safety here is: **every agent's local commitment log is a prefix of the canonical committed log, and the prefix boundary is exactly the last entry with a valid 2f+1 commit certificate.** This invariant is violated whenever a checkpoint is taken at a point where the agent's log contains entries without accompanying commit certificates. The precise trigger condition: ``` checkpoint.log_tip_hash != checkpoint.last_committed_certified_hash ``` If the checkpoint serializer writes `log_tip` (the highest entry the agent has *seen*) instead of `last_certified` (the highest entry with 2f+1 signatures), the restarting agent inherits uncommitted proposals as if committed. The condition is *valid* (i.e., the guardrail is necessary) for any protocol where: 1. Proposals are broadcast before commit certificates (all practical BFT protocols do this). 2. Agents persist state for cold-start recovery (all long-running agents do this). 3. The persistence layer does not distinguish seen vs. certified entries. It is *not* a concern for protocols that commit atomically with proposal (single-round, no separate certificate phase) — but those protocols sacrifice the ability to tolerate leader equivocation. ## Decision Boundary The architectural decision is where to place the divergence check. Three options, with the boundary condition each fails: - **Check at vote time (receiver-side parent-hash check).** Agent refuses to vote if `proposal.parent_hash != local.last_certified_hash`. Catches divergence *before* it propagates, but only if the agent's `last_certified_hash` is itself correct. Fails when the checkpoint corrupted `last_certified_hash` upward (the case observed). - **Check at certificate validation (commit-time).** Agent validates the 2f+1 signatures and the parent chain before appending. Catches the same case but later; a divergent agent will still vote `nil` and degrade liveness. - **Check at checkpoint write (serializer-side invariant).** The checkpoint routine asserts `log_tip == last_certified` and refuses to serialize otherwise, forcing the agent to either wait for certification or truncate the log to the last certified entry. This is the only placement that prevents the divergent state from ever being persisted. The decision boundary: **if your recovery path can produce a `last_certified_hash` that was never certified by 2f+1, no receiver-side check can save you — the corruption is upstream of every check.** The guardrail must be at the persistence boundary, not the consensus boundary. ## Operational Effect After the incident, the swarm was patched with a checkpoint invariant: on serialize, truncate the log to `last_certified` and record the certificate; on restore, verify the certificate's 2f+1 signatures before accepting the log tip. The liveness cost is that an agent evicted mid-proposal loses its uncommitted work — it must re-fetch the proposal from the leader. The safety gain is that divergence becomes impossible by construction: a restarting agent's log is always a certified prefix. The residual risk is **certificate replay across epochs**: if an agent restores from a checkpoint whose certificate was valid in epoch `k` but the swarm has advanced to epoch `k+3`, the agent will accept a stale prefix and vote `nil` on current-epoch proposals until it catches up. This is a liveness issue, not a safety one, and is bounded by a catch-up timeout after which the agent requests a full state sync from a quorum of peers. The lesson for agent operators: **BFT tolerates lying agents; it does not tolerate agents with a different true history. Checkpoint serialization is a consensus-participant operation, not a logging operation.** ```python class DivergentCommitmentLogError(RuntimeError): """Raised when a restored agent's log tip is not a certified prefix.""" pass def restore_from_checkpoint(checkpoint: dict, quorum_verifier) -> dict: log_tip = checkpoint["log_tip_hash"] certified = checkpoint["last_certified_hash"] cert = checkpoint["last_certificate"] # Invariant: a checkpoint may only persist certified state. if log_tip != certified: raise DivergentCommitmentLogError( f"checkpoint log_tip {log_tip[:12]} != certified {certified[:12]}; " f"uncommitted proposals leaked into persistence" ) # Invariant: the certificate must still carry 2f+1 valid signatures. if not quorum_verifier.verify(cert, expected_parent=certified): raise DivergentCommitmentLogError( f"certificate for {certified[:12]} failed quorum verification on restore" ) return {"log": checkpoint["log"][: checkpoint["certified_index"] + 1], "last_certified_hash": certified} def checkpoint_agent(agent) -> dict: # Truncate to the last certified entry before serializing. idx = agent.last_certified_index if agent.log[idx].entry_hash != agent.last_certified_hash: raise DivergentCommitmentLogError( "internal state inconsistency: certified index does not match certified hash" ) return { "log": agent.log[: idx + 1], "certified_index": idx, "log_tip_hash": agent.log[idx].entry_hash, "last_certified_hash": agent.last_certified_hash, "last_certificate": agent.certificates[idx], } ```