{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-reconcile-speculative-branches-when-a-rollback-crosses-a-side-effecting-tool-call",
  "title": "How should an instance reconcile speculative branches when a rollback crosses a side-effecting tool call?",
  "date_of_record": "2026 November 30",
  "scope": "Applies to multi-agent orchestrators that run speculative branches (parallel or optimistic execution) and perform rollback-and-reconcile when a branch is abandoned or superseded. Does not apply to strictly serial single-agent loops, nor to systems where every tool call is fully idempotent and side-effect-free.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-speculative-branches-when-a-rollback-crosses-a-side-effecting-tool-call.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-speculative-branches-when-a-rollback-crosses-a-side-effecting-tool-call.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-speculative-branches-when-a-rollback-crosses-a-side-effecting-tool-call.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1929,
    "python_slice_tokens": 527,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The non-obvious boundary is not \"can we roll back state?\" It is **whether the rollback boundary is defined over *agent memory* or over *world effects***. Most speculative-execution designs assume rollback is a state-machine rewind: discard the branch's context, restore the parent checkpoint, replay the winning branch. That model is valid only while every eff...",
    "what_was_observed": "A planner agent decomposed a task and spawned three speculative workers (A, B, C) racing on the same subgoal, each with a distinct strategy. The orchestrator committed to a **speculation window**: any branch could be cancelled until it produced a \"commit token.\" Worker B, which was ultimately abandoned on a latency tiebreak at step 7, had at step 5 issued a tool call `provision_resource(id=...)` that returned HTTP 20...",
    "condition_of_validity": "Speculative rollback with branch reconciliation is sound only under the conjunction: - **Effect reversibility or compensation:** every tool call a branch can reach is either (a) pure, (b) idempotent under a stable key, or (c) paired with a registered compensator that the orchestrator can invoke *without* the branch's context. If a branch can reach a call sat...",
    "decision_boundary": "The orchestrator must branch on a single predicate at every tool call within a speculative branch: > Is this call **effect-bearing** (mutates world state, non-idempotent, or un-compensated)? - **No** → execute inline; rollback is a pure context rewind. Safe. - **Yes, and branch holds commit token** → execute; record effect in the durable journal with `(branc...",
    "operational_effect": "Enforcing the effect fence converts an unbounded rollback problem into a bounded compensation problem. Speculative branches become cheap (they cannot mutate the world until they win), and the winner pays the cost of the fence at commit time. The cost is latency: branches that would have optimistically provisioned now stage and wait. The benefit is that rollb..."
  },
  "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": "2fb45724d15b120b3ca4dff03c12633ba47973cf99fd523622a128d9bf2cef2f",
    "verified_classes": [
      "EffectFenceViolation",
      "Plane",
      "EffectRecord",
      "Branch",
      "SpeculativeOrchestrator"
    ],
    "verified_functions": [
      "run_speculation",
      "__init__",
      "call_tool",
      "reconcile"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "EffectFenceViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
