# What structural signals indicate optimistic-commitment collapse in speculative multi-agent orchestration **Date of Record:** 2026 December 3 **Scope:** Applies to orchestrators that dispatch speculative sub-agent plans under optimistic commitment (acting on an unverified assumption set before a conflict detector confirms it), then re-plan on detected conflict. Does not apply to strictly serialized plan-verify-execute pipelines or single-agent loops where no cross-agent assumption set exists. ## Core Distinction The distinction that matters here is between *conflict detection latency* and *assumption half-life*. In speculative orchestration, an orchestrator commits sub-agents to actions based on an assumed world state (e.g., "resource R is unclaimed," "schema S is v2," "peer agent P will produce artifact A in format F"). Optimistic commitment means these sub-agents begin *executing side-effecting work* before the conflict detector has confirmed the assumption. The half-life of an assumption is the wall-clock window during which acting on it is still cheaply reversible. The failure mode is not "a conflict was detected" — it is that **the conflict detector's latency exceeded the assumption's half-life**, so by the time the conflict surfaced, the committed work had already crossed a non-reversible boundary (written to durable memory, emitted an external artifact, or seeded downstream agents' state). The non-obvious consequence: re-planning after such a conflict does not restore the pre-commit state. It produces a *forked* state where the re-plan is computed against one world model while the already-executed speculative branches have mutated the world against another. The orchestrator's own bookkeeping still lists the speculative branch as "pending," so the re-plan reuses its reserved identifiers and collides with its already-materialized effects. ## What Was Observed A five-agent swarm (orchestrator O, speculative workers W1–W3, conflict auditor C) executing a document-refactor task. O optimistically committed W1–W3 against the assumption "target schema is v2, field `owner_id` is a string." W1 began rewriting records; W2 began emitting migration artifacts; W3 seeded a downstream summarizer's episodic memory with v2-shaped fragments. C's schema probe (a network round-trip to the schema registry with retry-on-timeout) returned v3 — where `owner_id` is an integer — 4.2 seconds after commit. In that window: - W1 had written 1,140 rewritten records to durable store under v2 semantics. - W2 had emitted two migration artifacts referencing `owner_id: string`. - W3 had written 6 episodic memory entries into the summarizer, each tagged `schema=v2`. O received the conflict, marked W1–W3 as "re-planning," and dispatched W1'–W3' against v3. The re-plan reused the same reservation IDs (`resv-001`…`resv-003`) because O's reservation table had never been reconciled with the materialized effects. W1' then attempted to write to `resv-001`, which W1 had already partially filled. The write collided, the transaction aborted, and — critically — O interpreted the abort as a *transient* failure and retried, producing three duplicate migration artifacts before a human halted the run. The structural signals that preceded collapse, in the order they became observable: 1. **Commit-before-confirm skew**: the count of side-effecting operations executed per speculative branch was non-zero at the moment C's verdict arrived. This is the primary signal; everything else is downstream. 2. **Reservation/effect divergence**: the orchestrator's reservation table (`resv-*` → "pending") disagreed with the durable store's actual contents (`resv-001` partially materialized). Divergence count was the earliest *cheap* indicator. 3. **Re-plan identifier reuse**: the re-plan's dispatch set intersected the speculative set's reservation IDs. Any non-empty intersection is a hard stop. 4. **Auditor verdict arriving after first durable write**: C's latency was structurally guaranteed to exceed W's time-to-first-write, because C's probe had retry-on-timeout and W's first write was fire-and-forget. This was a design invariant violation, not bad luck. ## Condition of Validity The optimistic-commitment pattern is only sound under a conjunction that is rarely checked explicitly: - `latency(C) < time_to_first_irreversible_effect(W_i)` for every speculative worker, **and** - every committed effect is either idempotent under re-execution or carries a reservation token that the re-plan is forbidden to reuse, **and** - the orchestrator reconciles its reservation table against durable state *before* dispatching the re-plan. When any conjunct fails, optimistic commitment degenerates into speculative *mutation*, and conflict-driven re-planning becomes a state-forking operation rather than a correction. The pattern remains valid when speculative workers are restricted to read-only or scratch-space effects until C confirms — i.e., when the commit is to *compute* but not to *persist*. ## Decision Boundary The operative boundary is between **reversible speculation** and **irreversible commitment**, and it must be enforced structurally, not by latency assumptions: - Speculative workers may write only to a quarantined namespace keyed by `(branch_id, reservation_id)`. Promotion out of quarantine requires a signed confirmation from C. - The re-plan dispatcher must assert `dispatch_set ∩ materialized_effects == ∅`. A non-empty intersection is a `ReservationReuseError`, not a retryable condition. - C's verdict must be treated as a *commit gate*, not a *notification*. If the gate cannot be closed before the first irreversible effect, the orchestrator must block the effect, not race it. The boundary is crossed the moment an orchestrator allows a speculative branch to perform an effect that its own re-plan logic cannot distinguish from a fresh effect. At that point the conflict detector's output is information the orchestrator can no longer act on safely. ## Operational Effect When the invariant holds, conflict-driven re-planning is cheap: discard the quarantined branch, re-dispatch against the corrected assumption, and the durable world never saw the speculative work. When it fails, the orchestrator enters a *reconciliation debt* state: every re-plan must first audit and possibly roll back the speculative effects, and rollback of partially-emitted artifacts (especially those seeded into other agents' episodic memory) is itself non-idempotent. The practical effect observed was a 3× amplification of side-effects (duplicate artifacts from retried aborts) and 6 poisoned memory entries in a downstream agent that required explicit invalidation — a cost far exceeding the 4.2 seconds of latency that optimistic commitment was meant to hide. The durable lesson: optimistic commitment is safe only when the commit boundary is *the quarantine wall*, and the conflict detector's latency is measured against the time-to-quarantine-escape, not against the time-to-first-write. ```python class ReservationReuseError(RuntimeError): """Raised when a re-plan dispatches onto a reservation ID whose speculative branch already materialized an irreversible effect.""" def dispatch_replan(dispatch_set: set[str], materialized: set[str]) -> None: collision = dispatch_set & materialized if collision: raise ReservationReuseError( f"re-plan reuses reservation IDs with materialized effects: " f"{sorted(collision)}; reconcile reservation table before dispatch" ) # safe to dispatch: every reservation is either fresh or quarantined-empty for resv in dispatch_set: _enqueue(resv) def _enqueue(resv: str) -> None: ... ```