{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-abort-speculative-parallel-branches-when-a-shared-tool-s-side-effects-are-non-idempotent-and-rollback-cannot-be",
  "title": "Under what conditions must an instance abort speculative parallel branches when a shared tool's side effects are non-idempotent and rollback cannot be proven",
  "date_of_record": "2026 November 26",
  "scope": "Applies to any agent that fans out parallel speculative branches (tree-of-thought, best-of-N, planner/executor forks) that invoke shared external tools with observable side effects, then commits one branch and discards the rest. Does not apply to branches confined to a pure sandbox with provable effect isolation (e.g., copy-on-write filesystem, transactional DB with real rollback, or read-only tools).",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-abort-speculative-parallel-branches-when-a-shared-tool-s-side-effects-are-non-idempotent-and-rollback-cannot-be.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-abort-speculative-parallel-branches-when-a-shared-tool-s-side-effects-are-non-idempotent-and-rollback-cannot-be.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-abort-speculative-parallel-branches-when-a-shared-tool-s-side-effects-are-non-idempotent-and-rollback-cannot-be.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1798,
    "python_slice_tokens": 351,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure here is not \"a branch produced a wrong answer.\" It is that **speculative rollback is a fiction when the tool's side effects escape the branch's effect boundary**. A branch is only rollback-safe if every tool it invoked has an *inverse* the orchestrator can actually execute and *verify*. Most real tools (send_email, charge_card, POST to a third-pa...",
    "what_was_observed": "A planning agent decomposed \"book travel and notify the team\" into three parallel speculative branches, each a different itinerary. Each branch called `search_flights` (idempotent, read-only), then `reserve_seat` (non-idempotent, holds inventory), then `send_itinerary_email` (non-idempotent, irreversible). The orchestrator scored branches and committed the highest-scoring one, then issued \"rollback\" on the two losers...",
    "condition_of_validity": "Speculative parallel execution with commit/rollback is **valid only under all three of the following**, checked per tool, per branch, before fan-out: - **Effect classification is complete and correct.** Every tool the branch may call is tagged `IDEMPOTENT`, `COMPENSABLE` (has a verifiable inverse), or `IRREVERSIBLE`. An unclassified tool defaults to `IRREVER...",
    "decision_boundary": "The orchestrator must make the abort/commit decision at a hard boundary, and the boundary is defined by effect classification, not by branch score: - **Before any `IRREVERSIBLE` call:** the branch must checkpoint and yield to the orchestrator. The orchestrator commits (executes the irreversible calls serially) or discards (does nothing, because nothing irrev...",
    "operational_effect": "When this invariant is enforced, the failure mode disappears but a latency cost appears: irreversible effects serialize at the commit barrier, so the fan-out speedup applies only to the speculative (read + compensable) phase. The orchestrator must budget token and wall-clock cost for the serial commit tail, and the planner must be told (via tool schema) whic..."
  },
  "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": "086a74d26124252a87decfb69a758f479005cc5f8db657fab0ce099a46590691",
    "verified_classes": [
      "EffectClass",
      "SpeculationBoundaryError",
      "ToolCall",
      "Branch",
      "SpeculativeOrchestrator"
    ],
    "verified_functions": [
      "__init__",
      "record_call",
      "commit",
      "rollback",
      "reconcile"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "SpeculationBoundaryError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
