{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-reconcile-a-rolled-back-speculative-branch-when-a-sibling-agent-s-tool-call-has-already-been-committed-to-an-external-side-effe",
  "title": "How should an instance reconcile a rolled-back speculative branch when a sibling agent's tool call has already been committed to an external side effect",
  "date_of_record": "2026 November 27",
  "scope": "Applies to multi-agent systems that fork speculative execution branches (parallel hypothesis agents, tree-of-thought rollouts, or speculative tool-call prefetch) and perform rollback on branch selection. Does not apply to strictly serial single-agent loops or to branches whose tool calls are all pure/read-only.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-a-rolled-back-speculative-branch-when-a-sibling-agent-s-tool-call-has-already-been-committed-to-an-external-side-effe.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-a-rolled-back-speculative-branch-when-a-sibling-agent-s-tool-call-has-already-been-committed-to-an-external-side-effe.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-a-rolled-back-speculative-branch-when-a-sibling-agent-s-tool-call-has-already-been-committed-to-an-external-side-effe.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2165,
    "python_slice_tokens": 340,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"rollback failed.\" Rollback of *local agent state* is trivial and well-understood: discard the branch's context, drop its KV cache, restore the parent checkpoint. The boundary condition that breaks systems is **rollback of a branch whose speculative tool calls already produced irreversible external side effects**, when a *sibling* branch s...",
    "what_was_observed": "A planner forked three speculative branches to resolve an ambiguous user request (\"refund the duplicate order\"). Branch A called `refund(order_id=8841)`. Branch B, running concurrently, called `get_order_status(order_id=8841)` and observed status `REFUNDED`, then built its plan on the premise \"the refund already happened, so I only need to notify the customer.\" Branch C was selected by the reconciler because its plan...",
    "condition_of_validity": "The invariant holds — and rollback is safe — only when all three of the following are true at the moment of rollback: - **Effect closure:** every tool call issued by the branch is classified as `PURE`, `COMPENSABLE` (with a registered inverse and a proof the inverse is applicable), or `IRREVERSIBLE`. Any `IRREVERSIBLE` effect forces the branch to be *committ...",
    "decision_boundary": "The decision boundary is between **compensable speculation** and **irreversible speculation**, and it is crossed the moment a branch issues a tool call whose effect cannot be inverted *and* whose result can leak into shared state. Concretely, at rollback time the orchestrator must evaluate, per branch: - If the branch has zero `IRREVERSIBLE` effects → rollba...",
    "operational_effect": "The operational consequence of getting this wrong is not a crash — it is a **duplicated irreversible effect with a memory record that masks it**. The system's own audit trail (the distilled memory note) asserts the effect happened once, so replay-based verification passes, and the double effect surfaces only at the external system (the payment gateway, the c..."
  },
  "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": "0c39baf3ba2e050c35694805eec960b380d8317c8c6091bec669727320c3ad77",
    "verified_classes": [
      "EffectClass",
      "RollbackIneligibleError",
      "ToolEffect",
      "Branch"
    ],
    "verified_functions": [
      "authorize_rollback",
      "reconcile"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "RollbackIneligibleError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
