{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-refuse-to-fork-speculative-branch-divergence-and-the-rollback-unsafe-side-effect-invariant-in-multi-agent-convergence",
  "title": "When must an instance refuse to fork: speculative branch divergence and the rollback-unsafe side-effect invariant in multi-agent convergence",
  "date_of_record": "2026 November 27",
  "scope": "Applies to orchestrators that spawn speculative sibling agents from a shared checkpoint to explore alternative tool-call trajectories, then reconcile by selecting or merging one branch and rolling back the rest. Does not apply to read-only fan-out (map/reduce over pure queries), nor to branches whose every tool call is provably idempotent and compensable.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-fork-speculative-branch-divergence-and-the-rollback-unsafe-side-effect-invariant-in-multi-agent-convergence.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-fork-speculative-branch-divergence-and-the-rollback-unsafe-side-effect-invariant-in-multi-agent-convergence.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-fork-speculative-branch-divergence-and-the-rollback-unsafe-side-effect-invariant-in-multi-agent-convergence.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2026,
    "python_slice_tokens": 410,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is not *whether a branch succeeded* but *whether a branch's external effects are reversible given the checkpoint it forked from*. Speculative execution is safe iff every side effect committed by a losing branch can be annihilated by replaying an inverse operation against the same external world state. Most agent frameworks confla...",
    "what_was_observed": "A planner agent received the task \"reconcile the vendor invoice batch for Q2\" and forked three speculative siblings from a checkpoint taken immediately after the batch was parsed into a structured ledger. The orchestrator's fork contract was: each sibling gets a private copy of the context and memory store, runs its own tool trajectory, and reports a `(decision, confidence, trace)` tuple; the reconciler picks the hig...",
    "condition_of_validity": "The rollback-safe fork invariant holds only when, for every speculative branch *b* and every tool call *t* in *b*'s trace, one of the following is true at reconciliation time: 1. *t* is classified `pure` (no external state mutation) — safe to discard unconditionally; 2. *t* is classified `compensable` and a verified inverse `t⁻¹` has been registered in a led...",
    "decision_boundary": "The boundary is between *speculate-and-select* and *speculate-and-compensate*. An instance must refuse to fork speculatively—i.e., must serialize the branches or gate effectful calls—when any tool in the branch's declared capability set is classified `effectful` without a registered inverse. It may fork speculatively when every reachable tool is `pure` or `c...",
    "operational_effect": "The observable consequence of getting this wrong is *phantom side effects*: external state mutations with no corresponding record in agent memory, which surface later as reconciliation failures, duplicate charges, contradictory notifications, or \"the agent did something it has no memory of.\" These are especially dangerous because they are invisible to memory..."
  },
  "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": "bdfcdc2b4b9793f983abec32af0bc71827be574afb617ab9abeb4a49057b30c5",
    "verified_classes": [
      "EffectClass",
      "RollbackUnsafeForkError",
      "CompensationLedgerMismatch",
      "Tool",
      "Branch",
      "ForkOrchestrator"
    ],
    "verified_functions": [
      "__init__",
      "assert_fork_safe",
      "dispatch",
      "converge"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "CompensationLedgerMismatch",
      "RollbackUnsafeForkError"
    ],
    "sample_fail_closed_invariants": [
      "fork point postdates a shared effect; branch rollback cannot restore world state"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
