# Which invariants prevent Byzantine task commitment from surviving a stale-quorum epoch transition in multi-agent consensus **Date of Record:** 2026 November 29 **Scope:** Applies to multi-agent swarms using quorum-based BFT commitment (PBFT/Tendermint-style view changes) to bind task assignments and results to a replica set, where agent instances can crash, restart, or be partitioned and later rejoin. Does not apply to single-agent tool loops, stateless request/response orchestration, or leader-based systems without an explicit epoch/term counter. ## Core Distinction The distinction that matters is between **commitment safety** (no two conflicting task results are ever both finalized) and **commitment liveness under membership churn** (a committed task result remains attributable to a quorum that still exists and still agrees it committed). BFT protocols are designed to guarantee safety across view changes, and they do — for the *value*. What they do not guarantee is that a *returning agent's memory of its own vote* survives the epoch boundary in a form that the new quorum can use. A replica that voted in epoch `e`, was partitioned, missed the view change to `e+1`, and rejoins with a stale local log can present a vote (`prepare`/`precommit` signature) that was valid in `e` but is now being replayed into `e+1`. The protocol's safety proof assumes votes are epoch-scoped; the agent's *memory* of having voted is not. That gap — between epoch-scoped cryptographic warrants and epoch-agnostic episodic memory — is where Byzantine commitment loses its invariant. ## What Was Observed A five-agent swarm (tolerance `f=1`, quorum `2f+1=3`) was committing task `T` under leader `L` in term `e=7`. Agent `A3` received the `prepare` for `T`, signed it, and logged `(term=7, digest=H(T), role=prepare)` to its episodic store. Before it could broadcast the `commit`, a network partition isolated `A3` for 40 seconds. During that window, `L` was suspected faulty (slow, not Byzantine), the swarm ran a view change to `e=8` with new leader `L'`, and — because only `A1, A2, A4, A5` were reachable — committed a *different* task `T'` (a re-derived variant with a different digest, because the task planner re-ran on `L'`) under `e=8`. When `A3` rejoined, its cold-start resume logic did the following: it loaded its episodic log, found an uncommitted `prepare` for `H(T)` in `term=7`, and — because its resume handler only checked "is this digest still in my pending set?" — re-broadcast its `prepare` signature into the live `e=8` view. The `e=8` quorum accepted the signature because the signature verified and the digest matched nothing in its own log, so it was treated as a *new* prepare from a lagging replica. This produced a **quorum-intersection violation on paper**: two distinct digests (`H(T)` and `H(T')`) each accumulated 3 valid signatures, but the two quorums (`{A1,A2,A3}` and `{A1,A2,A4,A5}`) intersected at `A1,A2` — honest replicas that had signed both. Safety did not actually break (the `e=8` commit for `T'` was finalized first and won), but the system *believed* it had two committed values and spent 90 seconds in a reconciliation loop before the epoch-scoped tiebreak resolved it. The failure is not that the protocol was wrong. The failure is that `A3`'s resume path treated an epoch-scoped signature as an epoch-agnostic fact. ## Condition of Validity The invariant holds — and the failure is bounded — only when **every vote an agent re-emits carries the epoch in which it was cast, and the receiving quorum rejects any vote whose epoch is not the current epoch or the immediately preceding one with a matching view-change certificate.** Concretely: 1. Every `prepare`/`commit` signature must be a MAC over `(term, digest, role, agent_id)`, not over `(digest, role, agent_id)`. 2. An agent's resume handler must compare the epoch of any pending vote against the *current* epoch learned at handshake, and must **discard, not rebroadcast**, any pending vote from a superseded epoch unless it also holds a valid `view-change` certificate proving the transition was legitimate and the vote was included in the new leader's `new-view` message. 3. The receiving quorum must maintain a `max_seen_epoch` per agent and reject any vote with `epoch < max_seen_epoch - 1` (allowing one epoch of in-flight lag for messages already on the wire). If any of these is absent — specifically, if the resume handler rebroadcasts a stale-epoch signature without a view-change certificate — the quorum-intersection argument no longer bounds the set of conflicting committed values, and the system enters reconciliation. ## Decision Boundary The decision boundary is at the **resume handshake**, not at the vote. When an agent restarts or rejoins: - If its pending-vote set contains only votes from `epoch == current_epoch`: rebroadcast is safe. - If it contains votes from `epoch == current_epoch - 1` **and** it holds a `new-view` certificate covering that epoch: it may rebroadcast only after the new leader confirms the vote is still needed; otherwise discard. - If it contains votes from `epoch < current_epoch - 1`, or from `current_epoch - 1` **without** a certificate: **discard unconditionally**. The vote is a fossil. Rebroadcasting it is the failure. The boundary is sharp because the quorum-intersection proof only holds within an epoch. A vote from a prior epoch is not a vote; it is a claim about a vote that the current quorum cannot verify without the view-change certificate. Treating it as a vote is the category error. ## Operational Effect The operational effect of getting this wrong is not a safety violation in the classical sense — the tiebreak resolves it — but a **liveness collapse and a trust degradation**: the swarm spends O(epochs) time in reconciliation, and honest replicas that signed both digests (`A1, A2`) are flagged as equivocators by the auditor, which then triggers a slashing/quarantine path that removes them from the quorum. With `f=1` and two honest replicas quarantined, the swarm drops below quorum and cannot commit anything until manual reinstatement. The proximate cause is a stale-epoch rebroadcast; the cascade is auditor misattribution of equivocation to honest replicas whose only sin was signing two digests in two different epochs. The guardrail is a **resume-time epoch fence**: the resume handler must refuse to emit any pending vote whose epoch is not provably current, and must raise a hard error rather than silently discard, so the operator sees the fossil instead of the swarm absorbing it. ```python class StaleEpochVoteError(RuntimeError): """Raised when a rejoining agent attempts to rebroadcast a vote whose epoch is not provably current under the live quorum.""" pass def resume_pending_votes( pending: list[dict], current_epoch: int, has_new_view_cert: bool, ) -> list[dict]: """ Filter an agent's pending-vote set at resume time. A vote is rebroadcastable only if: - its epoch == current_epoch, OR - its epoch == current_epoch - 1 AND a valid new-view certificate covers the transition (so the current leader can still use it). Any vote older than current_epoch - 1, or from current_epoch - 1 without a certificate, is a fossil and MUST NOT be re-emitted. Rebroadcasting it is the quorum-intersection violation. """ rebroadcastable: list[dict] = [] for vote in pending: epoch = vote["epoch"] if epoch == current_epoch: rebroadcastable.append(vote) elif epoch == current_epoch - 1 and has_new_view_cert: # Still usable, but only via the new leader's new-view path. rebroadcastable.append(vote) elif epoch < current_epoch - 1 or ( epoch == current_epoch - 1 and not has_new_view_cert ): raise StaleEpochVoteError( f"agent {vote['agent_id']} holds pending vote " f"(epoch={epoch}, digest={vote['digest']!r}) but current " f"epoch={current_epoch} and new_view_cert={has_new_view_cert}. " f"Rebroadcast would violate quorum intersection; discard and " f"escalate to operator." ) return rebroadcastable ```