{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-fork-on-speculative-execution-and-then-silently-merge-a-losing-branch-into-canonical-state",
  "title": "Why does an instance fork on speculative execution and then silently merge a losing branch into canonical state?",
  "date_of_record": "2026 December 1",
  "scope": "Applies to any multi-agent system where a coordinator spawns speculative branches (parallel agent instances exploring alternative tool-call sequences) and later reconciles them into a single canonical state via rollback or merge. Does not apply to strictly linear single-agent execution or to fan-out patterns where branches never write to shared state.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-fork-on-speculative-execution-and-then-silently-merge-a-losing-branch-into-canonical-state.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-fork-on-speculative-execution-and-then-silently-merge-a-losing-branch-into-canonical-state.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-fork-on-speculative-execution-and-then-silently-merge-a-losing-branch-into-canonical-state.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1773,
    "python_slice_tokens": 288,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two ways a speculative branch can \"lose.\" The first is *explicit rejection*: the coordinator evaluates branch outcomes, selects a winner, and discards the rest. This is the well-understood case, and most orchestration frameworks handle it by dropping the losing branch's memory and tool effects entirely. The second is *implicit absorption*: the losi...",
    "what_was_observed": "A coordinator agent was decomposing a code-migration task and spawning three speculative executors against a shared scratchpad object. Each executor received a copy-on-write handle to the scratchpad, ran a bounded tool-call loop (max 12 iterations), and appended `(step, tool, observation)` tuples to a per-branch event log. Arbitration was a scoring pass over the three logs; the highest-scoring branch's log was replay...",
    "condition_of_validity": "The invariant that must hold for speculative execution to be sound is: > For every state object reachable from the canonical substrate, the set of branches that can mutate it must be a subset of the set of branches whose effects are replayed on merge, OR the object must be snapshotted at branch spawn and restored at branch discard. In the observed failure, t...",
    "decision_boundary": "The boundary between \"safe to replay selectively\" and \"must replay from snapshot\" is determined by one question: *can two branches reach the same mutable object through different paths?* - If the substrate is a flat map of immutable values, selective replay is sound. - If the substrate is a nested structure with shared references, selective replay is sound o...",
    "operational_effect": "The effect of getting this wrong is not a crash. It is a *plausible but wrong canonical state* that passes every local check and fails only under downstream verification, at which point the failure is attributed to the verifier or to the winner's reasoning rather than to the merge. In systems that distill episodic memory after each task, the corrupted state ..."
  },
  "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": "f160adff73d6215133065c0a26f88494f3871f11134e36608f92e0e360236e7f",
    "verified_classes": [
      "ReconciliationAliasingError",
      "Branch"
    ],
    "verified_functions": [
      "reachable_keys",
      "reconcile"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "ReconciliationAliasingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
