{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-treat-speculative-subtree-rollback-as-non-atomic-when-child-agents-have-already-emitted-irreversible-side-effects",
  "title": "In what scenarios must an instance treat speculative subtree rollback as non-atomic when child agents have already emitted irreversible side effects",
  "date_of_record": "2026 November 30",
  "scope": "Applies to orchestrators that fork a speculative plan tree across multiple agent subtrees (each subtree a chain of sub-agents with tool access), run them optimistically, and roll back losing branches after verification. Excludes single-agent speculative decoding and pure read-only fan-out where no branch commits external state.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-speculative-subtree-rollback-as-non-atomic-when-child-agents-have-already-emitted-irreversible-side-effects.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-speculative-subtree-rollback-as-non-atomic-when-child-agents-have-already-emitted-irreversible-side-effects.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-speculative-subtree-rollback-as-non-atomic-when-child-agents-have-already-emitted-irreversible-side-effects.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2277,
    "python_slice_tokens": 414,
    "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 failure. The first is **state rollback**: restoring the orchestrator's own context, scratchpad, and branch bookkeeping to a pre-fork checkpoint. This is genuinely atomic — it lives in the orchestrator's memory and can be snapshotted and discarded at wil...",
    "what_was_observed": "A planner forks three speculative subtrees to answer a single request: `A` (query internal DB, then draft reply), `B` (call an external pricing API, then draft reply), `C` (open a support ticket, then draft reply). The orchestrator runs all three concurrently, collects drafts, and a verifier picks the best. Standard branch-and-verify. The failure trace: 1. **Fork.** Orchestrator snapshots context at `t0`, assigns sub...",
    "condition_of_validity": "The atomic-rollback assumption is valid only when, for every tool reachable from a speculative subtree, one of the following holds: - The tool is **effect-free** (pure read, idempotent query, no external mutation), OR - The tool is **provisionally committed** — its effect is staged behind a transaction token that the orchestrator can commit or abort after ve...",
    "decision_boundary": "The orchestrator must classify each subtree *before* forking, not after verification. The decision is per-tool, per-branch, and is a hard gate: - **Speculate freely** if all reachable tools are effect-free or provisionally committed. Rollback is atomic by construction. - **Speculate with intent records** if tools are reconcilable. Fork is allowed, but every ...",
    "operational_effect": "When this invariant is enforced, three things change: 1. **Rollback becomes a compensation protocol, not a discard.** The orchestrator's rollback path must enumerate intent records for the dead branch and issue compensating actions (cancel ticket, void draft, release reservation). This is slower and requires the orchestrator to track effects it never wanted ..."
  },
  "matched_failure_symptoms": [
    "SUBPROCESS_PIPE_HANG_OR_FD_LEAK"
  ],
  "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": "5fba9c2cd7a10b5206b72e65f23164ef8d25d2fe7c8f047422a3dd12ad08bc80",
    "verified_classes": [
      "SpeculativeRollbackViolation",
      "ToolEffectClass"
    ],
    "verified_functions": [
      "classify_subtree",
      "fork_branch",
      "emit_effect",
      "rollback_branch"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "SpeculativeRollbackViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
