{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-rollback-resurrect-a-sibling-branch-s-poisoned-tool-cache-during-speculative-multi-agent-merge",
  "title": "Why does an instance rollback resurrect a sibling branch's poisoned tool cache during speculative multi-agent merge",
  "date_of_record": "2026 November 29",
  "scope": "Applies to speculative branch-and-merge agent graphs where multiple worker instances execute tool calls against a shared, memoized tool-result cache and rollback is implemented as state-restore of the graph node rather than cache invalidation. Does not apply to fully isolated per-branch sandboxes with no shared memoization layer, nor to single-agent linear execution.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-rollback-resurrect-a-sibling-branch-s-poisoned-tool-cache-during-speculative-multi-agent-merge.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-rollback-resurrect-a-sibling-branch-s-poisoned-tool-cache-during-speculative-multi-agent-merge.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-rollback-resurrect-a-sibling-branch-s-poisoned-tool-cache-during-speculative-multi-agent-merge.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2116,
    "python_slice_tokens": 433,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"rollback loses state\" and not \"cache poisoning.\" It is the interaction: speculative execution lets two sibling branches call the same tool with the same arguments at the same logical graph position, and a memoizing tool layer keys results by `(tool, args)` — *not* by branch lineage. When branch A produces a poisoned or divergent tool outp...",
    "what_was_observed": "A planning agent decomposed a task into a branch-and-merge graph: node `N3` (retrieve account record) fed two speculative children, `A` (reconcile via ledger API) and `B` (reconcile via statement parser). Both `A` and `B` called `fetch_account(id=4471)` at `N3`'s shared prefix. The speculative scheduler ran `A` first. `fetch_account` hit a flaky upstream that returned a *stale but well-formed* record — `balance_snaps...",
    "condition_of_validity": "The invariant \"a rolled-back branch contributes nothing to surviving state\" holds **only if** every effect a branch can produce is either (a) captured in the rollback-restored graph node, or (b) content-addressed by inputs that are provably identical across branches *and* provably deterministic. Speculative tool memoization violates (b) whenever the tool is ...",
    "decision_boundary": "The architectural choice is between **lineage-scoped memoization** and **rollback-aware invalidation**. They are not equivalent. - *Lineage-scoped memoization* keys entries by `(tool, args, branch_epoch)`, where `branch_epoch` increments on every rollback of any ancestor. A rolled-back branch's entries become unreachable to surviving siblings because their e...",
    "operational_effect": "Without the guardrail, speculative execution silently *amplifies* poisoning: a defect that should have died with the rolled-back branch is laundered through the cache into a surviving branch that the verifier rates as clean. The failure is worse than no speculation at all, because the rollback creates false confidence — the system believes it discarded the b..."
  },
  "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": "66d608219e36ebf9994af2b255f354ceffc4eadf067c752180a1e80767b6687a",
    "verified_classes": [
      "StaleEpochCacheRead",
      "CacheEntry",
      "LineageScopedToolCache"
    ],
    "verified_functions": [
      "merge_branch_result",
      "__init__",
      "epoch_for",
      "read",
      "write",
      "rollback"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "KeyError",
      "StaleEpochCacheRead"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
