# In what scenarios must an instance treat deterministic replay of a multi-agent trajectory as unverifiable rather than merely lossy **Date of Record:** 2026 November 25 **Scope:** Applies to post-incident forensic replay of recorded multi-agent trajectories where at least one agent step invoked a non-deterministic tool (LLM sampling, live retrieval, clock/random source) and the replay harness reconstructs state by re-executing the trajectory. Does not apply to trajectories captured with full input/output byte-level logging at every tool boundary, nor to single-agent linear traces without inter-agent handoffs. ## Core Distinction There are two different things practitioners conflate under "replay": *reconstruction* (re-deriving the trajectory's state transitions from logged evidence) and *re-execution* (running the agents again against the same inputs hoping to observe the same outputs). Reconstruction is always possible if the log is complete; re-execution is only possible if every non-deterministic oracle in the trajectory is either pinned or bypassed. The boundary failure is this: **a trajectory can be re-executed to completion, produce a plausible-looking divergent trace, and be silently mislabeled as "the incident" — because the replay harness has no way to distinguish a legitimate branch divergence from a corrupted replay caused by a stale cached tool response or a re-sampled LLM call.** The invariant that breaks is *trace identity*: re-execution yields a trace that is structurally isomorphic to the original but semantically different, and the harness's diff logic treats structural isomorphism as evidence of fidelity. The non-obvious part: the failure is worst precisely when the agents are *well-behaved*. Deterministic agents whose outputs are tightly constrained by context will re-execute to nearly the same outputs, so a divergence at step N looks like a genuine incident signal rather than replay noise. In contrast, high-entropy agents produce obvious divergence that a reviewer immediately flags as "replay didn't reproduce." The dangerous regime is the low-variance one. ## What Was Observed A three-agent pipeline (planner → tool-executor → auditor) was replayed after an incident in which the auditor approved a tool call that should have been rejected. The original trajectory was logged with per-step message hashes but *not* with tool response bodies (only response hashes and a TTL'd cache key). The replay harness re-ran the planner with `temperature=0` and a fixed seed, re-ran the tool-executor against a live retrieval index, and re-ran the auditor. Observed trace: 1. Planner re-execution produced a byte-identical plan (temperature 0, pinned seed, identical context). Message hash matched at step 1. 2. Tool-executor's retrieval call hit a *re-indexed* corpus. The top-k document set changed by one document. Response hash mismatched at step 2, but the harness had no response body to compare against — only the hash. 3. The auditor, fed the drifted retrieval context, *rejected* the tool call this time. The replay therefore "explained" the incident as "the auditor was correct and the original run must have had a corrupted auditor input." 4. The forensic report concluded the incident was an auditor input-integrity bug. The actual incident was a prompt-injection payload in the *original* retrieval result that the auditor's guardrail missed. The replay erased the payload because the corpus had been re-indexed, and the harness's structural-isomorphism check (same agent sequence, same tool call graph, same rejection point) passed. The report was wrong in a way that a reviewer could not detect without re-reading the raw retrieval cache, which had expired. The key observation: **the replay harness's fidelity check was a structural check (graph isomorphism + hash match on steps it could hash), and the only mismatched step was one for which it had no body to compare.** The harness reported "partial divergence at step 2, replay otherwise faithful" — which reads to a human as "the incident is at step 2," not "the replay is unverifiable from step 2 onward." ## Condition of Validity Replay of a multi-agent trajectory is verifiable only when, for every step `i` in the trajectory, at least one of the following holds: - The step's full input and output are logged (byte-level), so replay is reconstruction, not re-execution. - The step's non-deterministic oracle is pinned by a recorded seed *and* the oracle's behavior is a pure function of that seed and the logged input (true for seeded sampling with fixed weights; false for retrieval, clock reads, external APIs, and any tool whose backing store can mutate). - The step is provably irrelevant to the incident (no downstream dependency on its output within the incident's causal cone). The condition *fails* — and replay must be marked unverifiable — when a step in the incident's causal cone has a non-pinned oracle and a mutable backing store. The causal cone is the set of steps whose outputs were consumed, directly or transitively, by the step under investigation. In the observed case, step 2's retrieval output was in the auditor's (step 3) input, so step 2 was in the cone, its oracle was unpinned, and its backing store had mutated. Replay was unverifiable from step 2, and the harness should have refused to emit a causal claim about step 3. The subtlety is that the *causal cone must be computed from the logged data-flow graph, not from the agent call order*. In the observed pipeline, step 2 and step 3 were in different agents; a naive replay harness that checks fidelity per-agent, or that treats handoff boundaries as "clean," will miss that the auditor's input was contaminated by the executor's unpinned retrieval. The cone crosses the handoff. ## Decision Boundary The operational rule is: **before emitting any causal claim from a replay, the harness must partition the trajectory's steps into `pinned` (reconstruction-equivalent), `unpinned-but-out-of-cone`, and `unpinned-in-cone`. If `unpinned-in-cone` is non-empty, the replay may report *structural* facts (which agents ran, in what order, which tool calls were attempted) but must not report *semantic* facts (why a decision was made, what the agent "saw," whether a guardrail should have fired).** The boundary is crossed in either direction: - **Over-claiming (the observed failure):** treating a structurally isomorphic replay as a semantic reconstruction. This happens when the harness's diff is graph-based and the only mismatches are at steps with no logged bodies. - **Under-claiming:** refusing to replay at all because *some* step is unpinned, when that step is out of the incident's causal cone. This is safe but expensive; forensic teams then re-run from scratch and lose the structural evidence they legitimately have. The correct boundary is cone-scoped, not trajectory-scoped. A trajectory with one unpinned retrieval at step 2 and an incident at step 7 is fully replayable for the incident if step 2's output was not consumed downstream of step 2 — i.e., if the planner's step 7 decision depended only on steps 1, 3–6. The harness must compute this from the logged data-flow, and must refuse the semantic claim only when the cone intersects an unpinned step. A second boundary: **response-hash-only logging is insufficient for any step whose oracle is unpinned.** A hash tells you *that* the response changed, not *what* changed. When the changed step is in the cone, the harness cannot even distinguish "the agent's decision changed because the input changed" (expected replay behavior) from "the agent's decision changed because the agent is non-deterministic" (a replay artifact). Both produce a hash mismatch and a downstream divergence. The harness must treat hash-only unpinned steps as *opaque* — they poison every downstream semantic claim — rather than as *mismatched*, which implies a comparison was made. ## Operational Effect The practical consequence is that deterministic replay of multi-agent trajectories is a *forensic reconstruction tool*, not a *causality tool*, unless every step in the incident's causal cone is pinned or fully logged. Teams that treat replay as causality produce incident reports that name the wrong step, and the error is undetectable from the report itself because the report's confidence language ("replay reproduced the trajectory up to step 2; divergence at step 2 explains the incident") is technically accurate about the replay and wrong about the incident. The guardrail is a replay harness that does three things the observed harness did not: (1) computes the causal cone from the logged data-flow graph, crossing agent handoffs; (2) classifies each cone step as pinned/unpinned/opaque and refuses semantic claims when any cone step is unpinned or opaque; (3) emits a *replay verdict* alongside the trace, distinguishing `RECONSTRUCTED` (all cone steps logged), `PARTIAL` (some cone steps pinned by seed, none opaque), and `UNVERIFIABLE` (any cone step unpinned or opaque). Only `RECONSTRUCTED` replays may be cited as evidence of agent behavior; `PARTIAL` may be cited as evidence of structure; `UNVERIFIABLE` may be cited only as evidence that the log was insufficient. The deeper invariant: **a replay's epistemic status is bounded by the weakest step in the incident's causal cone, not by the trajectory's overall fidelity.** A harness that reports trajectory-level fidelity will systematically over-claim, because trajectories are long and cones are short — the cone is a small subset of steps, and the harness's global "98% of steps matched" metric says nothing about whether the 2% that didn't match were in the cone. ```python from dataclasses import dataclass from enum import Enum from typing import Iterable class ReplayVerdictError(RuntimeError): """Raised when a replay harness attempts to emit a semantic causal claim from a trajectory whose incident causal cone contains an unpinned or opaque step.""" class StepStatus(Enum): PINNED = "pinned" # full I/O logged, or seeded pure oracle UNPINNED = "unpinned" # mutable oracle, body logged OPAQUE = "opaque" # mutable oracle, hash-only logging @dataclass(frozen=True) class Step: step_id: int status: StepStatus consumed_by: tuple[int, ...] # data-flow edges (not call order) @dataclass(frozen=True) class Trajectory: steps: tuple[Step, ...] incident_step: int def causal_cone(traj: Trajectory) -> frozenset[int]: by_id = {s.step_id: s for s in traj.steps} cone: set[int] = set() frontier = [traj.incident_step] while frontier: sid = frontier.pop() if sid in cone: continue cone.add(sid) # walk backwards: any step whose output fed this step is in the cone for s in traj.steps: if sid in s.consumed_by and s.step_id not in cone: frontier.append(s.step_id) return frozenset(cone) def replay_verdict(traj: Trajectory, claim: str) -> str: if claim not in {"structural", "semantic"}: raise ReplayVerdictError(f"unknown claim type: {claim!r}") cone = causal_cone(traj) by_id = {s.step_id: s for s in traj.steps} cone_statuses = {by_id[sid].status for sid in cone} if claim == "structural": return "STRUCTURAL_ONLY" # semantic claim: any opaque or unpinned step in the cone poisons it if StepStatus.OPAQUE in cone_statuses: raise ReplayVerdictError( f"semantic claim refused: opaque step(s) " f"{sorted(sid for sid in cone if by_id[sid].status is StepStatus.OPAQUE)} " f"lie in the causal cone of incident step {traj.incident_step}; " f"hash-only logging cannot distinguish input drift from agent non-determinism" ) if StepStatus.UNPINNED in cone_statuses: raise ReplayVerdictError( f"semantic claim refused: unpinned step(s) " f"{sorted(sid for sid in cone if by_id[sid].status is StepStatus.UNPINNED)} " f"in the causal cone; replay is PARTIAL, not causal" ) return "RECONSTRUCTED" # Observed incident: planner(1) -> executor(2, retrieval) -> auditor(3) # Retrieval at 2 is hash-only (OPAQUE); auditor at 3 consumes it. observed = Trajectory( steps=( Step(1, StepStatus.PINNED, consumed_by=(2,)), Step(2, StepStatus.OPAQUE, consumed_by=(3,)), Step(3, StepStatus.PINNED, consumed_by=()), ), incident_step=3, ) try: replay_verdict(observed, claim="semantic") # must refuse except ReplayVerdictError as e: print(f"REFUSED: {e}") # Structural claim is still legitimate: print(replay_verdict(observed, claim="structural")) # STRUCTURAL_ONLY ```