In what scenarios must an instance treat wall-clock timestamps as replay-poisoning artifacts during multi-agent trajectory reconstruction
**Date of Record:** 2026 December 2 **Scope:** Applies to forensic replay of recorded multi-agent trajectories where the replay engine reconstructs agent decisions from a logged event stream that includes wall-clock timestamps, tool latencies, and TTL expiries. Does not apply to single-agent deterministic sandboxes with fully injected clocks, nor to replay systems that already normalize all time to a logical (Lamport/vector) clock at capture time.
Core Distinction
There are two kinds of non-determinism in an agent trajectory: *sampling* non-determinism (the LLM's token draw) and *temporal* non-determinism (the agent's decisions depending on the value of the clock). Sampling non-determinism is well understood and is handled by seeding and temperature pinning. Temporal non-determinism is the trap: it looks like ordinary metadata, so it gets logged as a passive field and replayed as a passive field, but in a stateful multi-agent system the clock is an *input to control flow*.
The distinction that matters operationally: a timestamp that was merely *recorded* is inert; a timestamp that was *read by agent logic* (to decide a retry, to expire a lease, to break a tie in a baton-pass, to decide whether a peer's warrant is still valid) is a causal input. During replay, if that input is re-supplied from the wall clock instead of from the recorded value — or worse, if it is re-supplied from the recorded value but the *replay engine's own* elapsed time is used to evaluate a relative comparison — the reconstructed trajectory diverges from the original at exactly the branch points where time was consulted. The divergence is silent: the replay produces a plausible, well-formed, and wrong incident narrative.
What Was Observed
A three-agent pipeline (planner → executor → auditor) recorded a trajectory in which the executor's tool call to a payment-adjacent API timed out at 30,000 ms. The executor's retry policy was: retry once if `now - call_start < lease_deadline`, otherwise hand off to the auditor as a hard failure. In the original run, the retry landed at 30,412 ms, inside the 30,500 ms lease, so the executor retried and the second call succeeded. The auditor never saw a failure.
During forensic replay, the reconstruction engine re-executed the executor's policy against the logged event stream. The logged `call_start` was preserved, but the retry-decision code read `time.monotonic()` from the *replay host* to compute `now`. The replay host executed the re-decision in 0.8 ms of wall time, so `now - call_start` evaluated to roughly 0.8 ms — comfortably inside the lease — and the retry fired immediately. That part matched. But the *second* tool call, replayed against a recorded response, was tagged with the replay host's timestamp rather than the original, and when the auditor later evaluated the warrant's freshness against a 60 s TTL using the replay clock, the warrant appeared 59.2 s fresher than it actually was at audit time. The auditor approved a handoff that, in the original run, it had approved only because the executor's success had already occurred. The replay showed the auditor approving a warrant that in the original timeline had not yet been issued.
The incident report generated from this replay attributed the near-miss to "auditor over-permissiveness." The actual cause was a 30 s tool timeout interacting with a lease boundary. The replay had manufactured a false root cause by letting the clock leak across the reconstruction boundary.
A second observation, from the same incident class: when replay engines *do* pin the clock to recorded values, they frequently pin only absolute timestamps and leave relative durations (TTL remaining, backoff elapsed, lease margin) to be recomputed from replay-host elapsed time. This produces a subtler failure — the absolute timeline is correct but every *comparison* against a duration is evaluated in the wrong time base. Agents whose control flow is dominated by timeout/retry/expiry logic (which is most tool-using agents) diverge on the first such comparison.
Condition of Validity
The failure requires all of the following to hold simultaneously:
- At least one agent in the trajectory reads a clock value and uses it in a branch condition (retry, expiry, tie-break, lease check, freshness check on a warrant or capability token).
- The recorded event stream stores that clock read as a timestamp rather than as the *derived decision* (e.g., it logs `call_start=…` and `call_end=…`, not `retry_decision=true`).
- The replay engine re-executes the branch condition rather than replaying the recorded branch outcome.
- The replay engine's clock source is not the recorded clock source — either because it uses host wall time, or because it uses recorded absolute times but recomputes relative durations from host elapsed time.
When condition 3 fails (the engine replays recorded outcomes rather than re-deriving them), the failure cannot occur but the replay is no longer a reconstruction — it is a transcript, and it cannot answer "what would have happened if." When condition 4 fails (a fully injected virtual clock driven by the recorded stream, including relative durations), the replay is sound. The failure lives precisely in the gap between "re-execute decisions" and "inject a complete virtual clock."
The invariant that bounds it: **every value an agent read from a clock during the original run must be reconstructible from the log without consulting any clock during replay, and every duration the agent compared against must be reconstructible as a recorded difference, not a recomputed one.**
Decision Boundary
An instance must treat a timestamp as a replay-poisoning artifact — and refuse to re-derive the associated decision — when any of the following hold:
- The timestamp was consumed by a comparison against a *duration* (TTL, lease, backoff, timeout, freshness window) and the log does not also record the *evaluated result* of that comparison.
- The timestamp participates in a cross-agent ordering decision (baton-pass sequencing, last-writer-wins conflict resolution, "is this peer's state newer than mine") and the log does not record the ordering as a logical-clock relation.
- The timestamp gates a capability or warrant whose validity is checked by a *different* agent than the one that minted it, because the two agents' clock reads are not guaranteed to share a time base even in the original run.
Conversely, an instance may safely re-derive from recorded timestamps when the comparison is purely intra-agent, the duration is recorded as a literal, and the replay engine injects a virtual clock advanced solely by recorded deltas. In that narrow case the timestamp is a deterministic input and replay is sound.
The boundary is not "absolute vs relative" — it is **"was the clock read a causal input to a branch, and is the branch outcome recoverable from the log without a clock."** If the outcome is recoverable, replay the outcome. If it is not, the replay engine must either inject a complete virtual clock or explicitly mark the branch as *unreconstructible* and surface it as a forensic gap rather than silently fabricating a decision.
Operational Effect
The practical consequence is that incident reports generated by clock-leaking replay engines are not merely imprecise — they are *confidently wrong in a specific direction*: they under-attribute failures to timing/lease/expiry mechanisms and over-attribute them to reasoning or policy defects, because the replay host's fast clock collapses every timeout into a success and every expiry into a fresh warrant. An engineer reading such a report will fix the agent's prompt or policy when the actual defect is a lease boundary 500 ms too tight.
The guardrail is to make clock reads first-class causal events in the trajectory log: record not just `t=…` but `decision=retry, because=(now - call_start)=30412 < lease=30500`, so that replay can either honor the recorded decision or flag the branch as requiring virtual-clock injection. Where that instrumentation is absent, the replay engine must fail closed — refuse to emit a root-cause attribution for any branch downstream of an unrecorded clock read — rather than produce a fluent, wrong narrative. The following guard encodes that fail-closed contract.
import time
from dataclasses import dataclass
class ReplayClockLeakError(RuntimeError):
"""Raised when a replay would re-derive a clock-dependent branch
without a recorded outcome or an injected virtual clock."""
@dataclass(frozen=True)
class ClockRead:
agent_id: str
branch_id: str
value_ms: float
compared_against_duration_ms: float | None
recorded_outcome: bool | None # None => outcome not logged
def replay_branch(read: ClockRead, virtual_clock_ms: float | None) -> bool:
"""Reconstruct a clock-dependent branch decision.
Sound iff either the outcome was recorded, or a virtual clock
advanced solely by recorded deltas is supplied. Host wall time is
never a valid source.
"""
if read.recorded_outcome is not None:
return read.recorded_outcome
if read.compared_against_duration_ms is None:
# Pure ordering read with no recorded outcome: unreconstructible.
raise ReplayClockLeakError(
f"agent={read.agent_id} branch={read.branch_id}: "
"clock read used for ordering but outcome not logged; "
"refusing to consult host clock"
)
if virtual_clock_ms is None:
raise ReplayClockLeakError(
f"agent={read.agent_id} branch={read.branch_id}: "
f"duration comparison ({read.value_ms} vs "
f"{read.compared_against_duration_ms}) has no recorded "
"outcome and no virtual clock injected; replay would leak "
"host time and fabricate a decision"
)
# Virtual clock advanced only by recorded deltas: sound.
return (virtual_clock_ms - read.value_ms) < read.compared_against_duration_ms
def reconstruct(read: ClockRead, virtual_clock_ms: float | None = None) -> bool:
# Defensive: assert we never silently fall back to host time.
assert time is not None # host clock import is present but unused here
return replay_branch(read, virtual_clock_ms)