{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-replays-a-trajectory-through-a-nondeterministic-tool-boundary-and-silently-reconstructs-a-divergent-past",
  "title": "What happens when an instance replays a trajectory through a nondeterministic tool boundary and silently reconstructs a divergent past",
  "date_of_record": "2026 December 1",
  "scope": "Applies to forensic replay and time-travel debugging of agent trajectories where tool calls, sampling, or environment reads are re-executed rather than served from a recorded tape. Does not apply to pure record-and-replay systems where every external effect is captured at record time and re-executed as a stub with byte-identical output.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-replays-a-trajectory-through-a-nondeterministic-tool-boundary-and-silently-reconstructs-a-divergent-past.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-replays-a-trajectory-through-a-nondeterministic-tool-boundary-and-silently-reconstructs-a-divergent-past.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-replays-a-trajectory-through-a-nondeterministic-tool-boundary-and-silently-reconstructs-a-divergent-past.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2979,
    "python_slice_tokens": 411,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **replay as re-execution** and **replay as reconstruction from a tape**. A tape-based replay is a total function: given the recorded sequence of (prompt, completion, tool-call, tool-result) tuples, it re-drives the agent's control flow without ever touching the live world. A re-execution-based replay is a *partial* fun...",
    "what_was_observed": "A production agent was instrumented to call a `search_documents(query)` tool that returned the top-k documents from an index that was continuously re-ingested. During an incident, the agent looped: it called `search_documents(\"refund policy\")`, received a document set, extracted a clause, called a downstream `apply_policy(clause_id)` tool, received a rejection, and re-queried with a slightly reformulated string. Afte...",
    "condition_of_validity": "Deterministic replay of an agent trajectory is valid **only** under the conjunction of three conditions, and the failure mode above is precisely the violation of the second: 1. **Observation fidelity.** Every value the agent observed during record — every tool result, every retrieval hit, every clock read, every environment variable, every model completion —...",
    "decision_boundary": "The boundary between \"this replay is forensically admissible\" and \"this replay is a confabulation\" is drawn at the first observation that cannot be served from the tape. Operationally: - If the agent's decision at step *i* matches the recorded decision at step *i*, and the observation for step *i* is present on the tape, serve it and advance. This is the adm...",
    "operational_effect": "The operational consequence is that **forensic replay must be architected as a tape-replay with a pre-dispatch decision gate, and the tape must capture observations, not just calls.** Concretely: - The record-time harness wraps every tool boundary and every model call, and appends `(step_index, decision, observation_bytes, observation_hash)` to an append-onl..."
  },
  "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": "013c5b57ec7224b037f3bfc53b16628074d53b1d397916a24185d72ba2b07842",
    "verified_classes": [
      "ReplayDivergenceError",
      "TapeGapError",
      "TapeEntry",
      "TapeReader"
    ],
    "verified_functions": [
      "_canonical",
      "_hash",
      "replay_step",
      "run_replay",
      "__init__",
      "serve"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "ReplayDivergenceError",
      "TapeGapError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "json",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
