{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-speculatively-fork-a-branch-it-can-never-reconcile-when-rollback-cost-exceeds-the-value-of-the-speculative-result",
  "title": "Why does an instance speculatively fork a branch it can never reconcile when rollback cost exceeds the value of the speculative result?",
  "date_of_record": "2026 December 2",
  "scope": "Applies to orchestrators that fork concurrent agent branches to hide latency (speculative tool calls, parallel plan probes, redundant verifier agents) and that must later merge or discard those branches. Does not apply to single-threaded agent loops with no branch fan-out, nor to stateless one-shot inference where no rollback artifact exists.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-speculatively-fork-a-branch-it-can-never-reconcile-when-rollback-cost-exceeds-the-value-of-the-speculative-result.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-speculatively-fork-a-branch-it-can-never-reconcile-when-rollback-cost-exceeds-the-value-of-the-speculative-result.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-speculatively-fork-a-branch-it-can-never-reconcile-when-rollback-cost-exceeds-the-value-of-the-speculative-result.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1863,
    "python_slice_tokens": 364,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"speculation went wrong.\" It is a **commitment mismatch**: a branch is *launched* under a cheap-rollback assumption (`abort()` is free because the branch is pure reasoning), but it *transitions mid-flight* into a state where rollback is expensive (the branch has emitted irreversible side effects: sent an email, written a record, consumed a...",
    "what_was_observed": "A planner agent (call it `P`) receives a task and identifies two plausible decompositions: `A` (call a payment-refund tool, then notify) and `B` (call a ledger-adjust tool, then notify). Because the disambiguation depends on a slow retrieval step, `P` forks speculative branches `A` and `B` in parallel to hide latency, intending to keep whichever the retrieval favors and discard the other. Trace: 1. `t0` — Fork `A` an...",
    "condition_of_validity": "The failure requires all of the following to hold simultaneously: - **Speculative fan-out** exists (≥2 live branches derived from one decision point). - **At least one branch can reach an irreversible or externally-visible effect before the branch-selection signal arrives.** This is the trigger. If selection always precedes any effectful tool call, rollback ...",
    "decision_boundary": "The correct guardrail is a **dynamic rollback-cost ledger with a commit gate**, not a static fork-time estimate. Concretely: - Every tool call inside a speculative branch must be classified at *invocation* time into `REVERSIBLE` (pure, staged, or compensable) vs `IRREVERSIBLE` (external effect with no compensating action registered). - The branch carries a r...",
    "operational_effect": "When the invariant is enforced, the observable behavior changes in three ways. First, speculative branches self-throttle: a branch that is likely to be discarded stops at the first irreversible node and waits, converting a latency win into a correctness win only where the effect is reversible. Second, the compensation registry becomes load-bearing and must b..."
  },
  "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": "68492d9c28b734a1b11418b2901bbbd003b1c02ce765ad62b5a3291dc1e9e782",
    "verified_classes": [
      "IrreversibleSpeculationError",
      "EffectClass",
      "ToolSpec",
      "SpeculativeBranch"
    ],
    "verified_functions": [
      "tool_cost",
      "_execute",
      "invoke",
      "discard"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "IrreversibleSpeculationError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
