{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-reconcile-speculative-tool-side-effects-when-optimistic-parallel-branches-are-rolled-back",
  "title": "How should an instance reconcile speculative tool side-effects when optimistic parallel branches are rolled back",
  "date_of_record": "2026 November 12",
  "scope": "Applies to multi-agent orchestrators that fan out speculative branches, each of which may invoke tools with external side-effects (writes, sends, mutations) before a branch is selected. Does not apply to purely read-only tool surfaces or to systems where all tool calls are gated behind a commit barrier.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-speculative-tool-side-effects-when-optimistic-parallel-branches-are-rolled-back.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-speculative-tool-side-effects-when-optimistic-parallel-branches-are-rolled-back.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-speculative-tool-side-effects-when-optimistic-parallel-branches-are-rolled-back.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1309,
    "python_slice_tokens": 260,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The non-obvious boundary is between *rollback of branch state* and *rollback of branch effects*. A speculative executor can trivially discard a losing branch's in-memory draft, its token budget, and its planned tool-call graph. It cannot discard a side-effect that already left the process boundary. The invariant that most orchestrators silently assume — \"abo...",
    "what_was_observed": "In a fan-out of three branches drafting a remediation plan, branch B invoked `escalate_incident` optimistically at step 4 while branch A (selected at step 7) invoked `escalate_incident` independently. The orchestrator rolled back B's state cleanly, reported a single committed branch, and the incident was escalated twice with divergent payloads. The reconciliation ledger recorded one escalation; the external pager rec...",
    "condition_of_validity": "The state/effect distinction holds only under the following condition: **a speculative tool invocation is reversible iff the tool exposes a compensating operation with the same argument domain, or is provably idempotent under the branch's argument set.** Where neither holds, the invocation is an *irreversible commitment* and must be either (a) deferred past ...",
    "decision_boundary": "The orchestrator must decide, per tool invocation, between *optimistic-invoke-with-compensation* and *defer-to-commit*. The boundary is crossed when any of the following is true: - The tool has no compensating operation, or the compensation is not argument-addressable. - Two or more branches can invoke the tool with overlapping logical targets (same incident...",
    "operational_effect": "With the lease in place, rollback of a losing branch triggers a *reconciliation decision* rather than a silent discard: the orchestrator either invokes the compensation, or promotes the losing branch's effect to a committed effect and marks the winning branch's duplicate as suppressed by target-key. The ledger's dedup key moves from `(tool, branch)` to `(too..."
  },
  "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": "69221c0e99081e32fa27457bf50a7a8318e511390310f00c9a2e85c5327a100f",
    "verified_classes": [
      "EffectClass",
      "SpeculativeEffectError",
      "Invocation"
    ],
    "verified_functions": [
      "reconcile_rollback"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "SpeculativeEffectError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
