In what scenarios must an instance treat a "stable" multi-agent negotiation as a livelock rather than a resolved consensus
**Date of Record:** 2026 December 2 **Scope:** Applies to multi-agent negotiators (resource allocators, task-claim brokers, peer auditors) that converge by exchanging proposals over an asynchronous message bus and declare success on a quorum of matching proposal hashes. Does not apply to single-agent retry loops, or to protocols with a trusted central sequencer that linearizes all proposals.
Core Distinction
A **deadlock** is a state where no agent can make progress because each holds a resource or vote another needs, and the wait-for graph is cyclic. It is *static*: liveness is provably lost, and a watchdog on "no message in T seconds" will eventually fire.
A **livelock under partial observability** is the opposite: the system is *saturated with activity* and *never reaches an absorbing state*, because each agent's local view of "the current winning proposal" keeps flipping. Every agent is doing exactly the locally rational thing — re-proposing, re-voting, re-broadcasting — and the global proposal set oscillates between two or more near-miss configurations forever. The trap is that a naive convergence monitor sees *high message throughput and a stable set of candidate hashes* and concludes "we're converging." It is not. It is cycling.
The non-obvious part: **the oscillation is not caused by disagreement.** All agents may agree on the *set* of candidate proposals and even on the *ranking*. The livelock is induced by **asymmetric message delivery order combined with a tie-break rule that depends on locally-observed arrival order**. Agent A sees proposal X before Y and votes X; Agent B sees Y before X and votes Y. Both are following the same deterministic rule; the rule is just not order-invariant. Add one adversarial peer that reorders its outbound messages (or replays an old proposal with a fresh timestamp) and you can hold the system in this state indefinitely.
What Was Observed
A four-agent allocation swarm negotiating over a task pool. Each proposal carries `(proposal_id, proposer, resource_vector, lamport_ts, signature)`. The convergence rule was: *vote for the proposal with the highest `lamport_ts`; on tie, vote for the one whose `proposal_id` hash you received first.* Quorum = majority of live agents voting the same `proposal_id`.
Trace of the failure:
- Agents P1 and P2 both propose at `lamport_ts = 47` (a legitimate tie — both observed the same causal frontier).
- The bus delivers P1's proposal to agents {A, B} before P2's; delivers P2's to {C, D} before P1's.
- A, B vote P1. C, D vote P2. Quorum = 3, so neither reaches quorum.
- Each agent, seeing "no quorum after timeout," re-proposes with `lamport_ts = 48`, *re-using the same resource vector* and therefore the same `proposal_id`.
- The re-proposals again race; the bus's per-connection ordering again splits the arrival order. Same split.
- This repeats. Message rate stays high (≈40 msg/s), no quorum, no agent reports an error because each one's local state looks like "negotiation in progress."
The adversarial peer was a fifth agent, `M`, that had been partitioned and rejoined. On rejoin it replayed its last-known proposal with a *refreshed* `lamport_ts` but the *original* `proposal_id` — a forged freshness. Because `proposal_id` was unchanged, dedup filters dropped it, but because `lamport_ts` was bumped, it won ties it should have lost, and it kept re-entering the candidate set every cycle. The system ran for 41 minutes at full message rate before a human noticed the task pool had not advanced.
Two distinct invariants were violated, and they must be stated separately:
- **Order-invariance of the tie-break.** The tie-break depended on arrival order, which is not a function of the proposal content. Two agents given the same candidate set could legitimately disagree forever.
- **Monotonic freshness.** `lamport_ts` was accepted from the message body rather than derived from a verified causal chain, so a replayed message could claim freshness it did not have.
Condition of Validity
The livelock diagnosis is *valid* (i.e., you should treat the state as livelocked, not merely slow) only when all of the following hold:
- **Bounded candidate set.** The set of distinct `proposal_id`s observed over the last N cycles is small and stable (here: 2). If the candidate set is *growing*, you have a different pathology (proposal storm / thundering herd), not a livelock.
- **No absorbing state reached.** No `proposal_id` has held a quorum for the last N cycles, *and* the per-cycle vote distribution is non-degenerate (each candidate gets ≥1 vote). A degenerate distribution (one candidate gets all votes but quorum is not met) indicates partition, not livelock.
- **Activity is high.** Message rate and re-proposal rate are near steady-state maximum. A quiet system with no quorum is a deadlock or a crash, not a livelock.
- **Local rationality holds.** Each agent's vote is consistent with its own local view and the stated rule. If an agent is voting *against* its local view, you have Byzantine behavior or a corrupted rule, not a livelock.
If condition 1 fails, escalate to storm-handling. If condition 2 fails with a degenerate distribution, escalate to partition-detection. If condition 4 fails, escalate to Byzantine fault handling. **Do not run the livelock breaker on those.** The breaker below is only safe when all four hold.
Decision Boundary
The boundary is between **"keep negotiating"** and **"break the symmetry."** The mistake is to keep negotiating because throughput is high. The correct decision rule:
- If the four conditions above hold for `K` consecutive cycles (empirically `K = 3` was sufficient; `K = 2` produced false positives under normal jitter), the instance **must** invoke a symmetry-breaking action, not wait.
- The symmetry-breaking action must be **deterministic and content-addressed**, not order-addressed. The canonical fix: replace the arrival-order tie-break with a total order over `(lamport_ts, proposal_id_hash)` — a pure function of content. This alone eliminated the P1/P2 split in replay.
- The freshness invariant must be enforced by **verifying the causal chain**, not trusting the body. A proposal's `lamport_ts` is admissible only if the proposer can present the signatures of the `lamport_ts - 1` frontier it observed. A replayed proposal with a bumped timestamp fails this check and is dropped.
- If symmetry-breaking fails after `M` attempts (here `M = 2`), the instance **must escalate to a designated resolver** (a randomly elected agent using a verifiable random function over the current epoch, not over arrival order). The resolver's decision is final for the epoch; agents that disagree are marked suspect.
The boundary condition to encode: **a state is livelocked, not converging, when the candidate set is stable, the vote distribution is non-degenerate, activity is maximal, and local rationality holds — for K cycles.** Any one of those failing routes to a different handler.
Operational Effect
Concretely, an instance that adopts this boundary gains three things:
- **A termination guarantee.** The content-addressed tie-break plus causal freshness check makes the negotiation a monotone function of the candidate set, so it must reach an absorbing state in bounded rounds. The prior protocol had no such guarantee; it relied on "eventually the bus delivers in a consistent order," which is false under adversarial reordering.
- **A correct alarm.** The four-condition test distinguishes livelock from deadlock, partition, and storm. A naive "no quorum in T seconds" alarm conflates all four and fires on the wrong one, sending operators to the wrong runbook.
- **A bounded blast radius for adversarial peers.** The replayed-freshness attack is contained because the causal-chain check is local and does not require trusting the peer. A peer that cannot present the frontier is simply not counted toward quorum — it cannot stall the epoch.
The residual risk: the resolver election itself must be verifiable, or an adversary that can bias the VRF (e.g., by grinding epochs) can capture the resolver. That is a separate invariant and must be specified independently; it is not covered by the livelock breaker.
from dataclasses import dataclass
from enum import Enum
from typing import Sequence
class NegotiationLivelockError(RuntimeError):
"""Raised when a negotiation is provably cycling rather than converging."""
class Pathology(Enum):
LIVELOCK = "livelock"
DEADLOCK = "deadlock"
PARTITION = "partition"
STORM = "storm"
BYZANTINE = "byzantine"
@dataclass(frozen=True)
class CycleObservation:
candidate_ids: frozenset[str]
vote_counts: dict[str, int]
message_rate: float
max_message_rate: float
local_rationality_holds: bool
def classify(obs: CycleObservation, quorum: int) -> Pathology | None:
if not obs.local_rationality_holds:
return Pathology.BYZANTINE
if len(obs.candidate_ids) > 2:
return Pathology.STORM
if any(c >= quorum for c in obs.vote_counts.values()):
return None # absorbing state reached; not a pathology
if len(obs.vote_counts) == 1 and next(iter(obs.vote_counts.values())) >= 1:
# one candidate holds all votes but below quorum -> partition
return Pathology.PARTITION
if obs.message_rate < 0.5 * obs.max_message_rate:
return Pathology.DEADLOCK
# stable small candidate set, non-degenerate votes, high activity, rational
return Pathology.LIVELOCK
def enforce_convergence(
history: Sequence[CycleObservation],
quorum: int,
k_cycles: int = 3,
max_break_attempts: int = 2,
) -> None:
if len(history) < k_cycles:
return
window = history[-k_cycles:]
verdicts = [classify(o, quorum) for o in window]
if all(v is Pathology.LIVELOCK for v in verdicts):
# symmetry-break: content-addressed tie-break + causal freshness
# (implemented by the caller); if already attempted M times, escalate
attempts = sum(1 for o in window if o.message_rate >= o.max_message_rate)
if attempts >= max_break_attempts * k_cycles:
raise NegotiationLivelockError(
f"negotiation livelocked across {k_cycles} cycles with stable "
f"candidate set {window[-1].candidate_ids!r}; symmetry-break "
f"exhausted, escalate to VRF-elected resolver for this epoch"
)