{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-fail-to-roll-back-a-speculative-sub-agent-when-the-divergence-is-detected-after-the-branch-has-already-committed-writes-to-shared",
  "title": "Why does an instance fail to roll back a speculative sub-agent when the divergence is detected after the branch has already committed writes to shared episodic memory?",
  "date_of_record": "2026 November 29",
  "scope": "Applies to orchestrators that fan out speculative sub-agents (parallel branch exploration, tree-of-thought style rollback, or \"try N trajectories, keep the best\" schemes) where branches share a mutable episodic store or blackboard. Does not apply to branches with fully isolated, copy-on-write memory namespaces and no shared tool side effects.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-fail-to-roll-back-a-speculative-sub-agent-when-the-divergence-is-detected-after-the-branch-has-already-committed-writes-to-shared.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-fail-to-roll-back-a-speculative-sub-agent-when-the-divergence-is-detected-after-the-branch-has-already-committed-writes-to-shared.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-fail-to-roll-back-a-speculative-sub-agent-when-the-divergence-is-detected-after-the-branch-has-already-committed-writes-to-shared.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1972,
    "python_slice_tokens": 405,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"divergence detection is wrong.\" Divergence detection is usually fine—a verifier, a critic, or a trajectory-distance metric flags that branch B has drifted from the parent's intent. The failure is that rollback is treated as a *control-flow* operation (discard the branch, resume the parent) when it is actually a *state-reconciliation* oper...",
    "what_was_observed": "A planner agent decomposes a task (\"reconcile these 400 invoice records against the ledger\") and speculatively spawns three sub-agents: - Branch A: batch-diff approach, writes intermediate reconciliation facts to the shared episodic store under keys like `recon:batch_7:status`. - Branch B: per-record LLM adjudication, also writes to the same key namespace because the schema was not branch-scoped. - Branch C: heuristi...",
    "condition_of_validity": "Rollback-on-divergence is valid **only** under the conjunction: 1. **Epoch isolation:** every shared-memory write carries a speculative epoch/transaction ID; readers outside the branch's descendant set see the pre-branch value until an explicit commit. Reads within the branch see its own writes (read-your-writes), but siblings and the parent do not. 2. **Wri...",
    "decision_boundary": "The orchestrator must decide, per branch, between two regimes: - **Speculate-with-isolation:** branch writes go to an epoch-scoped overlay; siblings see parent state only; commit merges the overlay; abort drops it. Cost: every reader must resolve overlays, and cross-branch information sharing is delayed until commit, which can starve branches that legitimate...",
    "operational_effect": "The observable consequence is a **silent correctness regression that correlates with speculative breadth**: the more branches you fan out, the more likely a sibling read a doomed branch's write, and the more likely the surviving branch inherits a false fact. Systems that \"work\" at breadth 2 fail at breadth 5. The failure is invisible to per-branch success me..."
  },
  "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": "d38e77ed3f8748539ffd797f11ec4aa9d2425064ba4e4e9370c7440b799aa748",
    "verified_classes": [
      "SpeculativeRollbackError",
      "Write",
      "SharedStore"
    ],
    "verified_functions": [
      "abort_branch",
      "read"
    ],
    "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
  }
}
