{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-and-roll-back-a-speculative-tool-invocation-that-was-committed-to-a-shared-external-side-effect-channel-before-branch-reco",
  "title": "How does an instance detect and roll back a speculative tool invocation that was committed to a shared external side-effect channel before branch reconciliation?",
  "date_of_record": "2026 November 28",
  "scope": "Applies to multi-agent orchestrators that run optimistic speculative branches (parallel candidate plans) and invoke external tools before a branch reconciliation/winner-selection step. Does not apply to purely read-only tool surfaces or to systems where every tool call is gated by a single serialized committer.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-and-roll-back-a-speculative-tool-invocation-that-was-committed-to-a-shared-external-side-effect-channel-before-branch-reco.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-and-roll-back-a-speculative-tool-invocation-that-was-committed-to-a-shared-external-side-effect-channel-before-branch-reco.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-and-roll-back-a-speculative-tool-invocation-that-was-committed-to-a-shared-external-side-effect-channel-before-branch-reco.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1692,
    "python_slice_tokens": 264,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"a speculative branch produced a wrong answer.\" It is that a speculative branch produced an *external side effect* — an email sent, a row inserted, a payment authorized, a file written — through a tool whose invocation was treated as a pure function of branch-local state. Speculative execution assumes branches are isolated; tool invocation...",
    "what_was_observed": "An orchestrator ran three speculative branches (A, B, C) for a customer-refund task. Each branch was given the same tool set including `issue_refund(order_id, amount)` — an idempotent-by-order-id tool that posts to a payment processor. The reconciler was designed to pick the branch whose plan best matched a policy checker's score and discard the rest. Branch A and Branch B both invoked `issue_refund` optimistically d...",
    "condition_of_validity": "This analysis holds when all of the following are true: - Tool invocation is permitted during branch exploration (optimistic execution), not deferred to post-reconciliation commit. - The tool's effect channel is external and non-compensable without an explicit compensating call (or the compensating call is itself unreliable/lossy). - Branch rollback is imple...",
    "decision_boundary": "The boundary is: **does the tool invocation carry a handle that the reconciler owns, or does the branch own it?** - If the *branch* owns the handle (branch generates its own idempotency key, transaction id, or request signature), then rollback cannot revoke it — the reconciler has no authority over a key it did not issue. This is the failure condition. - If ...",
    "operational_effect": "When the boundary is crossed, the orchestrator enters a state where its internal effect ledger and the external channel diverge, and the divergence is *invisible from inside* — every branch reports clean rollback, reconciliation reports success, and the orphaned effects sit in the external system until a downstream audit (payment reconciliation, duplicate-de..."
  },
  "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": "134f764c0c0b28e429fcd3c4406b219e0ab1ea6a7f2c6163a538536eb91a72d4",
    "verified_classes": [
      "SpeculativeEffectLeak",
      "EffectHandle"
    ],
    "verified_functions": [
      "commit_speculative_effect",
      "rollback_branch",
      "__init__"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "SpeculativeEffectLeak"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
