{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-speculatively-invoke-a-tool-in-a-parallel-branch-commit-its-side-effect-and-then-discover-the-parent-orchestrator-rolled-back-to",
  "title": "Why does an instance speculatively invoke a tool in a parallel branch, commit its side effect, and then discover the parent orchestrator rolled back to a sibling branch?",
  "date_of_record": "2026 November 29",
  "scope": "Applies to orchestrator agents that fork parallel branch rollouts to hedge against probabilistic reasoning divergence, where branches may autonomously invoke tools with external side effects before a winner is selected. Does not apply to read-only tool surfaces or to single-threaded pipelines with no speculative fork.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-speculatively-invoke-a-tool-in-a-parallel-branch-commit-its-side-effect-and-then-discover-the-parent-orchestrator-rolled-back-to.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-speculatively-invoke-a-tool-in-a-parallel-branch-commit-its-side-effect-and-then-discover-the-parent-orchestrator-rolled-back-to.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-speculatively-invoke-a-tool-in-a-parallel-branch-commit-its-side-effect-and-then-discover-the-parent-orchestrator-rolled-back-to.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1640,
    "python_slice_tokens": 413,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A speculative branch is a *tentative* reasoning trajectory. Its internal state — context deltas, scratchpads, intermediate tool results — is expected to be discardable if the orchestrator selects a sibling. This holds fine for pure computation. It breaks the moment a branch invokes a tool whose effect is *external and durable*: writing a record, sending a me...",
    "what_was_observed": "An orchestrator forks three branches (A, B, C) at a decision point. All three receive the same pre-fork context and a shared tool manifest. Branch A decides, mid-trajectory, that it needs to resolve a customer record and calls `crm.update_status(id, \"escalated\")`. The call returns 200. Branch A continues, then diverges into a low-confidence path and is abandoned. The orchestrator's scorer prefers Branch B, commits B,...",
    "condition_of_validity": "The rollback-safety of speculative execution is valid only under the conjunction: 1. Every tool in the branch manifest is either read-only or *deferred*: invocations are recorded as intents, not executed, until commit. 2. The orchestrator maintains an effect ledger keyed by `(branch_id, tool_call_id, idempotency_key)` that survives branch discard. 3. Rollbac...",
    "decision_boundary": "The boundary is crossed at the instant a branch calls a tool with `side_effect=True` while `branch.committed == False`. Two legitimate designs exist and the pipeline must pick one explicitly: - **Deferred execution (two-phase):** branches may *propose* tool calls; the orchestrator executes only the winning branch's proposals, in order, after commit. Safe, bu...",
    "operational_effect": "When the boundary is crossed, the orchestrator's commit decision becomes unsound: it selects a winner based on outputs while the world state has been shaped by losers. Downstream agents inherit a trajectory whose preconditions are false, and because the mutation is durable, replaying the run does not reproduce it — the second run starts from a world already ..."
  },
  "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": "6e6ba1060e794dfda5e145ed682477badd639fbc9563f81f23ce40c6748f02a0",
    "verified_classes": [
      "SpeculativeEffectError",
      "ToolKind",
      "ToolSpec",
      "EffectEntry",
      "Branch",
      "SpeculativeOrchestrator"
    ],
    "verified_functions": [
      "__init__",
      "fork",
      "invoke",
      "commit",
      "rollback"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "SpeculativeEffectError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "hashlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
