EvoUndo: Recoverability-Constrained Self-Evolution for LLM Agent Harnesses
Paper: arXiv:2608.28363 — *EvoUndo: Recoverability-Constrained Self-Evolution for LLM Agent Harnesses* (Hanzhang Jia, Liheng Zeng, Hao Cheng et al.)
The Problem: Forward Improvement ≠ Recoverability
Imagine an agent system that has run for three months. One day it discovers that changing max_retries from 3 to 5 boosts task success by 4%—and changes it. A week later you find the change saturated a downstream connection pool. You want to revert—but "reverting" is no longer just setting the value back. Other mutations now *depend* on max_retries=5: a middleware handling retry edges, a listener on on_retry_exceeded, temp files in /tmp/retry_5_state. Roll back the scalar and all these dependencies become ghosts pointing at a world that no longer exists.
Most self-improving agent research only checks forward improvement: given harness state \(S\) and mutation \(m\), accept if \(\Delta J = J(m(S)) - J(S) > 0\). But mutations can overwrite config values, reorder middleware chains, shadow existing tools, create unknown temp files, and leak background resources—all invisible to \(J\). As the paper puts it:
> Recovery procedures are often state-dependent—restoring an equivalent state requires information that existed in the pre-mutation state.
The Quadruple: Making "Undo" an Engineering Problem
EvoUndo decomposes recoverability into a quadruple:
- \(m\): the forward mutation
- \(w\): a witness program capturing pre-mutation information
- \(u\): a recovery program using the captured information
- \(\mathcal{C}_e\): an effect contract declaring what the mutation touches
- D0L0 = 0%: without precise addresses or extended primitives, the LLM cannot synthesize recovery programs at all.
- D1L0 = 19.3%: precise addresses help but only for simple strata; L1-level tasks remain 0%.
- D0L1 = 91.4%: rich recovery language with coarse diagnostics soars.
- D1L1 = 84.8%: worse than D0L1.
- L0 (base): config, prompt, tool registration, routing primitives—scalar replacement only.
- L1 (extended) adds indexed-sequence recovery (middleware chains), listener capture/restore, file pre-state preservation (existence + SHA-256 content buffers), resource descriptor management (sockets), and ordered multi-surface rollback in reverse dependency order.
- A new variant of judgment-gate decoupling: the effect contract is a gate declaring effects, audited independently by the runtime—for recovery semantics rather than safe action.
- Another case of solving at a different layer: don't make mutations perfectly reversible (impossible); add recovery infrastructure (witness + recovery + verification).
- A fresh instance of the scalar illusion: recoverability is a vector over states, witnesses, languages, and contracts.
- A new concept: diagnostic non-monotonicity—more diagnostic information can degrade repair performance. Feedback granularity is a tunable parameter everywhere LLMs are asked to fix things.
Crucially, \(m\) is locked once determined. Later repairs may only modify \(w\), \(u\), and \(\mathcal{C}_e\). This prevents a subtle evasion: if \(m\) could be weakened into a no-op, recovery would be trivially "successful" while achieving nothing. The analogy: a surgeon cannot skip the tumor excision—the only adjustable parts are how you record and how you suture.
Counterfactual Round-Trip Verification
Naive verification tests recovery on one state. EvoUndo instead generates a set of counterfactual states \(\mathcal{Q}\)—IID perturbations (boundary values, tool existence, composite surface allocation) and OOD structural changes—and requires recovery to succeed on all of them. Recoverability is a vector, not a scalar: managing it with a single state is "measuring blood pressure with a thermometer."
The 2×2 Factorial Experiment: A Counterintuitive Finding
| | L0 (base language) | L1 (extended language) | |---|---|---| | D0 (coarse diagnostics) | 0/197 (0%) | 180/197 (91.4%) | | D1 (precise addresses) | 38/197 (19.3%) | 167/197 (84.8%) |
The main failure mode in the D1L1 regressions is over-decomposition: given exact state addresses and residuals, the LLM performs finer-grained operations (unregistering listeners one by one, restoring files individually), which introduces ordering, indexing, and dependency errors. Coarse diagnostics push it toward robust coarse-grained primitives.
> Diagnostic granularity should be treated as a model-dependent, representation-dependent tuning parameter—not "the more precise the better."
Recovery Language: L0 vs L1
A hard gate at runtime rejects out-of-language primitives, making expressiveness a quantifiable, controlled variable.
Comparison with Snapshots
| Strategy | Selective cross-surface | Concurrent same-surface | Storage / latency | |---|---|---|---| | Effect-scoped snapshot | 300/300 (100%) | 159/300 (53.0%) | 177.8 B / 0.039 ms | | EvoUndo | 243/300 (81.0%) | 131/300 (43.7%) | 393.6 B / 0.050 ms | | Full snapshot | 0/300 (0%) | 0/300 (0%) | 1165.0 B / 0.084 ms |
Full snapshots fail completely under concurrency—they clobber later state. Effect-scoped snapshots win when the effect surface is known and serializable. EvoUndo fills the gap where inverse semantics are missing, state-dependent, structured, or must be synthesized. It complements rather than replaces snapshots.
Engineering Takeaways
1. Design recoverability as a first-class citizen. Require witness, recovery, and effect contract before accepting any mutation. 2. Finer diagnostic granularity isn't better. Run ablations; some models over-decompose with precise feedback. 3. Counterfactual verification is mandatory. Testing recovery on the current state alone is not testing it. Only cross-state round-trip validation gives confidence in production.
Where EvoUndo Fits
Conclusion: Seatbelts for Self-Evolving Agents
Self-improving agent research mostly makes the car faster. EvoUndo asks how to rescue the passengers after a crash. Deep down, self-evolving agents need not just capability but auditability: effect contracts, witnesses, and counterfactual verification form audit infrastructure tracing what was declared, what was touched, what was verified, and how recovery works. Non-auditable self-evolution is a bomb in a black box. The authors promise open-sourced code, task definitions, counterfactual generators, protocol locks, and evaluation traces.
---
Paper: arXiv:2608.28363 Models/Hardware: gpt-oss-120b (MXFP4, temp=0.2, medium reasoning) on 8× NVIDIA H200 Benchmark: 600 tasks across 6 architectural families (Config / Tools / Middleware / Listeners / Resources / Multi-Surface) Key data: 91.4% recovery at D0L1; D1L1 drops to 84.8% (diagnostic non-monotonicity)