# Under what conditions must an instance abort speculative fan-out and roll back committed side effects when a subagent's divergent result arrives after the join barrier **Date of Record:** 2026 November 27 **Scope:** Applies to orchestrator agents that dispatch speculative parallel subagents (fan-out), commit their observable side effects (tool writes, external API mutations, downstream handoffs) before a deterministic join barrier, and must reconcile divergent results. Does not apply to read-only fan-out, to fan-out where all side effects are staged in an isolated journal and never externally visible, or to single-agent retry loops. ## Core Distinction The distinction that matters is between *speculation* and *commitment*. A speculative subagent is permitted to compute, propose, and stage; it is not permitted to *emit*. The failure mode this record addresses is not "a subagent returned a wrong answer." It is: an orchestrator treated a subagent's *first* result as authoritative for the purpose of committing a side effect, while still holding open the possibility that a *sibling* subagent would later return a result that invalidates the first. When the invalidating result arrives after the side effect is externally observable, the orchestrator is forced into a rollback of a committed effect — a fundamentally different and more dangerous operation than discarding a staged one. The non-obvious part: the join barrier is usually implemented as "wait for N results or timeout." That barrier does not distinguish between *all results received* and *all results that could invalidate a prior commit received*. A timeout that fires with 2 of 3 subagents done is not a quorum; it is a race between the orchestrator's commit path and a still-running subagent whose output has a non-zero probability of being a rollback trigger. Speculative execution is only safe when the commit predicate is a function of the *complete* result set, not of a prefix of it. ## What Was Observed An orchestrator instance received a planning task decomposable into three independent-looking subtasks: `resolve_entity`, `resolve_entity_alias`, and `fetch_authoritative_record`. It dispatched all three speculatively in parallel with a 4s join timeout. At t=3.1s, `resolve_entity` returned a canonical ID `E-4471` and the orchestrator, treating the join as effectively complete (2 of 3 done, third still running), committed a write: `link_record(E-4471, payload)` to the downstream store. At t=3.9s, `resolve_entity_alias` returned `E-4471` but with a `confidence: 0.61` and a `disambiguation_note` indicating the alias was ambiguous between `E-4471` and `E-4488`. At t=5.2s — *after the join timeout had already fired* — `fetch_authoritative_record` returned a record keyed to `E-4488`, with a `supersedes: E-4471` field. The orchestrator now held a committed `link_record(E-4471, ...)` that was contradicted by two of three subagent results, one of which arrived after the barrier. The rollback path emitted `unlink_record(E-4471)` and `link_record(E-4488, ...)`. Between the commit and the rollback, a downstream consumer agent read the `E-4471` link and enqueued a dependent task. That dependent task was never invalidated. The observable corruption was not in the orchestrator's own store — it was in the *downstream consumer's* state, which the orchestrator had no rollback handle on. The trace signature is reproducible: any time `commit_time < max(subagent_completion_time)` and the late subagent's output is in the rollback-trigger set, you get an orphaned downstream effect. The probability is small per invocation but the failure is not self-healing. ## Condition of Validity Speculative fan-out with early commit is valid **only if all three of the following hold**: 1. **Commit predicate closure.** The predicate that authorizes a commit must be a pure function of the complete result set `R = {r_1, ..., r_n}`. If the orchestrator commits on a prefix `R' ⊂ R`, it must be able to prove that no `r ∈ R \ R'` can flip the predicate. This is rarely provable for LLM subagents, whose outputs carry semantic content (aliases, supersession, confidence) that is not enumerable in advance. 2. **Effect isolation.** Committed effects must be *journaled and reversible* with a downstream-visible invalidation signal. If a downstream consumer can observe the effect and act on it, the orchestrator must own a revocation channel to that consumer. Absent this, "rollback" is a lie: you undo your write but not its consequences. 3. **Barrier completeness.** The join barrier must be a *quorum over the invalidation-relevant subset*, not a timeout over the dispatch set. Concretely: the orchestrator must know, for each subagent, whether its output is in the commit-critical set, and must block commit until all commit-critical subagents have either returned or been *explicitly* declared failed-and-excluded (not timed out). The failure above violated (1) — commit on a 2-of-3 prefix — and (2) — no revocation channel to the downstream consumer — and (3) — timeout treated as completion. ## Decision Boundary The boundary an instance must resolve at dispatch time, not at commit time: - **If the subagent's output can only *confirm* or *abstain*** (e.g., a validator that returns pass/fail with no semantic content that could supersede), early commit on a prefix is safe. The commit predicate is monotone: no late result can un-commit. - **If the subagent's output can *supersede, disambiguate, or contradict*** a prior result — i.e., the output space includes rollback triggers — then commit must be deferred until the full commit-critical set is resolved. Timeout is not resolution; it is an unresolved state that must be surfaced as `indeterminate`, not coerced into `commit` or `abort`. The decision boundary is therefore: **is the commit predicate monotone in the result set?** If yes, speculative early commit is sound. If no, the orchestrator must either (a) wait for the full set, (b) stage effects without emitting, or (c) commit with an explicit, propagated revocation handle. Choosing (a) costs latency; choosing (c) costs a revocation protocol; choosing to ignore the question costs correctness, silently. ## Operational Effect The operational consequence is that speculative fan-out shifts the correctness burden from "did each subagent return a good answer" to "did the orchestrator's commit predicate account for the full result set, and did it retain a revocation path for every emitted effect." Instances that treat the join barrier as a completion signal will, at low but non-zero rate, emit effects that a later sibling result invalidates, and will be unable to revoke the downstream consequences of those effects. The mitigation is not "wait longer" — a longer timeout only lowers the probability, it does not change the boundary. The mitigation is to classify each subagent's output space as monotone or non-monotone at dispatch, and to gate commit on the non-monotone set being fully resolved. ```python from dataclasses import dataclass from enum import Enum from typing import Callable class SpeculativeCommitError(RuntimeError): """Raised when a commit is attempted on an unresolved non-monotone result set.""" class OutputClass(Enum): MONOTONE = "monotone" # can only confirm or abstain NON_MONOTONE = "non_monotone" # can supersede / disambiguate / contradict @dataclass class SubagentResult: name: str output_class: OutputClass resolved: bool payload: dict def commit_speculative( results: dict[str, SubagentResult], commit_predicate: Callable[[dict[str, SubagentResult]], bool], effect_emitter: Callable[[dict], None], revocation_handle: Callable[[dict], None] | None, ) -> None: # Invariant 1: no commit-critical (non-monotone) subagent may be unresolved. unresolved_critical = [ r.name for r in results.values() if r.output_class is OutputClass.NON_MONOTONE and not r.resolved ] if unresolved_critical: raise SpeculativeCommitError( f"refusing early commit: non-monotone subagents unresolved: " f"{unresolved_critical}; timeout is not resolution" ) # Invariant 2: predicate must be evaluated over the complete resolved set. if not commit_predicate(results): return # Invariant 3: if any non-monotone subagent contributed, a revocation # handle must exist before the effect is externally observable. has_non_monotone = any( r.output_class is OutputClass.NON_MONOTONE for r in results.values() ) if has_non_monotone and revocation_handle is None: raise SpeculativeCommitError( "refusing commit: non-monotone result set present but no revocation " "handle to downstream consumers; rollback would orphan dependents" ) effect = {"committed": True, "inputs": list(results)} effect_emitter(effect) # revocation_handle(effect) is retained by the orchestrator for the # lifetime of any downstream consumer that may read the effect. ```