{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-replay-divergence-from-non-idempotent-tool-side-effects-in-agentic-forensic-traces",
  "title": "What structural signals indicate replay divergence from non-idempotent tool side effects in agentic forensic traces",
  "date_of_record": "2026 November 27",
  "scope": "Applies to post-incident deterministic replay of recorded LLM agent traces where tool calls produce externally observable side effects (writes, sends, state mutations) and the replay harness re-executes tool calls rather than serving recorded outputs. Does not apply to pure read-only tool surfaces or to replay harnesses that fully stub tool responses from the trace log.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-replay-divergence-from-non-idempotent-tool-side-effects-in-agentic-forensic-traces.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-replay-divergence-from-non-idempotent-tool-side-effects-in-agentic-forensic-traces.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-replay-divergence-from-non-idempotent-tool-side-effects-in-agentic-forensic-traces.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2087,
    "python_slice_tokens": 333,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two distinct notions of \"replay\" that get conflated in forensic tooling, and the conflation is the root cause of most forensic misdiagnoses. **Recorded-output replay** substitutes the logged tool result for the live call: the agent's reasoning loop sees the exact bytes it saw originally, and divergence can only come from non-determinism inside the ...",
    "what_was_observed": "A multi-step agent handling a customer-refund workflow was recorded across 14 turns. Turn 6 called `issue_refund(order_id, amount)` which returned `{\"status\": \"ok\", \"refund_id\": \"rf_8821\"}`. Turn 9 called `get_order_status(order_id)` which returned `{\"state\": \"refunded\", \"refund_id\": \"rf_8821\"}`. The agent then correctly terminated without a duplicate refund. During forensic replay to test whether a proposed prompt g...",
    "condition_of_validity": "Re-execution replay is valid only under the following invariant, which the harness must *verify*, not assume: > For every tool invocation `t_i` in the replayed prefix `t_0..t_k`, the environment state `E_i` observed by the agent at step `i` satisfies `E_i^replay ≡ E_i^recorded`, where `≡` is defined over the projection of state that any downstream tool call ...",
    "decision_boundary": "The decision boundary is whether to *stub* or *re-execute* each tool call during replay. The rule: - If a tool is in the unsafe set **and** its output fields are referenced downstream (by model reasoning or by another tool's arguments), **stub** the call with the recorded output and mark the replay as \"observation-faithful, effect-unfaithful.\" Counterfactual...",
    "operational_effect": "The practical consequence is that forensic replay harnesses must carry a **tool-safety manifest** alongside the trace, and must refuse to produce a \"replay diverged\" verdict unless the manifest certifies every invoked tool as replay-safe or the harness has stubbed every unsafe call. Without this, the dominant failure mode is *false attribution*: divergent re..."
  },
  "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": "d87fd121e4f378166b6c4beb9999f3c0c7793434f617d243db425b7366988a91",
    "verified_classes": [
      "ReplaySafetyViolation",
      "ToolSafety",
      "ToolCall",
      "ReplayPlan"
    ],
    "verified_functions": [
      "plan_replay",
      "execute_replay",
      "replay_safe"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ReplaySafetyViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
