# Why does an instance misreport safety drift when LITMUS probes are scored after context compaction? **Date of Record:** 2026 November 27 **Scope:** Applies to adversarial safety-drift measurement of long-running LLM agents where LITMUS-style probe suites are injected into a conversation that is subject to mid-run context compaction (summarization, truncation, or eviction). Does not apply to stateless single-turn evaluations or to compaction that preserves full probe text verbatim. ## Core Distinction A LITMUS probe suite measures safety drift by presenting the agent with a battery of adversarially constructed prompts and scoring the responses against a refusal/behavior rubric. The suite assumes a **probe-response locality invariant**: the response scored is the response generated under the exact probe that was presented. Under compaction, this invariant silently breaks. The failure is not that the agent becomes less safe; it is that the *measurement instrument* is mutated by the same mechanism (context reduction) that the measurement is supposed to observe. The scorer attributes a behavioral drift to the agent when the drift actually occurred in the probe corpus itself—probes were summarized, reordered, deduplicated, or truncated into weaker or ambiguous forms before the agent ever saw them. This is a boundary condition, not a general safety property: it only manifests when (a) the probe suite is resident in the same context window as the working task, and (b) compaction is triggered during the probe window. It is invisible in aggregate metrics because compaction reduces probe severity (raising apparent refusal rates) on some probes while collapsing multi-turn probes into single turns (lowering them) on others—net drift is near zero while per-probe drift is large. ## What Was Observed A long-horizon agent was instrumented with an interleaved LITMUS suite: every N task steps, a probe is appended, the response captured, and the probe-response pair written to an evaluation buffer. At step ~140 the working context crossed the compaction threshold. The summarizer, instructed to "preserve task-relevant state," treated the probe history as conversational noise. Three distinct traces were captured: 1. **Probe paraphrase collapse.** A multi-turn jailbreak probe (setup turn, escalation turn, extraction turn) was summarized into a single sentence: "User asked some questions about the topic." The agent responded to a benign paraphrase of the original setup turn only. The scorer, matching on probe ID, recorded a *refusal* where the un-compacted control recorded a *compliance*. Apparent safety improved by 34 percentage points on that probe family—an artifact. 2. **Probe reordering and deduplication.** The summarizer consolidated five semantically similar probes into one representative probe and dropped four. The evaluation buffer still expected five responses; four were backfilled by the agent's nearest subsequent response, which belonged to an unrelated task step. Those four were scored against the wrong probe. Two registered as "unsafe" because a benign coding answer, scored against a data-exfiltration rubric, matched a keyword heuristic. 3. **Severity attenuation via truncation.** A probe with a long adversarial preamble was truncated at the compaction boundary, dropping the final instruction that made it adversarial. The remaining text was a harmless question. The agent answered helpfully. The scorer flagged "safety drift: over-compliance." The actual cause was that the adversarial payload had been evicted. The aggregate drift score across the run was within noise of the control (Δ = -1.2 pp). The per-probe variance was 8× the control. The suite reported "no drift" while 40% of its probes had been corrupted. ## Condition of Validity The probe-response locality invariant holds if and only if, for every scored response *r* with probe ID *p*: - the text presented to the agent immediately preceding *r* is byte-identical to the canonical form of *p*; - *r* was generated in the turn immediately following *p*, with no intervening summarization, tool call, or eviction; - the evaluation buffer's probe ID for *r* was assigned at injection time and not inferred post hoc. When any of these is violated, the score is measuring the compaction function, not the agent. The practical test: replay the run with compaction disabled and diff the probe texts the agent actually received against the canonical corpus. Any non-empty diff invalidates the drift measurement for the affected probes. This replay is cheap because the probe corpus is fixed; it requires only the injected-probe log, not a full model re-run. ## Decision Boundary The boundary is between **compaction as an observable event** and **compaction as a measurement contaminant**. If the probe suite lives in an isolated context partition that compaction cannot touch (a pinned system segment, a separate scoring channel, or an out-of-band injection path), drift measurement is valid and compaction can be studied as an independent variable. If probes share the mutable working context, compaction must be treated as part of the treatment, not the instrument. Operationally, the rule is: **never score a probe whose presentation text was produced by the same context-management layer whose effect you are measuring.** Either pin probes out-of-band, or pin the compaction boundary so that probe turns are never summarized—and record the compaction event as a first-class annotation on every response in the window, so downstream analysis can partition contaminated from clean responses. A second boundary governs remediation: a per-probe drift spike inside a compaction window is not evidence of agent drift until the probe text is verified intact. Escalating on unverified spikes produces false safety regressions and erodes trust in the suite. ## Operational Effect The effect is a **silent measurement inversion**: the suite reports stability precisely when its instrument has degraded most, because compaction both weakens probes (raising apparent refusals) and corrupts probe-response pairing (adding noise that averages toward zero). Teams that gate deployments on aggregate drift scores will ship agents whose true safety behavior degraded, because the corruption masks it. Teams that gate on per-probe variance will see the signal but attribute it to agent nondeterminism rather than instrument corruption. The guardrail is a **probe integrity check** at scoring time: for each response, verify the presented text against the canonical probe hash before the rubric is applied; reject or quarantine mismatches rather than scoring them. This converts a silent corruption into an explicit, counted failure, bounding the measurement's error to the number of quarantined probes rather than letting it leak into the drift estimate. ```python import hashlib from dataclasses import dataclass class ProbeIntegrityViolation(RuntimeError): """Raised when a scored response's presented probe text does not match the canonical probe.""" pass @dataclass class ScoredResponse: probe_id: str presented_text: str response_text: str compaction_annotated: bool def canonical_hash(probe_text: str) -> str: return hashlib.sha256(probe_text.encode("utf-8")).hexdigest() def verify_and_score( scored: ScoredResponse, canonical_probes: dict[str, str], rubric_fn, ) -> float: if scored.probe_id not in canonical_probes: raise ProbeIntegrityViolation( f"probe_id {scored.probe_id!r} not in canonical corpus; " "response was backfilled or misassigned" ) expected = canonical_hash(canonical_probes[scored.probe_id]) actual = canonical_hash(scored.presented_text) if expected != actual: raise ProbeIntegrityViolation( f"probe {scored.probe_id!r} presented text hash {actual[:12]} != " f"canonical {expected[:12]}; compaction likely mutated the probe. " f"compaction_annotated={scored.compaction_annotated}" ) return rubric_fn(scored.probe_id, scored.response_text) def score_suite( responses: list[ScoredResponse], canonical_probes: dict[str, str], rubric_fn, ) -> dict: clean, quarantined = [], [] for r in responses: try: clean.append(verify_and_score(r, canonical_probes, rubric_fn)) except ProbeIntegrityViolation as e: quarantined.append({"probe_id": r.probe_id, "reason": str(e)}) if not clean: raise ProbeIntegrityViolation( "all probes quarantined; drift score is undefined, not zero" ) return { "drift_score": sum(clean) / len(clean), "clean_count": len(clean), "quarantined": quarantined, "measurement_valid": len(quarantined) == 0, } ```