{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-abandon-speculative-branches-rollback-invalidation-under-shared-tool-side-effects-in-multi-agent-speculative-execution",
  "title": "When must an instance abandon speculative branches: rollback invalidation under shared-tool side effects in multi-agent speculative execution",
  "date_of_record": "2026 November 24",
  "scope": "Applies to orchestrators that fan out speculative sub-agent branches (parallel candidate plans, tree-of-agents, or draft-verify swarms) and roll back divergent branches by discarding their state. Does not apply to purely read-only retrieval branches or to single-agent retry loops where no sibling branch shares mutable external state.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-abandon-speculative-branches-rollback-invalidation-under-shared-tool-side-effects-in-multi-agent-speculative-execution.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-abandon-speculative-branches-rollback-invalidation-under-shared-tool-side-effects-in-multi-agent-speculative-execution.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-abandon-speculative-branches-rollback-invalidation-under-shared-tool-side-effects-in-multi-agent-speculative-execution.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1890,
    "python_slice_tokens": 390,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A speculative branch is only rollback-safe if every effect it produced is *contained within its own state envelope*. The non-obvious boundary is this: rollback of a sub-agent's **reasoning state** is cheap and total (drop the transcript, drop the KV cache, discard the partial plan), but rollback of the **effects its tool calls already committed to shared res...",
    "what_was_observed": "An orchestrator spawned three speculative branches to satisfy a single user task: \"reconcile the invoice ledger.\" Each branch received an identical task prompt and an identical tool manifest (filesystem write, SQL execute, HTTP fetch). Branch A chose a bulk-upsert strategy; Branch B chose a per-row diff-and-patch strategy; Branch C chose a dry-run-then-commit strategy. All three ran concurrently for ~40 seconds. Bran...",
    "condition_of_validity": "The rollback-on-divergence protocol is valid only under the following conjunction, and each conjunct is independently falsifiable at runtime: 1. **Effect containment:** every tool invocation by a speculative branch is either (a) routed to a branch-scoped overlay (copy-on-write filesystem, transaction with branch-scoped savepoint, namespaced cache) or (b) cla...",
    "decision_boundary": "The orchestrator must decide, *before* selection, whether to (i) commit the winner and roll back losers, or (ii) abort the entire speculation round and replay from snapshot. The boundary is crossed when the read-set/write-set intersection check is non-empty for the winner, or when any discarded branch's effect log contains an uncontained write. - If intersec...",
    "operational_effect": "Enforcing this boundary changes the orchestrator's cost profile and its failure semantics. Speculation no longer yields a pure latency win; it yields a latency win *conditioned on effect containment*, and the containment machinery (overlays, savepoints, per-branch session negotiation) adds per-branch overhead that can exceed the parallelism gain for write-he..."
  },
  "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": "b4995e03faab367d0cc18cd5500b71ec62299f42098908b7e4939adaca6a29c7",
    "verified_classes": [
      "SpeculationRollbackError",
      "EffectClass",
      "Effect",
      "Branch"
    ],
    "verified_functions": [
      "_read_write_intersection",
      "select_and_commit"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "SpeculationRollbackError"
    ],
    "sample_fail_closed_invariants": [
      "no branches to select from"
    ],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
