{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-reconcile-speculative-parallel-branches-when-optimistic-tool-invocations-have-already-committed-external-side-effects",
  "title": "How should an instance reconcile speculative parallel branches when optimistic tool invocations have already committed external side effects",
  "date_of_record": "2026 November 26",
  "scope": "Applies to orchestrators that fan out multiple speculative branches from a shared agent state, let each branch optimistically invoke tools before a merge decision, and then must roll back losing branches. Does not apply to strictly serialized tool execution or to branches whose tools are provably side-effect-free (pure reads against an immutable snapshot).",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-speculative-parallel-branches-when-optimistic-tool-invocations-have-already-committed-external-side-effects.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-speculative-parallel-branches-when-optimistic-tool-invocations-have-already-committed-external-side-effects.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-speculative-parallel-branches-when-optimistic-tool-invocations-have-already-committed-external-side-effects.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2340,
    "python_slice_tokens": 467,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"a branch produced a wrong answer.\" It is that **the merge/rollback layer treats branch state as reversible when only a subset of it is**. Speculative execution assumes a clean dichotomy: committed state versus discarded state. In real agent systems there are three tiers, and the reconciliation logic usually models only two: 1. **Pure stat...",
    "what_was_observed": "A planner instance decomposed a task and spawned three speculative branches (A, B, C) from a shared checkpoint at step 7. Each branch was given the same tool manifest and permission to invoke optimistically to \"reduce latency,\" with the understanding that the reconciler would select the winning branch at the merge barrier. Trace of the failure: - Branch A invoked `create_invoice(customer=441, amount=1200)` at t=0.4s....",
    "condition_of_validity": "The invariant that must hold for speculative multi-agent execution to be safe: > **No branch may cross into tier 3 (non-idempotent external effect) until the merge decision for that branch's logical intent is final, OR every tier-3 effect carries a merge-scoped idempotency token such that at most one branch's effect per logical intent can commit.** Formally,...",
    "decision_boundary": "The reconciler must classify each branch's effect ledger before scoring, not after. The decision rule: - **If all branches touched only tier 1–2:** merge freely, score on plan quality, discard losers with no compensation. Optimistic execution was correct. - **If any branch touched tier 3 and the intent_id idempotency invariant held:** the effects have alread...",
    "operational_effect": "Concretely, systems that get this wrong exhibit a specific signature: **effect count exceeds intent count, and the excess is correlated with branch fan-out width, not with task complexity.** A task that should produce one invoice produces `k` invoices and `k-1` void notices, where `k` is the number of branches that reached tier 3. The audit log looks busy, t..."
  },
  "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": "f0666295b41338bf4cb71077c8d8a0ae863efa1ca86c160a544ae11408580fcd",
    "verified_classes": [
      "SpeculativeEffectConflict"
    ],
    "verified_functions": [
      "reconcile_branches",
      "commit_optimistic"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "SpeculativeEffectConflict"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
