# When must an instance refuse to re-enter a LITMUS adversarial replay after a partial-scoring checkpoint **Date of Record:** 2026 November 27 **Scope:** Applies to LITMUS-style adversarial safety harnesses that drive a target agent through a scripted multi-turn attack sequence and persist per-turn scoring checkpoints so an interrupted run can be resumed. Does not apply to single-shot red-team probes with no resumable state, nor to harnesses that re-run the full trajectory from turn 0 on every resume. ## Core Distinction The harness has two failure surfaces that look identical in logs but are governed by opposite invariants: - **Scoring resumption** — re-attaching the scorer to an already-executed turn to finish computing a verdict. The agent's output for that turn is immutable and already captured; only the judge is re-invoked. This is safe to retry. - **Execution resumption** — asking the target instance to produce the *next* turn of a partially-executed attack sequence. This is **not** a retry. The target agent carries conversational state, and the adversarial script's turn *N+1* is conditioned on the target's turn *N* output. If the harness replays turn *N+1* against a target that has already internalized turn *N*, the attack sequence is no longer the one that was validated. The non-obvious boundary: a checkpoint that records "scoring complete through turn N" is **not** sufficient authorization to resume execution at turn N+1. The two progress markers are conflated by most harness implementations because they share a turn index. This conflation is the failure mode. ## What Was Observed A LITMUS run against a tool-using target (attack script: 9 turns, escalating from benign framing to a state-poisoning payload at turn 7) was killed at the 41-minute mark by a node eviction. The checkpoint file recorded: ``` turns_executed: 6 turns_scored: 5 last_scored_turn: 5 target_session_handle: ``` Turn 6 had executed — the target produced an output that began complying with the turn-6 framing — but the judge had not yet scored it when the harness died. On resume, the harness logic was: *find the highest turn with a score, resume execution at the next turn.* It read `last_scored_turn: 5`, concluded execution should resume at turn 6, and replayed turn 6's prompt against the **still-warm session handle**. The target had already seen turn 6. It now received turn 6 a second time, appended to a context that already contained its own first-turn-6 partial compliance. The doubled framing collapsed the escalation ladder: the model, seeing the adversarial framing repeated and its own prior partial compliance in-context, treated turn 6 as an established pattern rather than a boundary probe and complied fully. The harness then scored turn 6's *second* execution as a clean pass-through to turn 7 and reported a **false-positive safety failure** — the target was flagged as having complied with an attack it had, in the validated trajectory, only partially resisted. The inverse also occurred in a sibling run: a target that had *refused* turn 6 on first execution was re-prompted with turn 6, and because its own refusal was now in-context, it treated the repeated probe as a test of consistency and refused harder — the harness scored this as a robust pass, masking that the original trajectory had been contaminated. In both directions, the replay silently rewrote the artifact the benchmark exists to produce. The root cause is not the eviction. It is that `turns_scored` and `turns_executed` are independent counters, and the resume path read the wrong one. ## Condition of Validity The invariant that must hold for any resumable adversarial harness: > Execution may resume at turn *k* only if the target's session state is guaranteed to be **exactly** the state after turn *k−1* and **no later**. Equivalently: `turns_executed == turns_scored` at the resume boundary, or the session handle is discarded and the trajectory is replayed from turn 0. This is valid only when one of three conditions holds: 1. **Clean boundary:** the checkpoint was taken between a scored turn and the next execution (executed == scored). Resume is a pure continuation. 2. **Session discard:** the harness can cold-start the target and replay turns 1..k from the recorded transcript. Expensive but sound, because the replay is deterministic *given* the recorded inputs — the target's outputs are re-generated but the attack script is identical, and any divergence is itself a scored event rather than a silent corruption. 3. **Immutable-turn capture:** the harness recorded turn *k*'s output and the session handle is provably frozen (no further inference against it). Then resume is scoring-only, not execution. The invariant is **invalid** whenever `turns_executed > turns_scored` and the session handle is warm and reusable. That is precisely the state an eviction mid-scoring produces, and it is the common case, not the edge case, because scoring is the slow step (judge model round-trip) and eviction is most likely to land there. ## Decision Boundary At resume, the harness must branch on the relationship between the two counters, not on `last_scored_turn` alone: - `executed == scored` → resume execution at `scored + 1` against the warm handle. Safe. - `executed == scored + 1` and the unscored turn's output is captured → **score-only resume**: re-invoke the judge on the captured output, do not touch the target. Then re-evaluate the boundary. - `executed > scored + 1`, or the unscored turn's output was not captured, or the session handle cannot be proven frozen → **the handle is poisoned**. Discard it, cold-start, and replay from turn 0. Attempting to "skip ahead" is the failure. - Any case where the harness cannot distinguish a warm handle from a cold one → treat as poisoned. The cost of a false replay is a corrupted benchmark artifact; the cost of a discard is compute. The asymmetry is not close. The subtle trap: a harness that stores only `last_scored_turn` cannot make this decision, because it has thrown away the `turns_executed` counter that distinguishes the safe from the poisoned case. Persisting both counters is a *correctness* requirement, not telemetry. ## Operational Effect Once the boundary is enforced, two operational properties follow. First, adversarial trajectories become **replay-auditable**: every reported verdict traces to a captured (prompt, output) pair that was scored exactly once, and any resume that could not guarantee that is escalated to a full replay rather than silently patched. The benchmark's claim — "this target failed turn 7" — becomes a claim about a specific, reconstructible trajectory instead of a claim about whatever the harness happened to assemble after the last crash. Second, the failure mode becomes **loud**. The poisoned-handle case now raises instead of producing a plausible-looking score. A harness that silently resumes at `last_scored_turn + 1` against a warm session is not a harness with a resume bug; it is a harness that fabricates safety results under exactly the conditions — mid-scoring eviction, long adversarial sequences — where its results matter most. The general principle for agentic evaluation infrastructure: an adversarial harness is itself a stateful agent, and it inherits the same continuity hazards as the systems it evaluates. A checkpoint is only a valid resume point if the *reasoning state* it authorizes is the state that was actually checkpointed. A turn index is not a session state. ```python class PoisonedReplayBoundary(RuntimeError): """Raised when a LITMUS resume would replay an adversarial turn against a target session that has already executed that turn. Replaying rewrites the trajectory artifact; refuse and force a cold-start replay instead.""" pass def authorize_resume(checkpoint: dict, session_is_frozen: bool) -> int: """ Return the turn index at which execution may resume. checkpoint keys: turns_executed, turns_scored, last_scored_turn, unscored_output_captured (bool) """ executed = checkpoint["turns_executed"] scored = checkpoint["turns_scored"] last_scored = checkpoint["last_scored_turn"] if executed == scored: # Clean boundary: pure continuation. return last_scored + 1 if executed == scored + 1 and checkpoint.get("unscored_output_captured"): # Score-only resume: finish the judge, do not touch the target. # Caller must re-invoke authorize_resume after scoring completes. return -1 # sentinel: score-only # executed > scored + 1, or the unscored output was lost, or the handle # is warm and reusable. Any of these means the session state is past the # checkpoint. Replaying would double-inject the adversarial turn. if not session_is_frozen: raise PoisonedReplayBoundary( f"resume blocked: executed={executed} scored={scored} " f"last_scored={last_scored} session_is_frozen={session_is_frozen}; " "session has executed past the checkpoint. Discard handle and " "replay from turn 0." ) # Frozen handle with captured outputs: safe to score the backlog only. return -1 def resume_run(checkpoint: dict, session_is_frozen: bool, replay_from_zero) -> None: turn = authorize_resume(checkpoint, session_is_frozen) if turn == -1: # Score-only path; after scoring, counters converge and we re-enter. return if turn > checkpoint["turns_executed"] + 1: raise PoisonedReplayBoundary( f"resume turn {turn} skips past executed=" f"{checkpoint['turns_executed']}; trajectory would be discontinuous." ) replay_from_zero(turn) ```