{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-abandon-a-speculative-branch-rollback-invalidation-from-non-idempotent-side-effects-during-multi-agent-branch-reconciliation",
  "title": "When must an instance abandon a speculative branch: rollback invalidation from non-idempotent side effects during multi-agent branch reconciliation",
  "date_of_record": "2026 November 24",
  "scope": "Applies to orchestrators that fan out speculative agent branches (multiple worker instances executing candidate plans concurrently) and later reconcile them by selecting one branch's state as canonical. Does not apply to pure read-only fan-out, nor to single-agent retry loops where no cross-branch state merge occurs.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-abandon-a-speculative-branch-rollback-invalidation-from-non-idempotent-side-effects-during-multi-agent-branch-reconciliation.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-abandon-a-speculative-branch-rollback-invalidation-from-non-idempotent-side-effects-during-multi-agent-branch-reconciliation.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-abandon-a-speculative-branch-rollback-invalidation-from-non-idempotent-side-effects-during-multi-agent-branch-reconciliation.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1952,
    "python_slice_tokens": 405,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"a branch produced a wrong answer.\" It is that a *losing* branch, before it was discarded, mutated external state that the *winning* branch's reconciliation now assumes to be untouched. Speculative execution is only sound when branch effects are either (a) isolated in a private sandbox that is destroyed on rollback, or (b) commutative and ...",
    "what_was_observed": "A planner instance decomposed a task into three candidate strategies and dispatched three worker agents (`branch-A`, `branch-B`, `branch-C`) speculatively, each with a private scratch context but a **shared** tool credential for an issue-tracker API. The reconciliation policy was \"first branch to return a passing verifier score wins; kill the rest.\" Trace: 1. `branch-B` reached the tool call `create_comment(issue=447...",
    "condition_of_validity": "The invariant that speculative multi-agent execution requires is: > A branch may be marked `speculative` only while every side-effecting tool call it issues is either (i) routed to a branch-scoped sandbox that is provably destroyed on rollback, or (ii) recorded in a per-branch effect journal that reconciliation replays/compensates before declaring the loser ...",
    "decision_boundary": "The orchestrator must decide, per branch, between **discard** and **quarantine-and-compensate**. The boundary is drawn by the effect journal, not by the cancel acknowledgment: - **Discard is permitted** only when the journal is empty and the branch held no tool credential capable of external mutation during its speculative window. This is the only case where...",
    "operational_effect": "Enforcing the guard changes three things. First, speculative branches must carry **branch-scoped credentials** or a sandboxed tool proxy, so that external mutation is impossible until promotion — this is the only structural fix; journaling alone detects but does not prevent. Second, reconciliation must **replay the effect journal of every quarantined branch ..."
  },
  "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": "c2c1f0375f6cbbc9d731943472f8fa440d570fb7bb4dc4219eaa49f9afc6f3a8",
    "verified_classes": [
      "BranchState",
      "UnrollbackableBranchError",
      "EffectJournal",
      "Branch"
    ],
    "verified_functions": [
      "cancel_branch",
      "reconcile",
      "is_inert",
      "is_indeterminate"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "UnrollbackableBranchError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
