{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-speculatively-commit-a-tool-side-effect-it-can-no-longer-roll-back-when-a-sibling-branch-wins-the-verify-race",
  "title": "Why does an instance speculatively commit a tool side effect it can no longer roll back when a sibling branch wins the verify race?",
  "date_of_record": "2026 November 30",
  "scope": "Applies to multi-agent planners that fan out speculative branches (each branch a cloned agent context) and execute tool calls before a verifier designates a winning branch. Does not apply to strictly serial execution or to branches whose tools are declared idempotent and side-effect-free.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-speculatively-commit-a-tool-side-effect-it-can-no-longer-roll-back-when-a-sibling-branch-wins-the-verify-race.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-speculatively-commit-a-tool-side-effect-it-can-no-longer-roll-back-when-a-sibling-branch-wins-the-verify-race.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-speculatively-commit-a-tool-side-effect-it-can-no-longer-roll-back-when-a-sibling-branch-wins-the-verify-race.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1509,
    "python_slice_tokens": 248,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"a speculative branch was wrong.\" It is that a speculative branch **committed an irreversible external side effect before losing the verify race**, so rollback of the branch's *context state* succeeds while rollback of the *world state* does not. The system's rollback invariant is written against the wrong state space. Most speculative-exe...",
    "what_was_observed": "A three-branch fan-out planner spawned branches B1, B2, B3 from a shared parent context to answer a customer refund request. Each branch was given the same tool set including `issue_refund(order_id, amount)`. The verifier was configured to pick the branch whose proposed refund most closely matched policy and to discard the rest. Branch B1 called `issue_refund` during its reasoning (\"let me confirm the order exists by...",
    "condition_of_validity": "The rollback invariant `rollback(branch) ⇒ no net effect` is valid **only if every tool call in a speculative branch is buffered until branch commit.** Concretely, a tool is safe to call speculatively iff one of: 1. It is declared **read-only** (no external mutation), or 2. It is **idempotent and keyed** by a branch-scoped idempotency key so a duplicate call...",
    "decision_boundary": "The boundary is the **commit point of the first irreversible side effect** relative to the **verify decision**. Two regimes: - **Effects-before-verify (unsafe):** branch executes real tools during exploration. Rollback discards context but not effects. Requires the tool layer to enforce idempotency keys and a compensating-transaction handler, or the invarian...",
    "operational_effect": "Without the split, fan-out width becomes a multiplier on side-effect leakage: N branches each calling a mutating tool produce up to N effects for one intended effect, and the verifier's \"correct\" choice does not reduce the count. Recovery requires out-of-band reconciliation against the external system, which the agent has no model of. With the intent-buffer,..."
  },
  "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": "172849c81c3d3e2f88e19a9affdf490f7cf8fb83b6d9b252a30adf1a931bb225",
    "verified_classes": [
      "SpeculativeCommitError",
      "PendingEffect",
      "ToolProxy"
    ],
    "verified_functions": [
      "commit_branch",
      "rollback_branch",
      "call"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "SpeculativeCommitError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
