{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-speculatively-commits-a-side-effecting-tool-call-in-a-parallel-branch-and-the-reconciler-must-roll-back-against-a-non-id",
  "title": "What happens when an instance speculatively commits a side-effecting tool call in a parallel branch and the reconciler must roll back against a non-idempotent external system",
  "date_of_record": "2026 November 21",
  "scope": "Applies to orchestrators that fan out parallel branch rollouts from a shared checkpoint, allow branches to optimistically execute tool calls with external side effects, and later reconcile/roll back losing branches. Does not apply to pure read-only fan-out, side-effect-free sandboxes, or systems with transactional external APIs.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-speculatively-commits-a-side-effecting-tool-call-in-a-parallel-branch-and-the-reconciler-must-roll-back-against-a-non-id.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-speculatively-commits-a-side-effecting-tool-call-in-a-parallel-branch-and-the-reconciler-must-roll-back-against-a-non-id.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-speculatively-commits-a-side-effecting-tool-call-in-a-parallel-branch-and-the-reconciler-must-roll-back-against-a-non-id.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1790,
    "python_slice_tokens": 283,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Speculative parallel execution is safe only when the *speculation primitive* and the *commit primitive* are separable. Most agent runtimes conflate them: a branch \"runs\" a tool call and the runtime treats the returned output as evidence the call happened, which is true, but also treats the branch as *reversible* because it is \"speculative,\" which is false wh...",
    "what_was_observed": "A planner agent decomposes a task (\"provision staging environment, seed it, run smoke tests\") into three branches executed concurrently from a shared checkpoint `C0`. Branch A provisions the database via `db.create_instance(name=\"stg-7\")`. Branch B, speculatively, calls `db.create_instance(name=\"stg-7\")` as well — because the planner's branch hypotheses were not deduplicated on tool arguments, only on subgoal text. B...",
    "condition_of_validity": "The reconciler's rollback is only sound under all of the following: 1. **Effect provenance is external.** Every mutation is recorded in an effect ledger keyed by `(tool, canonical_args, idempotency_key, branch_id, observed_status, external_handle)`, written by the tool wrapper at the transport layer, not by the agent's reasoning layer. Branch-declared logs a...",
    "decision_boundary": "The reconciler faces a fork at the moment a losing branch's declared effects do not match the ledger: - If the ledger shows the losing branch produced **zero observed external handles** for a mutation class, the correct action is **no compensation** for that class. The branch's declared success is a phantom; roll back only its local memory and context. - If ...",
    "operational_effect": "After the incident, the runtime was changed so that (a) the tool wrapper writes the effect ledger before returning any status to the branch, including synthesized ones, and synthesizes handles as explicit `UNKNOWN` sentinels rather than nulls; (b) the reconciler refuses to emit any compensating action against an `UNKNOWN` handle and instead raises a reconcil..."
  },
  "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": "4a16fd4560fd435ce33d8808a9195642dbcb10bb0f274c9beff89edc3d43b6b7",
    "verified_classes": [
      "ReconciliationHalt",
      "EffectRecord"
    ],
    "verified_functions": [
      "reconcile_losing_branch"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ReconciliationHalt"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
