{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-replay-divergence-when-a-forensic-reconstruction-of-its-own-session-silently-forks-the-rng-stream",
  "title": "How does an instance detect replay divergence when a forensic reconstruction of its own session silently forks the RNG stream",
  "date_of_record": "2026 December 2",
  "scope": "Applies to deterministic-replay forensic reconstruction of agentic sessions where tool-call ordering, sampling seeds, and retry logic are replayed from telemetry to reconstruct a prior trajectory. Does not apply to live inference, nor to sessions whose tool transports are inherently non-replayable (e.g., wall-clock-timestamped external side effects that were never captured).",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-replay-divergence-when-a-forensic-reconstruction-of-its-own-session-silently-forks-the-rng-stream.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-replay-divergence-when-a-forensic-reconstruction-of-its-own-session-silently-forks-the-rng-stream.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-replay-divergence-when-a-forensic-reconstruction-of-its-own-session-silently-forks-the-rng-stream.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1692,
    "python_slice_tokens": 306,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two kinds of \"replay\" and conflating them is the root of the failure. **Observational replay** re-executes the agent against recorded tool outputs and recorded model outputs, treating the LLM as a black box whose tokens are read from the log. **Generative replay** re-invokes the model (or a stand-in) and hopes the token stream matches. Forensic rec...",
    "what_was_observed": "A support-triage agent ran a 41-step session. Telemetry captured 40 tool results and all model messages except the result of tool call #17 (`lookup_order`), which the transport dropped due to a 30s timeout on the upstream service. The reconstruction harness, on encountering the missing result, re-invoked a local model with the same prompt and seed to \"regenerate\" step #17 and continue. The regenerated step #17 produc...",
    "condition_of_validity": "This failure requires all of the following to co-occur; remove any one and the fork is either prevented or detected: 1. **A telemetry gap** — at least one step's output was not captured (dropped tool result, truncated message, lost stream chunk). 2. **A fallback path** — the harness is willing to regenerate the missing step rather than abort. 3. **Unserializ...",
    "decision_boundary": "The boundary an instance must enforce when *producing* or *consuming* a reconstruction: - **If the telemetry gap is at a step whose output is a pure function of recorded inputs** (e.g., a deterministic lookup with a recorded request), regenerate freely — no RNG consumed, no fork. - **If the gap is at a stochastic step and an RNG checkpoint exists at or befor...",
    "operational_effect": "Without the invariant, forensic reports become confidently wrong: they attribute decisions to the agent that the agent never made, and they do so with a fully valid-looking trace. Auditors reading the report cannot distinguish a real escalation from a forked-RNG artifact because the artifact is internally consistent. The downstream cost is misattributed root..."
  },
  "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": "a153a88a8a08266981d5b30af1560b1f0dbe078e54b5589bd606ff8bb74be853",
    "verified_classes": [
      "ReplayForkError",
      "StepRecord",
      "SessionSnapshot"
    ],
    "verified_functions": [
      "reconstruct"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "ReplayForkError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
