{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-speculatively-forks-a-swarm-branch-and-the-rollback-journal-diverges-from-peer-observed-tool-effects",
  "title": "What happens when an instance speculatively forks a swarm branch and the rollback journal diverges from peer-observed tool effects",
  "date_of_record": "2026 November 27",
  "scope": "Applies to orchestrators that run speculative parallel branches (forked agent instances executing the same task against cloned state) and reconcile by rolling back losing branches. Does not apply to single-instance linear execution, nor to branches whose tool calls are purely read-only and side-effect-free.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-speculatively-forks-a-swarm-branch-and-the-rollback-journal-diverges-from-peer-observed-tool-effects.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-speculatively-forks-a-swarm-branch-and-the-rollback-journal-diverges-from-peer-observed-tool-effects.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-speculatively-forks-a-swarm-branch-and-the-rollback-journal-diverges-from-peer-observed-tool-effects.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2182,
    "python_slice_tokens": 422,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two different things a \"rollback\" can mean, and speculative multi-agent systems routinely conflate them: 1. **State rollback** — restoring the orchestrator's internal checkpoint (context window, scratchpad, memory vector deltas, tool-call ledger) to a pre-fork snapshot. This is deterministic and fully under the orchestrator's control. 2. **Effect r...",
    "what_was_observed": "A planner instance P forks three speculative branches (B1, B2, B3) at checkpoint C0 to solve a provisioning task. Each branch receives a cloned context and a cloned tool-session token scoped to the same remote resource namespace. The orchestrator's design intent is: run all three, pick the branch whose self-reported plan scores highest, commit it, roll back the others. The observed failure trace: 1. B1 calls `provisi...",
    "condition_of_validity": "The rollback-safe reconciliation invariant holds only under the following joint condition: - Every tool reachable by a speculative branch is **either** idempotent (repeat calls are no-ops) **or** carries a branch-scoped idempotency key that the orchestrator can use to attribute and compensate the effect. If neither holds, effect rollback is not guaranteed an...",
    "decision_boundary": "The boundary between safe and unsafe speculation is drawn at the first **non-idempotent, non-attributable external effect** emitted by any branch. Before that point, fork/rollback is sound: losing branches can be discarded with no residue. After that point, three options exist, and the orchestrator must choose explicitly: - **Proceed with compensation:** kee...",
    "operational_effect": "The practical consequences for the orchestrator and for downstream agents: - **Orphaned effects with no ledger.** Resources created by losing branches persist in the world but vanish from the orchestrator's memory. Downstream agents encounter them as \"pre-existing\" state with no provenance, and may either duplicate them (if they don't check) or fail to manag..."
  },
  "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": "1dd72b238f5ebbb819b6d4b26a10fbbb95bd9fbcdef7738a26b704860dce1da7",
    "verified_classes": [
      "SpeculativeRollbackError",
      "ToolCapability",
      "Effect",
      "Branch"
    ],
    "verified_functions": [
      "audit_fork_safety",
      "reconcile"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "SpeculativeRollbackError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
