{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-rolls-back-a-speculative-subtree-but-the-sibling-branch-s-tool-side-effects-have-already-escaped-the-compensation-bounda",
  "title": "What happens when an instance rolls back a speculative subtree but the sibling branch's tool side effects have already escaped the compensation boundary",
  "date_of_record": "2026 November 30",
  "scope": "Applies to orchestrators that fork multiple speculative agent branches from a shared checkpoint, execute them concurrently, and commit one branch while rolling back the rest via compensating actions. Does not apply to single-branch linear execution or to branches whose tools are declared strictly idempotent and reversible within the same transaction.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-rolls-back-a-speculative-subtree-but-the-sibling-branch-s-tool-side-effects-have-already-escaped-the-compensation-bounda.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-rolls-back-a-speculative-subtree-but-the-sibling-branch-s-tool-side-effects-have-already-escaped-the-compensation-bounda.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-rolls-back-a-speculative-subtree-but-the-sibling-branch-s-tool-side-effects-have-already-escaped-the-compensation-bounda.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2124,
    "python_slice_tokens": 318,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two distinct notions of \"rollback\" in a speculative multi-agent tree, and conflating them is the entire failure. **Logical rollback** restores the orchestrator's state graph to the fork point and discards the divergent subtree's memory, plan, and intermediate artifacts. **Physical rollback** must additionally undo the external effects that branch's...",
    "what_was_observed": "A planner agent forked three speculative subtrees from a checkpoint at step 7 of a document-reconciliation task: branch A (reconcile via ledger diff), branch B (reconcile via invoice match), branch C (reconcile via bank feed). Each branch ran with its own tool budget and its own private scratch namespace. The orchestrator intended to commit whichever branch produced the highest-confidence reconciliation and roll back...",
    "condition_of_validity": "The invariant that must hold for speculative rollback to be sound is: **for every tool invocation made by a speculative branch, either the effect is buffered until commit, or an idempotent inverse is registered against the branch's fork token — not its commit token — before the tool returns.** This is a stricter condition than most speculative-execution fram...",
    "decision_boundary": "The boundary between sound and unsound speculative rollback is whether the orchestrator can answer, at discard time, the question: *which external effects did this branch cause, and can each be inverted?* If the answer requires reconstructing the branch's tool-call history from logs, the system is already unsound — reconstruction is a post-hoc audit, not a r...",
    "operational_effect": "The operational consequence of crossing this boundary is **phantom state**: external effects that belong to no committed branch, persist across rollback, and are invisible to the orchestrator's state graph. Phantom state is worse than a plain failure because it is silent. The orchestrator's rollback handler returns success, the state graph is consistent, and..."
  },
  "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": "24c57c2ecbdda21184dd85fbc953a966bd41a817c69d0db98be01969599fbcca",
    "verified_classes": [
      "PhantomEffectError",
      "CompensationRegistry"
    ],
    "verified_functions": [
      "discard_branch",
      "register",
      "begin_tool_call",
      "end_tool_call",
      "drain",
      "rollback"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "PhantomEffectError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing",
      "uuid"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
