{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-divergence-between-speculative-branches-and-committed-state-in-multi-agent-rollouts",
  "title": "Which invariants prevent divergence between speculative branches and committed state in multi-agent rollouts",
  "date_of_record": "2026 November 12",
  "scope": "Applies to systems where a planner spawns N parallel agent branches that each issue speculative tool calls (side-effecting or read-only) against shared external state, and where exactly one branch (or a merge of branches) is later committed while others are aborted. Does not apply to single-agent retry loops, pure-function sandboxes with no external effects, or branches that are fully isolated behind a transactional store that itself guarantees snapshot isolation.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-divergence-between-speculative-branches-and-committed-state-in-multi-agent-rollouts.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-divergence-between-speculative-branches-and-committed-state-in-multi-agent-rollouts.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-divergence-between-speculative-branches-and-committed-state-in-multi-agent-rollouts.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1815,
    "python_slice_tokens": 480,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The non-obvious boundary is between *speculation* and *effect*. A branch may speculate about the *result* of a tool call without having performed the effect, and it may perform an effect without having committed the speculation. Most multi-agent frameworks conflate these: they let branches call tools directly and then \"roll back\" on abort. Rollback is the fa...",
    "what_was_observed": "In a rollout of 8 branches over a shared document store and a shared ticketing API, branch 3 performed a `tickets.update` (idempotent but observable) as a \"speculative\" call, then lost the merge vote. The abort path issued a compensating `tickets.update` restoring the prior field values. Between the speculative call and the compensation, branch 6 had read the ticket and incorporated the branch-3 value into its own pl...",
    "condition_of_validity": "The invariants hold only when all of the following are true: - Every speculative tool call is classified at declaration time as `PROBE` (read-only, must return a version token), `RESERVATION` (acquires a lease on a bounded resource, releasable), or `EFFECT` (irreversible; forbidden before commit). - The tool registry rejects any `EFFECT` call whose branch ha...",
    "decision_boundary": "The boundary is the moment a branch proposes a tool call. The coordinator must answer three questions atomically before the call is dispatched: 1. Is the call `EFFECT`? If yes and no commit token is held, reject with `SpeculativeEffectViolation`. Do not queue, do not \"try and compensate.\" 2. Is the call `RESERVATION`? If the aggregate reserved quantity plus ...",
    "operational_effect": "The practical consequence is that speculative parallelism becomes safe only by *narrowing* what branches may do: they may read freely (versioned) and reserve bounded resources, but they may not act until committed. This trades some latency (effects are serialized behind the commit decision) for the elimination of the compensation problem, which is unsolvable..."
  },
  "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": "47f6d538536447579fc4e741a50b478da36fb49a9864ec234e5bf76439bebe2e",
    "verified_classes": [
      "SpeculationError",
      "SpeculativeEffectViolation",
      "ReservationExhausted",
      "StaleReadSet",
      "CallKind",
      "Branch",
      "Coordinator"
    ],
    "verified_functions": [
      "run_branch",
      "__init__",
      "dispatch",
      "commit",
      "abort"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 6,
    "raised_exceptions": [
      "ReservationExhausted",
      "SpeculationError",
      "SpeculativeEffectViolation",
      "StaleReadSet"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
