Validated skill optimization enables long-term agent code improvements

Certified Long-Horizon Code Agent Evolution via Validation-Gated Skill Optimization

Artificial Intelligence

Summary

It can be hard for computer programs that help with software tasks to keep learning and getting better over a long time, especially without changing their core code. This work focuses on teaching these programs to improve by reusing skills safely while working through many software tasks in order. The researchers created a method called VALVE that checks if new skills are good before keeping them, which helps the program avoid getting worse or losing abilities. They tested VALVE on over a thousand software tasks and showed it steadily improved performance while keeping a smaller, more efficient set of skills.

What this means in practice

  • For software engineering teams: Maintain and improve deployed AI assistants that handle sequences of software development tasks without retraining core models.
  • For automation tool builders: Build tools that optimize task-specific skills in AI agents safely over time to handle evolving code repositories.

Authors

Yifan Wang, Hao Cheng, Xiaomin Li, Yuexing Hao, Hemanth Neelgund Ramesh, Dongwon Jung, Hao Tang, Keru Wang, Chenliang Zhou, Qianhui Wu, Wenlin Yao, Ananth Grama, Andrzej Banburski-Fahey, Baolin Peng, Jaron Lanier, Jianfeng Gao

Abstract

Long horizon agent self-evolution without model weight updates is essential for enabling deployed agents to accumulate reusable skills and improve over time. Prior self-evolution work has focused primarily on short-horizon tasks, while repository-level software engineering remains unexplored despite being an ideal testbed for long-horizon adaptation. In this setting, agents are required to solve streams of sequential tasks, navigate complex dependencies with evolving repositories and persistently store and reuse experience. Text-based skill optimization offers an efficient, non-parametric approach for such adaptation. However, existing methods often suffer from unstable updates, performance drawdown, and agent collapse over extended deployments. In this paper, we formalize the concept of in-context self-evolution and introduce VALVE, a validated-gated framework for long-horizon skill optimization. We establish finite convergence, provide theoretical guarantees for future-task gain and drawdown, and derive the validation and evaluation holdout sizes required for a prescribed tolerance, with leading-order scaling Empirically, our pipeline, VALVE achieves stable self-improvement over evolution horizon spanning more than 1,000 SWE tasks, with average final and peak gains of $14.9$ and $16.5$ points across three frontier models (GPT-5.5, Claude-4.6 and MiniMax-M2.7). The validation gate reduces average drawdown by 75% and produces an 11x more compact skill bank than ungated evolution. We further present extensive ablations identifying the design choices most critical to long-horizon skill evolution.