{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-causal-trace-divergence-when-speculative-multi-agent-branches-are-replayed-against-a-mutated-root-context",
  "title": "Which invariants prevent causal-trace divergence when speculative multi-agent branches are replayed against a mutated root context",
  "date_of_record": "2026 November 29",
  "scope": "Applies to supervisor/worker agent topologies where a planner agent forks N speculative sub-agent branches from a shared root context, branches execute concurrently with tool access, and a merger agent selects or synthesizes a final result that is later replayed for audit, debugging, or regression. Does not apply to single-agent linear tool loops or to stateless request/response inference with no forked context.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-causal-trace-divergence-when-speculative-multi-agent-branches-are-replayed-against-a-mutated-root-context.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-causal-trace-divergence-when-speculative-multi-agent-branches-are-replayed-against-a-mutated-root-context.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-causal-trace-divergence-when-speculative-multi-agent-branches-are-replayed-against-a-mutated-root-context.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1895,
    "python_slice_tokens": 334,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"non-determinism in the LLM.\" Everyone expects sampled token streams to differ across runs. The failure is **causal-trace divergence under replay**: the replay harness reconstructs the speculative execution graph (which branch read which tool output, which branch's result the merger saw, which root-context version each branch forked from) ...",
    "what_was_observed": "A three-layer planner/worker/merger stack forked five speculative branches from a root context at revision `r7`. Branch 1 and Branch 3 both issued the identical tool call `search(\"acme 2024 revenue\")`. The tool layer's deduplication cache served Branch 3 from Branch 1's in-flight result (a legitimate optimization). Both branches recorded `tool_call_id: search#881`, but Branch 3's recorded `provenance: served_from_cac...",
    "condition_of_validity": "The replay is causally faithful **only if all four hold simultaneously**: - **(C1) Root-context pinning.** Every branch transcript records the content hash of the exact root-context revision it forked from (`root_rev_hash`), and replay reconstructs each branch against *its own* pinned revision, never the global current revision. A branch forked at `r7` is re...",
    "decision_boundary": "The boundary is whether to **replay-in-place** (re-execute tools and re-read current context) or **replay-from-capture** (replay frozen bytes and pinned revisions). - Replay-in-place is valid only for *forward* experiments: \"what would this graph produce against today's index?\" It is never valid for audit, incident reconstruction, or regression attribution, ...",
    "operational_effect": "With C1–C4 enforced, the replayed graph is byte-identical in its edge set to the original: Branch 3 retains its `served_from: Branch 1` edge, the cache dependency survives, and the auditor sees one source copied rather than two sources agreeing. Tool re-execution is eliminated (the captured payload is replayed), which also removes index-drift as a divergence..."
  },
  "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": "1d079ef702ce6fde088a8dd12552fa45a53341138d2b04e2bf2e21bb1254eda7",
    "verified_classes": [
      "CausalTraceUnreplayable",
      "BranchRecord",
      "MergerRecord"
    ],
    "verified_functions": [
      "verify_replayable"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "CausalTraceUnreplayable"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
