{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-detect-and-bound-speculative-multi-agent-rollback-when-divergent-branch-outcomes-invalidate-committed-side-effects",
  "title": "How should an instance detect and bound speculative multi-agent rollback when divergent branch outcomes invalidate committed side effects",
  "date_of_record": "2026 November 17",
  "scope": "Applies to orchestrators that fan out speculative agent branches (parallel hypotheses, tool calls, or plan fragments) whose effects may be committed before a branch divergence is detected. Does not apply to purely read-only speculation, nor to systems where every branch writes to an isolated, discardable sandbox with no external side effects.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-and-bound-speculative-multi-agent-rollback-when-divergent-branch-outcomes-invalidate-committed-side-effects.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-and-bound-speculative-multi-agent-rollback-when-divergent-branch-outcomes-invalidate-committed-side-effects.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-and-bound-speculative-multi-agent-rollback-when-divergent-branch-outcomes-invalidate-committed-side-effects.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 996,
    "python_slice_tokens": 201,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The non-obvious invariant is this: **rollback of a speculative branch is only sound if the branch's side effects are *idempotently reversible* or *not yet externally observable*.** Most implementations conflate \"branch divergence detected\" with \"branch can be rolled back.\" They are not the same event. A divergence means the orchestrator has chosen a winning ...",
    "what_was_observed": "In a fan-out configuration with three speculative branches sharing a tool-call budget, branch B emitted a `send_notification` effect at step 4, then diverged at step 7 when its plan violated a constraint the orchestrator only validated late. The orchestrator executed its standard rollback: it dropped B's context, released its budget, and marked the run `rolled_back`. The notification, however, had already left the pr...",
    "condition_of_validity": "Rollback of a divergent branch is valid **iff** every side effect the branch committed satisfies at least one of: 1. **Pre-commitment gating:** the effect was held in a buffer and released only on branch convergence (never released for a loser). 2. **Compensating transaction:** a registered inverse operation exists and has been *successfully executed* before...",
    "decision_boundary": "The boundary is crossed the moment an effect becomes externally observable before the branch's outcome is decided. Two levers bound the damage: - **Speculation horizon:** how many steps a branch may run before it must converge or be gated. Effects beyond the horizon must be buffered. - **Effect class:** classify each tool as `REVERSIBLE`, `COMPENSABLE`, or `...",
    "operational_effect": "Orchestrators that conflate divergence with reversibility produce \"clean\" rollbacks that leak effects—the most dangerous class of failure because monitoring shows success. Enforcing the effect-class gate converts silent leakage into an explicit, auditable reconciliation event, at the cost of reduced speculation parallelism for irreversible tools. That trade ..."
  },
  "matched_failure_symptoms": [
    "DST_SHIFT_OR_CLOCK_SKEW"
  ],
  "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": "e9ed5b21b09107fad04b2bb1d7df76d108c9dbea496a2322efaaebcdcecf40dc",
    "verified_classes": [
      "EffectClass",
      "UnsoundRollbackError"
    ],
    "verified_functions": [
      "rollback_branch"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "UnsoundRollbackError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "enum"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
