{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-in-a-speculative-parallel-branch-commit-an-irreversible-external-effect-before-the-winning-branch-is-known-and-how-do-we-bound-it",
  "title": "Why does an instance in a speculative parallel branch commit an irreversible external effect before the winning branch is known, and how do we bound it?",
  "date_of_record": "2026 November 25",
  "scope": "Applies to multi-agent orchestrators that speculatively fork a plan into parallel execution branches and roll back losing branches after arbitration. Does not apply to strictly sequential single-agent loops or to branches whose tool calls are all provably pure/idempotent and side-effect-free.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-in-a-speculative-parallel-branch-commit-an-irreversible-external-effect-before-the-winning-branch-is-known-and-how-do-we-bound-it.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-in-a-speculative-parallel-branch-commit-an-irreversible-external-effect-before-the-winning-branch-is-known-and-how-do-we-bound-it.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-in-a-speculative-parallel-branch-commit-an-irreversible-external-effect-before-the-winning-branch-is-known-and-how-do-we-bound-it.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1682,
    "python_slice_tokens": 274,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Rollback is a *state* operation, not a *world* operation. Optimistic execution assumes that a losing branch can be \"undone\" by discarding its context, its scratchpad, and its local memory writes. That assumption holds for internal agent state. It fails the moment a branch emits a tool call with **external, non-idempotent, irreversible side effects** — a paym...",
    "what_was_observed": "A planner agent decomposed a task (\"reconcile invoice, notify customer, archive record\") into a DAG and speculatively launched three parallel branches with different reconciliation strategies. Each branch was given the same tool surface, including `send_email`, `charge_card`, and `archive_record`. Branch B reached a confident intermediate state after two tool calls and, following its own local reasoning, invoked `cha...",
    "condition_of_validity": "Optimistic parallel execution with rollback is valid **iff** every tool call reachable from a speculative branch is one of: (a) pure — no external effect; (b) idempotent under a branch-scoped idempotency key derived from `(task_id, branch_id, step_index)`; or (c) deferred — the call is staged into an outbox and only flushed after arbitration commits the bran...",
    "decision_boundary": "The orchestrator must classify each tool at registration time into `PURE`, `IDEMPOTENT_KEYED`, or `EFFECTFUL_DEFERRED`, and the branch scheduler must refuse to place an `EFFECTFUL_DEFERRED` tool inside a speculative region unless it is routed through the outbox. The decision boundary is *not* \"does the branch look confident\" — that is the failure mode observ...",
    "operational_effect": "Without the invariant, the system exhibits *silent divergence*: the orchestrator's state and the external world disagree, and the disagreement is invisible to every subsequent verification step because verification replays the orchestrator's log, not the world. The failure is not detected by consensus checks, not by replay, and not by the branch's own self-r..."
  },
  "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": "7f5128111d1a4dbbc32a770932577e9cce01c27e834c23e2248cc360ffaebbd4",
    "verified_classes": [
      "EffectClass",
      "SpeculativeEffectViolation",
      "ToolCall",
      "Branch",
      "EffectLog"
    ],
    "verified_functions": [
      "dispatch",
      "__init__",
      "record",
      "has_effect"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "SpeculativeEffectViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
