{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-replay-diverge-when-its-tool-call-transcript-is-re-executed-against-a-live-upstream-the-non-idempotent-read-boundary-in-agent-tra",
  "title": "Why does an instance replay diverge when its tool-call transcript is re-executed against a live upstream — the non-idempotent read boundary in agent trajectory forensics",
  "date_of_record": "2026 November 21",
  "scope": "Applies to forensic replay of recorded LLM agent trajectories where the replay harness re-issues the original tool calls against the same or a reconstructed upstream to reconstruct causal state. Does not apply to replay of pure reasoning traces with no external tool I/O, nor to event-sourcing systems where tool responses are themselves persisted as canonical events.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-replay-diverge-when-its-tool-call-transcript-is-re-executed-against-a-live-upstream-the-non-idempotent-read-boundary-in-agent-tra.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-replay-diverge-when-its-tool-call-transcript-is-re-executed-against-a-live-upstream-the-non-idempotent-read-boundary-in-agent-tra.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-replay-diverge-when-its-tool-call-transcript-is-re-executed-against-a-live-upstream-the-non-idempotent-read-boundary-in-agent-tra.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2299,
    "python_slice_tokens": 355,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two defensible meanings of \"deterministic replay\" for an agent trajectory, and conflating them is the root of the failure. The first is **transcript replay**: you re-feed the recorded sequence of `(prompt, completion, tool_call, tool_result)` tuples into the model and assert that the model's next-token distribution and the harness's control flow re...",
    "what_was_observed": "A production incident on a research agent that used four tools: `web_search`, `fetch_page`, `summarize`, and `write_file`. The agent's task was to compile a cited report; it failed mid-task with a truncated final output. An engineer ran the standard replay harness against the recorded trajectory to identify the causal step. The harness was configured in \"re-execution\" mode by default because the tool-result persisten...",
    "condition_of_validity": "Re-execution replay yields valid causal attribution only under a conjunction that is almost never checked: 1. **Input equivalence per step.** For every turn `t`, the replayed context `C'_t` (system prompt + prior messages + prior tool results as replayed) must be byte-identical to the recorded `C_t`, up to and including turn `t-1`. If any prior tool result d...",
    "decision_boundary": "The decision boundary is whether to trust a replayed step as evidence. The rule: - If the tool result at step `t` was served from the persisted transcript (frozen), the step is `REPLAYED` and its divergence is attributable. - If the tool result at step `t` was re-executed live and its content hash differs from the recorded hash (or the recorded hash is absen...",
    "operational_effect": "The architectural guardrail is a **causal replay ledger** with per-step provenance. Each step carries `(context_hash, tool_call, tool_result_hash, provenance ∈ {FROZEN, IDEMPOTENT_LIVE, NONIDEMPOTENT_LIVE, MISSING})`. The harness computes the first step where `provenance` is not `FROZEN`/`IDEMPOTENT_LIVE` *and* `tool_result_hash` differs from recorded; that ..."
  },
  "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": "b9346986f4e7d5067e50076207deb2e4c32470b6cf80ecda8c7e630ed8932387",
    "verified_classes": [
      "ReplayAttributionError",
      "Provenance",
      "ReplayStep",
      "ReplayLedger"
    ],
    "verified_functions": [
      "hash_result",
      "attribute_divergence",
      "record",
      "_is_fork",
      "assert_attributable"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "ReplayAttributionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "enum",
      "hashlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
