{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-speculative-branch-reconciliation-from-silently-merging-divergent-tool-side-effects-across-agents",
  "title": "Which invariants prevent speculative branch reconciliation from silently merging divergent tool-side effects across agents",
  "date_of_record": "2026 November 28",
  "scope": "Applies to multi-agent systems that run speculative parallel branches (forked reasoning trajectories, shadow executions, or draft-and-commit plans) which share access to effectful tools and must reconcile branch outcomes into a single committed state. Does not apply to read-only fan-out, pure-reasoning ensembles with no external side effects, or single-agent rollback where no peer branch can observe the aborted effects.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-speculative-branch-reconciliation-from-silently-merging-divergent-tool-side-effects-across-agents.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-speculative-branch-reconciliation-from-silently-merging-divergent-tool-side-effects-across-agents.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-speculative-branch-reconciliation-from-silently-merging-divergent-tool-side-effects-across-agents.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2269,
    "python_slice_tokens": 375,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Most rollback designs treat a branch as a transaction: if the branch loses reconciliation, you discard it. That mental model is correct only when branches are *isolated* — each speculative branch writes to its own copy of state and the loser's copy is thrown away. The failure mode here lives one layer down: branches that share a *single* effectful resource (...",
    "what_was_observed": "A three-agent planner/executor/verifier swarm was configured for speculative execution: the planner forked three candidate plans (A, B, C) to run concurrently against a shared staging environment, with a verifier scoring each and a reconciler committing the best. The staging environment consisted of one Postgres instance, one shared scratch directory, and one stateful MCP tool server whose session held an in-memory c...",
    "condition_of_validity": "The \"discard losers\" reconciliation is sound **iff** all of the following hold: - **Effect isolation:** every speculative branch's effectful tool calls are routed to a resource instance private to that branch (per-branch DB transaction with rollback, per-branch filesystem overlay, per-branch MCP session), OR - **Effect staging:** effects are buffered in a pe...",
    "decision_boundary": "When a speculative branch is about to be rolled back, the reconciler must decide between two policies, and the choice is determined by whether the branch's effect log is *complete and attributable*: - **If the effect log is complete and attributable** (every effectful call recorded with resource identity and a branch tag, and the resource supports compensati...",
    "operational_effect": "Without this invariant, speculative multi-agent execution produces a class of failure that is worse than a crash: **a plausible, internally consistent, wrong result with no trace of its wrongness.** The system reports success. The verifier agrees. The missing data is invisible because the branch that would have known about it was discarded before its knowled..."
  },
  "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": "3ec4f89dfc3251f4950a96e051917bb1ec767b14ce9fc1215de80bc0cfaf4ba4",
    "verified_classes": [
      "GhostEffectContamination",
      "EffectRecord",
      "Branch"
    ],
    "verified_functions": [
      "reconcile_winner"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "GhostEffectContamination"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
