{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-treat-speculative-multi-agent-branch-rollback-as-unsafe-when-tool-side-effects-are-non-idempotent-and-the-compensat",
  "title": "In what scenarios must an instance treat speculative multi-agent branch rollback as unsafe when tool side effects are non-idempotent and the compensating log is lossy",
  "date_of_record": "2026 November 27",
  "scope": "Applies to any orchestrator that forks speculative agent branches (parallel hypothesis execution) and commits the winning branch while rolling back losers by replaying a compensation log. Does not apply to pure-read tool graphs, or to systems where every tool call is provably idempotent under a stable idempotency key.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-speculative-multi-agent-branch-rollback-as-unsafe-when-tool-side-effects-are-non-idempotent-and-the-compensat.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-speculative-multi-agent-branch-rollback-as-unsafe-when-tool-side-effects-are-non-idempotent-and-the-compensat.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-speculative-multi-agent-branch-rollback-as-unsafe-when-tool-side-effects-are-non-idempotent-and-the-compensat.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1799,
    "python_slice_tokens": 245,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Speculative execution in agent systems is usually justified by an analogy to CPU branch prediction: losers are \"discarded\" and the machine state is restored. That analogy fails at the tool boundary. A CPU rollback restores a register file; an agent rollback must *undo externally observed actions* — an email sent, a payment authorized, a row inserted into a t...",
    "what_was_observed": "A planning agent forks three speculative branches to satisfy a request (\"provision access for the new contractor\"). Branch A calls `iam.grant_role`, then `notify.send_email`. Branch B calls `iam.grant_role` with a different scope. Branch C calls `billing.create_seat`. The verifier selects Branch A; B and C are rolled back by replaying their compensation logs. Two leaks appeared: 1. **Timeout-after-commit.** Branch C'...",
    "condition_of_validity": "Rollback-on-divergence is valid only under the conjunction of four conditions. Each is individually checkable; the failure occurs when any is assumed rather than verified. - **C1 — Effect totality:** every externally visible effect of a branch is represented in its compensation ledger. Fails when a branch delegates to a sub-agent whose tool calls are not mer...",
    "decision_boundary": "The operational rule is a tri-state classification of every tool outcome, not a binary: - `COMMITTED` — response received, effect known. Compensable. - `FAILED` — proven non-commit (connection refused before send, explicit 4xx rejection). No compensation. - `UNKNOWN` — timeout, connection reset mid-flight, truncated response, 5xx after request body sent. **M...",
    "operational_effect": "Three concrete consequences for any implementation: 1. **Compensation ledgers must be built from the transport layer, not the tool-call intent.** Record the request as `PENDING` *before* dispatch, and only resolve to `COMMITTED`/`FAILED` on an authoritative signal. A `PENDING` entry at rollback time is an `UNKNOWN` and blocks silent rollback. 2. **Sub-agent ..."
  },
  "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": "e98e54c92623acce292551af684f749f2f249d059a440a7d8a5b055de9e7f376",
    "verified_classes": [
      "UnsafeRollbackError"
    ],
    "verified_functions": [
      "classify_outcome",
      "rollback_branch",
      "_issue_compensation"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "UnsafeRollbackError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
