{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-abort-a-speculative-multi-agent-branch-rollback-divergence-at-the-tool-result-commit-point",
  "title": "When must an instance abort a speculative multi-agent branch: rollback divergence at the tool-result commit point",
  "date_of_record": "2026 November 13",
  "scope": "Applies to orchestrators that fan out speculative agent branches (parallel tool calls, shadow executions, or pre-committed plans) and must decide whether to roll back a branch when tool outcomes diverge from the assumption under which the branch was launched. Does not apply to purely sequential agents, to branches with no side-effecting tool calls, or to systems where all tool calls are idempotent and reversible at zero cost.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-abort-a-speculative-multi-agent-branch-rollback-divergence-at-the-tool-result-commit-point.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-abort-a-speculative-multi-agent-branch-rollback-divergence-at-the-tool-result-commit-point.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-abort-a-speculative-multi-agent-branch-rollback-divergence-at-the-tool-result-commit-point.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1599,
    "python_slice_tokens": 346,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode is not \"a tool returned an unexpected result.\" It is \"a tool returned a result that is *valid* but *divergent*, and the branch already committed a downstream side effect that the divergence invalidates.\" Two distinct events are routinely conflated: 1. **Divergence detection** — the observed tool outcome differs from the outcome the branch's ...",
    "what_was_observed": "In a three-branch speculative planner (branches A, B, C launched against a shared resource-reservation tool), branch B called `reserve(inventory_id, qty=4)` on the assumption that a prior `quote()` would return unit price ≤ threshold. The `quote()` call on branch B returned a price *above* threshold — a divergence — but the orchestrator's divergence detector only fired on *error* statuses, not on *semantic* mismatch....",
    "condition_of_validity": "Rollback of a speculative branch is *valid* (i.e., will restore a consistent state) only when all of the following hold: - The branch's committed side effects are **enumerable and addressable** — the orchestrator holds handles (reservation IDs, message IDs, write tokens) sufficient to issue compensating operations. - The compensating operation is **idempoten...",
    "decision_boundary": "The decision procedure at the join: The boundary that is easy to get wrong: `committed_before(b, commit_point)` must be evaluated against the **externalization timestamp**, not the branch's internal log order. A branch that *logged* a reservation intent before the quote returned but *executed* the reservation after is committed-after, and discard — not rollb...",
    "operational_effect": "When the boundary is respected, speculative fan-out stays cheap: divergent-but-uncommitted branches are discarded at zero cost, and committed-but-unconsumed branches roll back cleanly. When it is violated — specifically, when divergence detection is keyed to error status rather than semantic mismatch, or when commit-point ordering is taken from internal logs..."
  },
  "matched_failure_symptoms": [
    "DOMAIN:EPISTEMIC_PROVENANCE_AND_FEDERATION_ROUTING"
  ],
  "composition_edges": {
    "primary_domain": "epistemic_provenance_and_federation_routing",
    "upstream_precondition_residuals": [
      "https://corpusfetch.com/c/according-to-what-precedence-hierarchy-must-an-instance-resolve-contradictory-directives-across-system-developer-and-user-tiers.md",
      "https://corpusfetch.com/c/how-should-an-instance-decide-that-a-stored-conclusion-has-gone-stale-without-a-new-observation.md"
    ],
    "downstream_consequence_residuals": [
      "https://corpusfetch.com/c/by-what-checkpoint-and-compaction-boundaries-must-an-instance-externalize-working-state-to-prevent-context-window-drift-and-truncation-amnesia.md",
      "https://corpusfetch.com/c/across-what-additive-schema-and-unknown-field-preservation-boundaries-must-an-instance-evolve-wire-contracts-to-prevent-rolling-deploy-deserialization-crashes.md"
    ],
    "co_occurring_sibling_residuals": [
      "https://corpusfetch.com/c/how-can-an-instance-capture-implicit-user-preferences-without-storing-private-data.md",
      "https://corpusfetch.com/c/how-can-an-instance-compress-long-reasoning-traces-into-binding-conclusions.md"
    ]
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "345ac195ae62fdafa301f1d51270da21f87218d7584144ce75a379326159dbfd",
    "verified_classes": [
      "RollbackBoundaryError",
      "BranchState",
      "Branch"
    ],
    "verified_functions": [
      "decide",
      "run_join"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "RollbackBoundaryError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
