{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-replays-a-nondeterministic-trace-and-the-causal-chain-diverges-at-a-tool-boundary",
  "title": "What happens when an instance replays a nondeterministic trace and the causal chain diverges at a tool boundary",
  "date_of_record": "2026 November 24",
  "scope": "Applies to post-hoc causal replay and counterfactual debugging of agent traces where tool calls, sampling, or retrieval are re-executed during reconstruction. Does not apply to pure log inspection of already-materialized traces, nor to deterministic workflows with no sampling or external state reads.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-replays-a-nondeterministic-trace-and-the-causal-chain-diverges-at-a-tool-boundary.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-replays-a-nondeterministic-trace-and-the-causal-chain-diverges-at-a-tool-boundary.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-replays-a-nondeterministic-trace-and-the-causal-chain-diverges-at-a-tool-boundary.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2586,
    "python_slice_tokens": 514,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two things practitioners conflate under \"replay\": **trace replay** (re-emitting the recorded sequence of events as immutable data) and **causal replay** (re-running the agent so that the causal dependency graph that produced each decision is reconstructed). Trace replay is a log read; it is deterministic by construction because it never invokes the...",
    "what_was_observed": "A coding agent ran a 14-step task: read repo, plan, edit three files, run tests, fix, re-run. Trace T0 recorded: step 6 `read_file(\"src/auth/session.py\")` returned 212 lines; step 9 `run_tests()` returned `FAILED test_session_refresh`; step 10 the agent edited `session.py` line 88; step 12 `run_tests()` passed. An engineer opened the trace in a causal-replay debugger to ask a counterfactual: *\"If the agent had read `...",
    "condition_of_validity": "Causal replay of a nondeterministic agent trace is valid only when all of the following hold for the segment being replayed: - **Sampling is pinned or branched.** Either the original sampling seed and config are recorded and re-applied (making the model call reproducible up to provider-version drift), or the replayed call is explicitly registered as a *new b...",
    "decision_boundary": "The operational decision is: **given a trace and a question, do you replay or do you inspect?** Replay (re-execute) is justified when: - The question is \"what would the agent have done if X were different?\" and X is a *controlled* variable you can pin while holding all other primitives to their recorded values. - Every tool on the path is either injected-fro...",
    "operational_effect": "Concretely, teams that adopt causal replay without content-addressed node identity and divergence-first-class reporting experience three downstream failures: 1. **Counterfactual contamination.** A counterfactual computed downstream of an undetected divergence boundary is reported with the same confidence as one computed on an intact chain. The debugger's \"ch..."
  },
  "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": "63f066f62b39b4ae9e3879fb81b05b5702e5e973f4384dd5d34579aa565d8f0a",
    "verified_classes": [
      "CausalDivergenceError",
      "UnpinnedPrimitiveError",
      "Node",
      "ReplayResult"
    ],
    "verified_functions": [
      "replay_node",
      "run_causal_replay",
      "identity"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "CausalDivergenceError",
      "UnpinnedPrimitiveError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "json",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
