---
title: Warm Repair with Clean Replay Overview
url: https://www.emergentmind.com/topics/warm-repair-with-clean-replay
type: topic
---

# Warm Repair with Clean Replay Overview

Warm Repair with Clean Replay denotes a family of recovery and warm-start procedures that reuse an already constructed execution state, buffer, or partial plan for fast local repair, while imposing an additional replay, admissibility, or cold-start criterion that guards semantic validity, stability, or reproducibility. In the recent literature, the phrase is used in several non-identical but structurally related settings: commitment-sensitive structured tool agents, Program-of-Thought repair, repository bootstrapping, long-horizon planning-graph correction, replay-buffer transfer for noisy quantum RL, and mixed offline–online bandits [2605.23311] [2605.30052] [2605.15815] [2607.01767] [2604.21863] [2210.00025]. A plausible implication is that the term names a recurring systems pattern rather than a single canonical algorithm.

## 1. Shared pattern across domains

Across the cited works, the warm component is the reuse of pre-existing state: DART restores a checkpoint local to a failed subtask instance; RePoT preserves the maximal verified prefix of a primitive-action plan; BootstrapAgent verifies candidate contracts inside a long-lived Docker container; WM-SAR sends only a compact causal subgraph to the LLM instead of replaying the whole planning graph; the quantum RL scheme copies \(B_{\text{clean}}\) into \(B_{\text{noisy}}\); and Artificial Replay consumes historical samples only when the base algorithm proposes the corresponding action [2605.23311] [2605.30052] [2605.15815] [2607.01767] [2604.21863] [2210.00025].

The clean replay component differs by domain. In DART, correctness is enforced by recoverable-boundary certification and an admissibility test that can block local rollback and force whole-task replay [2605.23311]. In RePoT, replay is deterministic verification against the environment until the first invalid transition, followed by at most one suffix-repair call [2605.30052]. In BootstrapAgent, warm-mode validity is insufficient for acceptance; the final contract must also pass fresh-container cold replay [2605.15815]. In WM-SAR, “clean replay” refers to a compact subgraph that preserves the causal bridge without downstream noise [2607.01767]. In the replay-buffer and bandit settings, the clean object is historical or noiseless data that are reused selectively rather than through indiscriminate full warm-start [2604.21863] [2210.00025].

This cross-domain recurrence suggests a common design objective: accelerate iterative correction without allowing latent state, unsupported commitments, irrelevant context, or spurious historical data to determine the accepted outcome.

## 2. Semantic recoverability in structured tool agents

DART formalizes warm repair for commitment-sensitive LLM-driven execution by modeling agents as explicit finite-state machines with observable traces,
\[
G=(S,A,\delta,M,H),
\]
where each recorded step is
\[
e_t=(s_t,a_t,s_{t+1},\Delta m_t).
\]
The runtime also maintains a conservative producer–consumer dependency graph over subtask instances using read/write sets,
\[
R(I)=\bigcup_{t:I_t=I}R_t,\qquad W(I)=\bigcup_{t:I_t=I}W_t,
\]
and
\[
I_p \rightsquigarrow I_q \iff W(I_p)\cap R(I_q)\neq \varnothing.
\]
Each subtask skeleton declares entry states \(S_{\text{ent}}\), commit predicates \(P_{\text{com}}\), exit predicates \(P_{\text{exit}}\), input/output interfaces \(X_{\text{in}},X_{\text{out}}\), and an effect policy \(\pi_{\text{eff}}\). A recoverable boundary \(b\) for failed instance \(I\) is defined by
\[
\mathrm{Recoverable}(b,I)\iff \mathrm{Decidable}(b,I)\wedge \mathrm{Closed}(b,I)\wedge \mathrm{Separable}(b,I)\wedge \mathrm{Controllable}(b,I).
\]
DART then restricts actual restore decisions to checkpoints satisfying admissible local recovery:
\[
\mathrm{AdmissibleRecover}(f,I,c)\iff \mathrm{Identified}(f,I)\wedge \mathrm{Stable}(c,I)\wedge \mathrm{ScopeOK}(I,c)\wedge \mathrm{NoCommittedConflict}(I)\wedge \mathrm{EffectAllowed}(I,c).
\]
If the admissible set \(\mathcal{A}(f)\) is nonempty, DART selects the most recent admissible checkpoint,
\[
c^*(f)=\max \mathcal{A}(f),
\]
and otherwise rejects local rollback and falls back to whole-task replay [2605.23311].

The operational workflow is five-stage: failed-instance localization; recoverable-boundary certification; instance-aligned checkpointing at \(\tau\in\{\text{entry},\text{commit},\text{exit}\}\); admissible-rollback selection; and warm repair plus replay from the latest admissible checkpoint. The alignment is instance-specific: snapshots are indexed as \(c=(I,\tau)\), and restore searches only within \(\mathcal{C}(I_f)\), which avoids reopening unrelated work. In the scheduling-assistant example, DART restores from a commit checkpoint of Subtask 1, re-queries calendars, and resumes Subtask 2, while keeping downstream committed work intact because \( \mathrm{NoCommittedConflict} \) has already been checked [2605.23311].

The empirical claims are correspondingly narrow and strong. In commitment-sensitive cases, Retry-Only always succeeds but replays 14–29 actions; “Entry-only” local restore fails with 0% success; DART’s Comp-Frozen succeeds 100% with replay \(=1\)–\(2\) actions, zero upstream replay, and preserved committed progress. On a LangGraph substrate, built-in checkpoint-restore fails the schedule-form commitment-sensitive case with 0% success, whereas DART succeeds with a one-step replay. A five-domain safety audit reports 54 comparable rows with 100% safe-equivalent outcomes, and blocking calibration on 47 evaluated events yields 35 admitted with 0 unsafe admissions and 12 blocked with 0 false blocks. The paper’s central corrective claim is explicit: controller legality does not imply semantic validity, and sound local recovery requires an explicit admissibility check [2605.23311].

## 3. Verified-prefix repair in Program-of-Thought planning

RePoT treats warm repair as deterministic replay plus suffix repair for one-shot Program-of-Thought plans. The environment is deterministic, with
\[
\mathrm{step}: S\times A\to (S\times \{\mathrm{true},\mathrm{false}\}\times \mathrm{ErrorMsg}),
\]
and a plan is a sequence \(\pi=(a_1,\ldots,a_n)\) of primitive actions. Let
\[
t^*=\min\{i\in\{1,\ldots,n\}\mid ok_i=\mathrm{false}\},
\]
or \(n+1\) if all steps are valid. The verified prefix is then
\[
\pi_{\text{verified}}=(a_1,\ldots,a_{t^*-1}),
\]
and \(s_{\text{verified}}=s_{t^*-1}\) is the last valid state. RePoT runs one-shot PoT, replays until the first invalid transition, and if the goal has not yet been reached, makes at most one additional LLM call to repair the suffix from the verified state. The budgeted loop therefore costs at most one extra LLM call relative to PoT on the subset of problems where PoT fails [2605.30052].

Its evaluation isolates the effect of checkpointed replay under a matched budget of at most two calls. On PuzzleZoo-775, RePoT peaks at 96.9% versus 86.3% for PoT on GPT-5.4-mini-medium; against the matched-budget PoT-retry baseline, RePoT is +3.6 percentage points on Gemini 3.5 Flash with 95% CI \([+2.2,+5.4]\), is statistically a tie on GPT-medium and Claude, and loses on GPT-mini. On PlanBench Blocksworld, the no-thinking variants show gains of +9.3 pp for GPT-5.4-mini, +11.4 pp for Claude Sonnet 4.6, and +1.1 pp for Gemini 3.5 Flash. The paper also introduces Adaptive RePoT, which measures
\[
\phi=\frac{|\pi_{\text{verified}}|}{|\pi|},
\]
and if \(\phi<\theta\) with \(\theta=0.15\), or if \(|\pi_{\text{verified}}|=0\), abandons suffix repair and performs a fresh PoT retry instead [2605.30052].

The controlled-recovery benchmark Derail-550 addresses a common misconception: that an error message alone is an adequate recovery signal. The reported condition is the opposite. On Gemini and GPT-medium, checkpointed methods clear at least 78% and at least 37%, respectively, while `error_only` remains at 20.7% and 3.1%, and `no_feedback` at 3.8% and 1.6%. RePoT\_full scores 80.7% on Gemini and 59.6% on GPT-medium; RePoT\_restart from \(s_0\) scores 82.4% on Gemini and 94.5% on GPT-medium. The paper’s stated takeaway is that checkpoint information, not the specific verified-prefix tail, is the load-bearing recovery signal [2605.30052].

## 4. Cold-start reproducibility in repository bootstrapping

BootstrapAgent uses Warm Repair with Clean Replay inside a Docker-based, trace-driven repair loop for generating a reusable `.bootstrap` contract. The formal distinction is between warm verification inside a long-lived container,
\[
\tau_t^{\text{warm}} = V^{\text{warm}}(R,C_t;B),
\]
and clean replay in a fresh container from the minimal base image,
\[
\tau_t^{\text{cold}} = V^{\text{cold}}(R,C_t;B).
\]
For either mode \(m\in\{\text{warm},\text{cold}\}\), validity is
\[
\mathrm{Valid}_m(R,C;B,V)=1
\]
iff setup, diagnostics, and minimal verification all pass:
\[
Y_I^m=\mathrm{pass}\ \wedge\ Y_D^m=\mathrm{pass}\ \wedge\ Y_M^m=\mathrm{pass}.
\]
Acceptance requires both predicates:
\[
\mathrm{Valid}_{\text{warm}}(R,C^*;B,V)=1\ \wedge\ \mathrm{Valid}_{\text{cold}}(R,C^*;B,V)=1.
\]
The repair loop therefore performs repeated warm verification for fast feedback, but invokes fresh-container replay only once warm-mode tests pass [2605.15815].

The loop begins with \(C_0\leftarrow \mathrm{GenerateContract}(P)\), launches one Docker container for warm iterations, verifies \(C_t\) in warm mode, and, if warm validity holds, runs a cold-start replay in a new container. Otherwise it computes a trace-driven repair delta \(\Delta_t\leftarrow \mathrm{RepairDelta}(C_t,P,\tau_t^{\text{warm}})\), filters it through
\[
\mathrm{SanityCheck}(\Delta_t,P,E_R),
\]
and applies it via \(C_{t+1}\leftarrow C_t\oplus \Delta_t\). The sanity condition forbids removal or weakening of any command in the original minimal verification \(M_0\) or any evidence-justified command in \(S_0\), and requires provenance support in \(E_R\) without contradiction of plan \(P\). In practice, repairs may `insert_commands`, `remove_commands`, or `replace_commands` at specific zero-based indices [2605.15815].

The theoretical motivation is explicitly tied to reproducibility. The paper states that Docker image builds are deterministic modulo external network calls; residual-state speed-ups such as caches, installed packages, and generated compiled artifacts do not alter the semantic requirement that \(C_t\) specify all necessary setup commands; and the final cold replay prevents transient warm-state fixes from masking missing steps. Under the paper’s assumptions, if a cold-valid contract exists in the reachable contract space \(\mathcal{C}(E_R)\), the loop will discover it within \(T_{\max}\) iterations assuming a complete LLM repair oracle [2605.15815].

The quantitative effects are large. Disabling warm-state repair and forcing every iteration to start from a fresh container adds an extra 4,839.9 minutes on Repo2Run, 851.6 minutes on ExecutionAgent, and 421.9 minutes on Installamatic. The per-repo median wall-clock reduction due to warm repair is 42.9 percent on Repo2Run, 30.2 percent on ExecutionAgent, and 32.2 percent on Installamatic. When a Claude Code agent reuses the generated `.bootstrap`, ExecutionAgent shifts from 285.2 s to 112.0 s and from 597.9K to 115.7K total tokens; Installamatic shifts from 337.8 s to 282.3 s and from 594.4K to 312.6K total tokens; Repo2Run shifts from 391.9 s to 309.8 s and from 797.8K to 526.9K total tokens. Across 212 repositories, the combined mechanism cuts downstream build time by 22.3 percent and total token usage by 25.9 percent, while BootstrapAgent reports a 92.9% success rate overall [2605.15815].

## 5. Clean replay as causal-subgraph repair in long-horizon rollouts

In "Repair the Amplifier, Not the Symptom" [2607.01767], warm repair with clean replay is reformulated for long planning graphs. A failure graph is
\[
G_f=(V,E,X,t^*),
\]
where nodes are planning or tool calls and edges encode causal or dependency relations. Each node \(v\) carries observed error magnitude \(e(v)=\|\bar X_v-X_v\|\), uncertainty \(u(v)\), repair cost \(c(v)\), and a node type. With budget \(K_{\max}\), the repair objective is to find the smallest connected region \(R\subseteq V\), \(|R|\le K_{\max}\), whose removal makes the residual world-model operator stable:
\[
R^*=\arg\min_{R\subseteq V\ \text{connected},\ |R|\le K_{\max}} \rho(B_{G_f\setminus R}).
\]
The operator \(B\) is the coupled node-edge error propagation operator. Under the coupled node-edge setting, the paper states that \(\rho(B)\) fully characterizes future error growth and enters the planning-regret bound through \(\rho(B_{G_f\setminus R})\) [2607.01767].

WM-SAR operationalizes this objective through subgraph amplification analysis. It computes a GEAF score
\[
\mathrm{GEAF}_v=e(v)\cdot \rho(A_v)\cdot w^H,
\]
a coupling factor
\[
k_v=L_A(v)\cdot M_x(v),
\]
and a seed score
\[
\mathrm{seed\_score}(v)=e(v)\cdot \mathrm{GEAF}_v\cdot (1+k_v).
\]
Region growth then uses marginal spectral relief
\[
\Delta_\rho(u\mid R)=\rho(B_{G_f\setminus R})-\rho(B_{G_f\setminus (R\cup\{u\})})
\]
and adds frontier nodes maximizing
\[
\mathrm{gain}(u)=\alpha_1\cdot e(u)(1+k_u)+\alpha_2\cdot \Delta_\rho(u\mid R)-\alpha_3\cdot \mathrm{penalty}(u),
\]
followed by pruning of any node whose removal does not raise the residual spectral radius. The returned region \(R^*\) is the compact causal subgraph to serialize and send to the LLM [2607.01767].

The contrast with other repair strategies is explicit. Full-graph replay re-serializes all \(|V|\) nodes, can consume up to approximately 2,000 tokens, and floods the LLM with irrelevant symptoms. Local symptom scanning methods such as TopK, sliding window, and \(k\)-hop may repair the visible worst node while missing upstream amplifiers, or may include many harmless neighbours. WM-SAR’s clean replay shows only the compact subgraph \(R^*\), typically 6–10 nodes or approximately 800 tokens, which the paper states preserves the causal bridge without downstream noise [2607.01767].

The reported results support that framing. In synthetic agent calling-trees of approximately 26 nodes with cascade gain \(a=1.1\), engineering baselines reduce immediate NodeMSE but leave \(\rho(B)\) high at 0.4–1.0, so post-repair errors re-amplify with GrowthSlope approximately \(+0.01\) to \(+0.03\). LocalRepair-3Hop covers approximately 99% of nodes, drives \(\rho(B)\) to 0.01, but uses 25 nodes and is therefore near full replay. WM-SAR uses 8.3 nodes on average, achieves \(\rho(B)\)-reduction approximately 1.95, with pre 1.97 to post 0.02, NodeMSE@32 approximately 6.3, GrowthSlope approximately \(+0.0004\), and LLM Rec-Exact \(=0.50\) on GPT-4o-mini with 855 tokens. Full-graph LLM repair recovers 0.24 exact with 2,157 tokens. The paper further reports that at \(K=3\) nodes, WM-SAR already recovers more than 1.45 \(\rho(B)\)-reduction versus at most approximately 0.8 for TopK or \(K\)-hop, and that over cascade gains \(a\in[0.7,1.4]\), WM-SAR sustains at least 90% of maximal \(\rho(B)\)-reduction while Greedy-Point stays near zero [2607.01767].

## 6. Replay-buffer transfer and historical-data replay

The same phrase also appears in data-centric warm-start procedures. In the quantum RL setting, the clean replay buffer \(B_{\text{clean}}\) is copied directly into the noisy target buffer:
\[
B_{\text{noisy}}^{(0)} \leftarrow B_{\text{clean}}.
\]
Transitions have the standard off-policy form
\[
C_t=(S_t,A_t,R_t,S_{t+1},d_t),
\]
and, under prioritized replay, each transition is sampled with probability
\[
\mu_i=\frac{\Psi_i}{\sum_j \Psi_j}.
\]
The paper specifies vanilla PER,
\[
\Psi_i^{(\mathrm{PER})}=|\delta_i|^\alpha,
\]
and ReaPER,
\[
R_i=1-\frac{\sum_{j>i}|\delta_j|}{\sum_j|\delta_j|},\qquad
\Psi_i^{(\mathrm{ReaPER})}=R_i^\omega\cdot |\delta_i|^\alpha.
\]
For ReaPER\(+\), the reliability exponent is annealed as
\[
\omega(\tau)=\omega_{\min}+(\omega_{\max}-\omega_{\min})\cdot \min(\tau/T_{\mathrm{ann}},1.0),
\]
with \(\omega_{\min}=0.1\), \(\omega_{\max}=0.7\), \(T_{\mathrm{ann}}\approx \tfrac12\) of the training budget, and \(\alpha=0.4\). In the noisy phase, the same replay rule is used as in the clean phase, so transferred priorities remain valid [2604.21863].

The experimental setup pretrains \(B_{\text{clean}}\) for a fixed 12 GPU-hour budget on 6-qubit BeH\(_2\), 8-qubit H\(_2\)O, and 12-qubit H\(_2\)O tasks, then reduces \(\epsilon_{\text{start}}\) from 1.0 to 0.55 and tightens curriculum thresholds. Reported improvements of clean-to-noisy warm replay versus from-scratch noisy training are 47–58% fewer steps to chemical accuracy on 6 qubits, 50–85% fewer on 8 qubits, and 88.2% fewer on 12 qubits; up to 90% reduction in final energy error on 6 and 12 qubits; 57.6% fewer CNOTs on 12 qubits; and composite score improvements of 19–36%, approximately 28.7%, and approximately 51% on 6-, 8-, and 12-qubit tasks, respectively. The paper’s explanation is that clean and noisy tasks share state/action structure, Bellman targets remain aligned under modest noise, initial coverage improves, and subsequent noisy transitions provide self-correction [2604.21863].

In stochastic bandits, "Artificial Replay" [2210.00025] defines a mixed offline–online procedure in which historical data \(H=\{(a_j,R_j)\}_{j=1}^H\) are not consumed wholesale. Instead, when the base algorithm \(\mathsf{ALG}\) proposes action \(\tilde A\), Artificial Replay checks whether an unused historical sample with that action exists. If so, the sample is replayed and fed to \(\mathsf{ALG}\) without advancing the round; otherwise a genuine online pull occurs. The main theoretical condition is independence of irrelevant data (IIData): for deterministic \(\mathsf{ALG}\), adding samples from actions different from \(\mathsf{ALG}(D)\) does not change the next action,
\[
\mathsf{ALG}(D)=\mathsf{ALG}(D\cup D').
\]
Under IIData, the paper proves a regret coupling to Full Start:
\[
(\pi_t^{\mathrm{AR}})_{t=1}^T \stackrel{d}{=} (\pi_t^{\mathrm{FS}})_{t=1}^T,
\]
and therefore equal regret in distribution [2210.00025].

The data-efficiency result is that Artificial Replay may use only a fraction of the historical data while matching Full Start regret. For arm \(a\), the expected number of historical pulls used satisfies
\[
\mathbb{E}[N_H(a)]\le \min\left\{H_a,\ 1+\frac{2\log(2TK)}{\Delta(a)^2}\right\}.
\]
In \(K\)-armed experiments with \(K=10\) and \(T=1000\), AR and Full Start coincide up to sampling noise, while AR can leave 60–70% of history unused once \(H\gg \log T/\Delta^2\). In continuous combinatorial bandits, AR maintains identical regret to Full Start while using far fewer regions in the adaptive partition and leaving a large fraction of history unused [2210.00025].

## 7. Recurring claims, limitations, and common misconceptions

Several misconceptions are directly rejected by the papers. DART shows that local checkpoint legality is not enough: controller legality does not imply semantic validity, because committed downstream work may depend on upstream history that no longer exists [2605.23311]. RePoT shows that error-only feedback is not the primary recovery signal; checkpoint state is the load-bearing signal [2605.30052]. BootstrapAgent shows that a warm pass is not a sufficient acceptance condition; only a contract that also passes cold replay is admitted [2605.15815]. WM-SAR argues that repairing the most visible symptom is often inferior to repairing the causal amplifier, and that near-full replay can recover stability only by forfeiting compactness [2607.01767]. Artificial Replay shows that full warm-start from all historical data can be wasteful even when it is regret-equivalent under IIData [2210.00025].

The limitations are also domain-specific. DART can block local rollback and force whole-task replay when \(\mathcal{A}(f)=\varnothing\), when instance localization fails, or when committed-consumer conflicts exist [2605.23311]. RePoT’s matched-budget comparison is capability-sensitive: it strictly dominates PoT-retry on Gemini, ties on GPT-medium and Claude, and loses on GPT-mini, which is why Adaptive RePoT routes between suffix repair and fresh retry based on verified-prefix length [2605.30052]. BootstrapAgent’s theoretical claim is explicitly conditional on mild assumptions about Docker determinism and on a complete repair oracle [2605.15815]. WM-SAR requires per-node error estimates and loses advantage in black-box settings without intermediate \(e(v)\) [2607.01767]. The quantum RL warm-replay argument depends on shared state/action structure between clean and noisy tasks and on only mild task shifts [2604.21863].

Taken together, these results support a precise but plural understanding of warm repair with clean replay. The warm phase accelerates recovery by reusing valid local state, trusted prefixes, persistent execution environments, compact causal subgraphs, or historical data. The clean replay phase is the mechanism that prevents this reuse from becoming unsound: admissibility checks in commitment-sensitive runtimes, deterministic verified replay in planning environments, fresh-container verification for reproducibility, spectral stabilization of the residual planning graph, or selective rather than exhaustive consumption of prior experience. This suggests that the unifying principle is not simple rollback, but controlled reuse under an explicit criterion that determines when reuse remains valid [2605.23311] [2605.30052] [2605.15815] [2607.01767] [2604.21863] [2210.00025].

Source: https://www.emergentmind.com/topics/warm-repair-with-clean-replay