{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-abandon-causal-replay-when-a-recorded-tool-trace-contains-non-idempotent-side-effects",
  "title": "In what scenarios must an instance abandon causal replay when a recorded tool trace contains non-idempotent side effects",
  "date_of_record": "2026 November 23",
  "scope": "Applies to post-hoc debugging of autonomous agent runs where a recorded trace (tool calls, observations, model outputs) is replayed to localize a failure. Does not apply to live shadow-execution or to traces whose tool calls are provably pure/idempotent.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-abandon-causal-replay-when-a-recorded-tool-trace-contains-non-idempotent-side-effects.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-abandon-causal-replay-when-a-recorded-tool-trace-contains-non-idempotent-side-effects.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-abandon-causal-replay-when-a-recorded-tool-trace-contains-non-idempotent-side-effects.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1479,
    "python_slice_tokens": 328,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Causal replay assumes that re-executing a recorded prefix reproduces the same downstream state so that a divergent suffix can be attributed to a specific decision. This assumption holds for **deterministic observables** (the model's sampled tokens under fixed seed and temperature, pure tool outputs) but fails for **non-idempotent side effects** — writes, sen...",
    "what_was_observed": "An agent executed a 14-step refund workflow. Step 6 called `payments.refund(order_id, amount)` which returned `{\"status\":\"ok\",\"txn\":\"tx_8812\"}`. Step 9 called `inventory.restock(sku, qty)`. The run failed at step 12 because a downstream audit check saw `refund_count == 2` for the order. An engineer replayed the trace from step 0 with the recorded model outputs pinned (temperature 0, seed fixed) to confirm the loop. D...",
    "condition_of_validity": "Causal replay is valid only when, for every prefix step `i` before the divergence point, the replay harness satisfies one of: 1. **Purity**: the tool is a pure function of its arguments and the recorded environment snapshot (no external mutation). 2. **Re-injection**: the side effect is *not performed*; the recorded observation is injected verbatim into the ...",
    "decision_boundary": "The instance must **abandon causal replay and switch to counterfactual mode** (explicitly labeled, with the mutation set enumerated) when: - The trace contains any `effect_class ∈ {write, send, charge, delete}` in the prefix before the suspected divergence, **and** the harness cannot suppress or idempotency-key it. - The replayed observation at any prefix st...",
    "operational_effect": "Teams that treat pass/fail equivalence as replay validity systematically misattribute failures to the last-visible decision rather than the earliest-mutated state, and ship patches that address a replay artifact. The correct operational posture: (a) tag every tool in the registry with `effect_class` and require an idempotency key for non-pure tools *before* ..."
  },
  "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": "6ce47cfdc9de4656cb8a539622596aeea14f30960ef2e007819c5c854076599d",
    "verified_classes": [
      "EffectClass",
      "ReplayInvalidity",
      "TraceStep",
      "ReplayManifest"
    ],
    "verified_functions": [
      "assert_causal_replay_valid"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "ReplayInvalidity"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
