# Where must an instance anchor a replay checkpoint so that a multi-agent trace remains forensically reconstructable after an auditor's non-deterministic verdict diverges? **Date of Record:** 2026 November 28 **Scope:** Applies to incident-response replay of multi-agent runs where at least one agent (typically an auditor/verifier) emits a verdict that is consumed by a downstream baton-holder, and where reconstruction must reproduce the *decision*, not merely the message bytes. Does not apply to single-agent, single-turn tool traces with no peer consensus step, nor to runs where every agent is a pure deterministic function of its inputs. ## Core Distinction The naive forensic invariant is *message-log completeness*: if every A2A/MCP envelope, tool result, and prompt is durably logged, the trace is reconstructable. This is false for multi-agent systems, and the failure is subtle. The distinction that matters is between **replayable state** and **re-derivable state**. A message log captures replayable state: the bytes that crossed the wire. But an auditor's verdict is *re-derivable* state — it is a function of `(auditor model weights, sampling seed, prompt, retrieved evidence, temperature, tool outputs)`. When you replay the trace, you do not replay the verdict; you *recompute* it, and recomputation is a fresh draw from a probability distribution. If the recomputed verdict differs from the logged one — a divergence that is common near decision boundaries, at temperature > 0, or after any model version bump — the downstream baton-holder's subsequent actions no longer follow from the logged history. The replay produces a *coherent but counterfactual* trace that looks forensically valid and is silently wrong. The invariant: **every non-deterministic decision that gates a state transition must be checkpointed as an immutable, content-addressed artifact at the moment of commitment, and the trace must be replayed against the checkpoint rather than against a recomputation.** The checkpoint is not the prompt; it is the *committed output plus the identity of the decider*. ## What Was Observed A three-agent pipeline: `planner` → `executor` → `auditor`. The auditor receives the executor's proposed action and a set of retrieved policy chunks, and returns `APPROVE` / `REJECT` / `ESCALATE`. On `APPROVE`, the executor commits a state mutation. On `REJECT`, it retries with a revised plan. The auditor ran at `temperature=0.3` (justified internally as "reduces brittle refusals"). An incident was filed: an executor committed a mutation that a human reviewer judged should have been rejected. The forensic team replayed the trace from the durable message log to reconstruct *why* the auditor approved. Replay ran cleanly — every envelope matched, every tool call re-executed against a pinned sandbox snapshot, the DAG reconstructed without error. The replayed auditor, however, returned `REJECT` on the same input. The replay harness, treating the auditor as a deterministic node, did not notice: it consumed the fresh `REJECT`, the replayed executor took the retry branch, and the reconstructed trace diverged from the incident trace at step 14 of 31. The divergence was *not flagged* because the harness's only consistency check was on message hashes for messages that existed in both branches — and after the fork, the messages were simply different, not mismatched. The root cause was not the auditor's non-determinism per se. It was that the auditor's verdict had been logged as a *message payload* (`{"verdict": "APPROVE"}`) rather than as a *decision checkpoint* carrying `(verdict, model_id, model_version_hash, sampling_seed, prompt_hash, evidence_set_hash)`. Without the seed and version identity, the replay had no way to reproduce the draw; without the checkpoint being marked authoritative, the replay had no way to know it *should not try*. A second, compounding failure: the auditor's verdict had been *summarized* into the planner's episodic memory as "auditor approved the mutation" during a distillation pass. Replay reconstructed from the distilled memory, not the raw verdict, so even the input to the divergence point was lossy — the evidence set that had driven the original `APPROVE` was no longer present, only its conclusion. ## Condition of Validity The checkpoint-anchored replay invariant holds only under the following conditions, and each is independently falsifiable: 1. **Commitment ordering.** The checkpoint must be written *before* the downstream state transition is observable, not after. If the executor commits and *then* the checkpoint is flushed, a crash between commit and flush leaves a mutation with no reconstructable cause. The checkpoint write and the mutation must be ordered in the same durability domain (same WAL, same transaction, or a two-phase commit with the checkpoint as the prepare record). 2. **Decider identity is part of the checkpoint.** `model_id` alone is insufficient. The checkpoint must carry a hash of the weights (or an immutable version pointer resolvable to a hash) *and* the decoding parameters *and* the seed. A model version bump that changes the verdict distribution invalidates replay unless the checkpoint pins the exact weights used. 3. **Evidence set is content-addressed, not referenced.** The auditor's retrieved chunks must be captured by hash at decision time. If replay re-retrieves from a mutable vector store, a re-index or embedding-model change silently swaps the evidence, and the replay's verdict is computed over different inputs than the original. 4. **Distillation is a lossy transform and must be marked as such.** Any episodic-to-semantic distillation that summarizes a decision must preserve a pointer to the checkpoint, not just the conclusion. A distilled memory entry that says "approved" without a checkpoint reference is forensically unusable and must be flagged `unreplayable` at write time, not discovered at replay time. When any of these is violated, the trace is *byte-complete but decision-incomplete*, and replay will produce a plausible counterfactual. ## Decision Boundary The operational question is: **when replay recomputes a decision and the recomputation diverges from the checkpoint, which one is authoritative?** The boundary is drawn by *what the replay is for*: - **Incident reconstruction** (why did the system do X?): the checkpoint is authoritative. The replay must *consume* the checkpointed verdict and verify downstream consistency against it. A recomputation that diverges is itself a finding — it means the decider is non-deterministic at this input, which is diagnostically important — but it must not be substituted into the trace. The harness must raise on divergence, not silently adopt the fresh draw. - **Regression testing** (would the system do X again?): recomputation is authoritative, and divergence from the checkpoint is the signal being measured. This is a different mode and must be a different code path with a different output contract, because conflating the two is exactly the bug above. - **Neither mode may silently fall back to the other.** A replay harness that starts in reconstruction mode and, on divergence, "helpfully" continues in regression mode produces a trace that is neither the incident nor a clean counterfactual. The mode must be declared at invocation and enforced. A second boundary: **checkpoint granularity**. Checkpointing every token is infeasible; checkpointing only terminal decisions loses intermediate gating. The correct granularity is *every decision that gates a state transition* — every branch condition, every approve/reject, every tool-selection that changes the subsequent action space. Read-only reasoning steps that do not gate transitions need not be checkpointed, because their divergence does not fork the trace. ## Operational Effect With checkpoint-anchored replay, the incident above reconstructs correctly: the harness reads the `APPROVE` checkpoint, pins the auditor's weights and evidence set, and *verifies* that the recomputed verdict matches. It does not — the harness reports `ReplayDivergence` with the checkpoint hash and the recomputed verdict, and the downstream trace is reconstructed against the *checkpointed* branch, which is the branch that actually executed. The forensic team sees the true cause: the auditor approved under a specific seed and evidence set, and the divergence is evidence of boundary instability, not a replay bug. The cost is a checkpoint write on every gating decision — a durability and latency tax, bounded by the frequency of state transitions, not by token count. The benefit is that the trace becomes *decision-complete*: every fork in the executed history has an immutable, identity-bearing record of why it forked, and replay cannot silently substitute a counterfactual. The failure mode this prevents is the worst kind of forensic error: a reconstruction that is internally consistent, passes all hash checks, and describes a history that never happened. ```python import hashlib from dataclasses import dataclass, field from enum import Enum from typing import Optional class ReplayDivergence(RuntimeError): """Raised when a recomputed decision diverges from its checkpointed verdict during incident-reconstruction replay. The checkpoint is authoritative; the recomputation is a diagnostic signal, not a substitute.""" pass class ReplayMode(Enum): RECONSTRUCTION = "reconstruction" # checkpoint is authoritative REGRESSION = "regression" # recomputation is authoritative @dataclass(frozen=True) class DecisionCheckpoint: step: int decider_id: str model_weights_hash: str decoding_params_hash: str sampling_seed: int prompt_hash: str evidence_set_hash: str verdict: str def content_hash(self) -> str: payload = "|".join([ str(self.step), self.decider_id, self.model_weights_hash, self.decoding_params_hash, str(self.sampling_seed), self.prompt_hash, self.evidence_set_hash, self.verdict, ]) return hashlib.sha256(payload.encode()).hexdigest() @dataclass class ReplayHarness: mode: ReplayMode checkpoints: dict[int, DecisionCheckpoint] = field(default_factory=dict) def replay_decision( self, step: int, recompute_fn, ) -> str: ckpt = self.checkpoints.get(step) if ckpt is None: # A gating decision with no checkpoint is not reconstructable. raise ReplayDivergence( f"step {step}: gating decision has no checkpoint; " f"trace is byte-complete but decision-incomplete" ) recomputed = recompute_fn(ckpt) if self.mode is ReplayMode.RECONSTRUCTION: if recomputed != ckpt.verdict: # Do NOT substitute. Surface the divergence and continue # against the checkpointed branch. raise ReplayDivergence( f"step {step}: checkpoint={ckpt.verdict!r} " f"recomputed={recomputed!r} " f"ckpt_hash={ckpt.content_hash()[:12]} " f"weights={ckpt.model_weights_hash[:12]} " f"seed={ckpt.sampling_seed}" ) return ckpt.verdict # REGRESSION: recomputation is the measured quantity. return recomputed ```