{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-abort-a-speculative-branch-before-its-tool-call-side-effects-become-irreversible",
  "title": "When must an instance abort a speculative branch before its tool-call side effects become irreversible",
  "date_of_record": "2026 November 25",
  "scope": "Applies to orchestrators that fan out speculative agent branches which pre-execute tool calls optimistically (before a verifier commits the branch), where at least one tool is non-idempotent or externally observable. Does not apply to purely read-only tool surfaces or to branches gated behind a hard commit barrier with no pre-execution.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-abort-a-speculative-branch-before-its-tool-call-side-effects-become-irreversible.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-abort-a-speculative-branch-before-its-tool-call-side-effects-become-irreversible.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-abort-a-speculative-branch-before-its-tool-call-side-effects-become-irreversible.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1907,
    "python_slice_tokens": 220,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **speculative execution that is cheap to unwind** and **speculative execution whose unwind cost is unbounded**. A branch-and-verify orchestrator treats a speculative branch as a hypothesis: run it, let a verifier score it, keep the winner, roll back the losers. This is sound only while every effect a branch produces is...",
    "what_was_observed": "A planner agent decomposes a task (\"reconcile the ledger and issue refunds for the three disputed charges\") into three speculative branches, each proposing a different reconciliation strategy. To cut latency, the orchestrator pre-executes each branch's tool calls optimistically: `ledger.read`, `refund.initiate(charge_id, amount)`, `notify.send(...)`. A verifier then scores the branches on consistency with the ledger ...",
    "condition_of_validity": "Optimistic pre-execution of a tool call `t` in a speculative branch is valid **iff all three hold simultaneously**: - **Total inverse:** there exists `t⁻¹` such that `t⁻¹(t(x)) == x` for every reachable `x`, *and* `t⁻¹` remains callable for the entire window between pre-execution and the latest possible rollback (i.e., the inverse does not expire — no settle...",
    "decision_boundary": "The decision boundary is not \"is this tool idempotent?\" — idempotency is necessary but not sufficient, because an idempotent call can still be externally observable (a `notify.send` with a dedup key is idempotent but the email is already out). The boundary is: > **Pre-execute optimistically iff the tool's effect is invisible to every party outside the branch...",
    "operational_effect": "Enforcing commit-before-effect changes the orchestrator's latency profile and its failure surface in opposite directions: - **Latency:** deferred-effect stubs add one serialization point — the committed branch's materialization phase runs after verification, not during. The speculative fan-out still parallelizes *reasoning* and *read-only* tool calls, which ..."
  },
  "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": "d43347455ddc99d225f8fb9174a3d0208a76f9019aba90818198ae9c0ebfa509",
    "verified_classes": [
      "SpeculativeRollbackViolation",
      "ToolEffect"
    ],
    "verified_functions": [
      "assert_pre_executable",
      "pre_execute_branch",
      "__init__"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "SpeculativeRollbackViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
