arXiv:2608.28363cs.AIAug 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2608.28363

EvoUndo: Recoverability-Constrained Self-Evolution for LLM Agent Harnesses

Tanmay Sah, Dolly Sah, Harshul Jain, Tanya Sah

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

LLM agents increasingly modify their own prompts, tools, middleware, resources, and execution harnesses at runtime. Such self-evolution can improve capability, but a successful mutation may leave persistent effects that cannot be safely reversed in states different from the one in which it was created. We introduce EvoUndo, a framework for representing, synthesizing, diagnosing, and independently verifying recoverability of model-generated self-modifications across counterfactual states. Across 600 unseen one-shot self-evolution tasks, we identify 197 capability-improving mutations that fail recoverability verification. Under the original recovery representation, conventional repair strategies recover 0/197 of these natural failures. Deterministic oracle analysis recovers 48/197 under the original recovery language L0L_{0}, while the extended recovery calculus increases empirical oracle recovery to 191/197. A protocol-locked 2×22 \times 2 grounding-by-expressivity intervention then separates two bottlenecks: exact state-address grounding increases successful recovery from 0/48 to 38/48 (79.2%) when the original language is sufficient, while extending the recovery language enables recovery on 142/143 (99.3%) failures in the oracle-defined S1S_{1} stratum. On the primary gpt-oss-120b backbone, adding exact-address diagnostics to the richer language reduces recovery to 133/143 (93.0%); a Qwen3.8-27B replication preserves the grounding and expressivity effects but not this negative interaction, indicating that the latter is model-dependent. These results indicate that reliable agent self-evolution requires co-designing verification, state grounding, witness semantics, and recovery-language expressivity rather than relying on iterative prompting alone.

1 Introduction

LLM agents are increasingly becoming mutable systems. Beyond selecting discrete actions, modern agents can modify prompts, install or remove tools, change middleware, alter configurations, allocate resources, register event listeners, and reconfigure their execution harnesses at runtime (Yin et al., 2024; Zhang et al., 2026b; Lin et al., 2026). These capabilities create a path toward self-evolving agent harnesses: systems that autonomously adapt their execution environment to novel tasks and failure modes.

Most self-improvement procedures naturally optimize the forward effect of a modification: given a harness state H and a candidate mutation m, a candidate is favored whenever it improves a task objective, J(m(H))>J(H)J(m(H)) > J(H). However, forward improvement is insufficient for long-lived autonomous systems. A successful mutation may overwrite configuration values, reorder middleware chains, shadow existing tools, create temporary files, or leak background resources. If that mutation later becomes obsolete, causes a regression, or conflicts with subsequent updates, simply applying a static inverse operation may fail to restore the prior state. Crucially, the correct recovery procedure is often state-dependent: restoring observational equivalence requires information that existed in the pre-mutation state.

This motivates a fundamental requirement for autonomous self-evolution: capability-improving mutations must also be robustly recoverable. After applying a mutation to state s, the system must be able to utilize pre-mutation state evidence to restore a state observationally equivalent to s. Furthermore, this property must hold not merely in the nominal state used during construction, but across counterfactual states in which the mutation may operate.

We formalize and investigate this challenge: How should an autonomous agent search for capability-improving harness mutations when robust recoverability is an explicit invariant of the search space?

We introduce EvoUndo, a framework for recoverability-constrained self-evolution. EvoUndo provides a framework for representing, synthesizing, diagnosing, and independently verifying recoverability of model-generated self-modifications. Candidates are executed across counterfactual harness states and admitted only when the recovered states satisfy typed observational equivalence with their corresponding pre-states. Recovery failure is treated as an actionable defect to diagnose and repair before a mutation is persistently admitted.

A central insight of this work is that recoverability is relational: whether a mutation is recoverable depends jointly on the state distribution, witness capture semantics, observational contract, and expressivity of the recovery language. On 120 deliberately corrupted but recoverable mutations, verifier-guided typed diagnosis repairs 114/120 (95.0%) cases at budget four, compared with 4/120 (3.3%) under independent regeneration. In sharp contrast, across 600 unseen one-shot self-evolution tasks, 197 capability-positive mutations fail recovery verification, and conventional verifier-guided repair recovers 0/197 under the original recovery representation.

A zero-generation solvability audit reveals that only 48/197 natural failures are recoverable by the deterministic oracle under the original language L0L_0, whereas an extended language L1L_1 raises empirical oracle recoverability to 191/197. A protocol-locked 2×22 \times 2 grounding-by-expressivity factorial separates these failure modes: exact state-address grounding raises recovery from 0/48 to 38/48 (79.2%) when L0L_0 is sufficient, while L1L_1 unlocks recovery on 142/143 (99.3%) failures in the oracle-defined S1S_1 stratum. On gpt-oss-120b, adding exact-address diagnosis on top of L1L_1 reduces recovery to 133/143 (93.0%), while a cross-model replication shows this secondary interaction is model-dependent.