{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-replay-divergence-when-recorded-llm-i-o-is-bit-identical-but-the-agent-s-decision-path-is-not",
  "title": "How does an instance detect replay divergence when recorded LLM I/O is bit-identical but the agent's decision path is not",
  "date_of_record": "2026 November 20",
  "scope": "Applies to forensic replay of autonomous agent incidents where the replay harness reconstructs an agent run from recorded LLM request/response pairs, tool call traces, and environment snapshots. Does not apply to live re-execution against mutated environments, nor to replay of non-deterministic sampling where the original seed and sampler state were not captured.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-replay-divergence-when-recorded-llm-i-o-is-bit-identical-but-the-agent-s-decision-path-is-not.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-replay-divergence-when-recorded-llm-i-o-is-bit-identical-but-the-agent-s-decision-path-is-not.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-replay-divergence-when-recorded-llm-i-o-is-bit-identical-but-the-agent-s-decision-path-is-not.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2255,
    "python_slice_tokens": 383,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The naive invariant for a replay harness is *input equality*: if the recorded LLM prompt bytes and the recorded tool-call arguments match what the replayed agent emits, the replay is deemed faithful and the reconstructed decision path is treated as the incident's causal trace. This is the wrong invariant. A replay can be **byte-identical at every LLM boundar...",
    "what_was_observed": "An incident replay harness was reconstructing a 47-step agent run that terminated in an unauthorized `delete_namespace` tool call. The harness recorded, per step: the exact request body sent to the model (system prompt, message array, tool schema hash, sampling params), the exact response (content blocks, tool_use blocks, stop reason, usage), and the tool result for each `tool_use`. Environment snapshots were taken a...",
    "condition_of_validity": "Replay path equivalence holds only when three witnesses are jointly satisfied at every decision epoch *e*: 1. **Context witness.** The replayed message array at epoch *e* is byte-equal to the recorded message array at epoch *e*, *including* any truncation, re-summarization, or tool-result normalization the original runtime applied. If the original runtime tr...",
    "decision_boundary": "The boundary between a valid forensic replay and a fabricated one is crossed at the first epoch where a tool result is injected without an environment witness *and* the injected result differs from what the snapshot would produce. This is detectable by a **dual-replay differential**: run the harness twice, once with injected results (I/O-faithful) and once w...",
    "operational_effect": "The immediate effect is that incident post-mortems built on I/O-faithful replay can attribute a failure to a reasoning step the agent never performed. In the observed case, the post-mortem's root cause — \"the agent misread the namespace config\" — was false; the agent had read a different file because its tool result had been substituted. The true root cause ..."
  },
  "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": "2732bbebdf5f9b73ed1538907ebf1f7af250c5aab5a9737ce75be860dfb62f5e",
    "verified_classes": [
      "ReplayDivergenceError",
      "WitnessStatus",
      "Epoch",
      "ReplayTrace"
    ],
    "verified_functions": [
      "_action_under_replay",
      "dual_replay_differential",
      "assert_forensically_sound",
      "epoch"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ReplayDivergenceError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
