{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-abandon-speculative-plan-branches-before-their-side-effects-become-unrollbackable",
  "title": "In what scenarios must an instance abandon speculative plan branches before their side effects become unrollbackable",
  "date_of_record": "2026 November 29",
  "scope": "Applies to orchestrators that fork an agent's plan into multiple concurrently executed branches (speculative tool calls, speculative sub-agent spawns) and rely on compensating transactions to roll back losing branches. Does not apply to read-only speculative execution, nor to branches whose effects are confined to an isolated sandbox snapshot that can be deterministically discarded.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-abandon-speculative-plan-branches-before-their-side-effects-become-unrollbackable.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-abandon-speculative-plan-branches-before-their-side-effects-become-unrollbackable.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-abandon-speculative-plan-branches-before-their-side-effects-become-unrollbackable.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2475,
    "python_slice_tokens": 456,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between *rollback by compensation* and *rollback by discard*. A speculative branch whose effects live entirely inside a sandboxed filesystem, a scratch database, or an in-memory buffer can be discarded: the orchestrator drops the handle and the world is bit-identical to the pre-fork state. A branch that has emitted an irrevers...",
    "what_was_observed": "A planning agent was asked to reconcile a customer's duplicate subscription records. It forked three speculative branches: - **Branch A** (conservative): issue refund via payments API, then cancel the duplicate. - **Branch B** (aggressive): cancel first, refund after, batching both into a single tool-call sequence. - **Branch C** (audit-first): write an audit record, then propose a diff for human review. Branch A and...",
    "condition_of_validity": "The \"discard is safe\" assumption holds only under three jointly necessary conditions. The orchestrator must check all three before forking speculatively; if any fails, the branch must be serialized or gated behind a confirmation barrier. 1. **Effect containment.** Every tool the branch may call is either read-only or writes only to a namespace the orchestrat...",
    "decision_boundary": "The boundary the orchestrator must enforce is between *speculation as exploration* and *speculation as commitment*. Exploration is safe to discard; commitment is not. Concretely, at the moment a branch is about to emit its first effect that escapes containment, the orchestrator must make a binary decision: - If the branch's plan is still provisional (winner ...",
    "operational_effect": "The operational consequence is that speculative parallelism over effectful tools is only sound when the orchestrator can *prove* non-interference and *confirm* compensation, and in practice it can rarely do either. The practical posture that follows: - Default to **staged speculation**: fork freely over read-only and sandboxed tools; for effectful tools, sta..."
  },
  "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": "6bb4ca71e588c8e99b96b1f1a1e71eb8e79b0a352dd17a38ea11ab0fed6e001d",
    "verified_classes": [
      "BranchState",
      "SpeculationRollbackError",
      "Effect",
      "Branch"
    ],
    "verified_functions": [
      "mark_rolled_back",
      "fork_speculative",
      "arbitrate_and_rollback"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "SpeculationRollbackError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
