{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-refuse-rollback-of-a-speculative-agent-branch-after-a-side-effecting-tool-call-has-been-acknowledged-by-an-external",
  "title": "In what scenarios must an instance refuse rollback of a speculative agent branch after a side-effecting tool call has been acknowledged by an external peer",
  "date_of_record": "2026 November 27",
  "scope": "Applies to orchestrators that speculatively fork N parallel agent branches from a shared checkpoint, allow branches to invoke side-effecting tools (writes, sends, payments, state mutations on external systems), and later select a winning branch and roll back the losers. Does not cover pure-read speculation, in-process tool calls with no external acknowledgment, or single-branch retry loops.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-refuse-rollback-of-a-speculative-agent-branch-after-a-side-effecting-tool-call-has-been-acknowledged-by-an-external.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-refuse-rollback-of-a-speculative-agent-branch-after-a-side-effecting-tool-call-has-been-acknowledged-by-an-external.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-refuse-rollback-of-a-speculative-agent-branch-after-a-side-effecting-tool-call-has-been-acknowledged-by-an-external.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2128,
    "python_slice_tokens": 429,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"a losing branch did work that got discarded.\" That is the expected cost of speculation. The failure is a **rollback that succeeds locally while failing externally**, producing a divergence between the orchestrator's reconciled state and the irreversible effects a losing branch already committed on a remote system. Speculative execution is...",
    "what_was_observed": "A planner agent forks three branches (`B1`, `B2`, `B3`) from checkpoint `C0` to satisfy a multi-step provisioning task. Each branch is given the same goal and a distinct strategy hint. All three call `provision_resource(idempotency_key=derived_from_branch_id, ...)` against an external control plane. - `B1` returns `200 OK` with a resource handle. - `B2` returns `504 Gateway Timeout` after 30s. The control plane had, ...",
    "condition_of_validity": "The refusal-to-rollback rule is valid — and must be enforced — under the following conditions. Outside them, ordinary rollback is correct and the guardrail should not fire. - **The tool call is side-effecting and externally acknowledged-or-ambiguous.** If the branch only read, or only called tools whose effects are scoped to the orchestrator's own transactio...",
    "decision_boundary": "The precise decision the orchestrator must make at reconciliation time: - **If `branch.state == unknown_effect` and `branch != winner`:** do NOT roll back. Transition to `quarantined`, emit a reconciliation obligation, and — critically — do not report the overall task as complete until the obligation is resolved. The winner may proceed, but the task's termin...",
    "operational_effect": "Enforcing this changes three things in the orchestrator: 1. **Branch journal enum gains `unknown` as a distinct terminal-for-rollback state.** `failed` and `unknown` must not be conflated. Tool adapters are responsible for classifying: `4xx_pre_handler` → `failed`; timeout/reset/`5xx`/partial → `unknown`. 2. **Idempotency keys are scoped to logical intent, n..."
  },
  "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": "68b1ba371de763924328129c1bedcd163852cb0ae136a4527fbb85e169775415",
    "verified_classes": [
      "RollbackRefusedError",
      "EffectState",
      "BranchState",
      "Branch"
    ],
    "verified_functions": [
      "rollback_branch",
      "reconcile"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "RollbackRefusedError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
