arXiv:2610.34938cs.SEOct 2026

Manuscript Offprint

arXiv:2610.34938

How Do Coding-Agent Harnesses Self-Evolve? An Empirical Study of Retrospective Adaptation

Christoph Treude, Sebastian Baltes

Christoph Treude

Singapore Management University

Singapore

ctreude@smu.edu.sg

Sebastian Baltes

Heidelberg University

Heidelberg, Germany

sebastian.baltes@uni-heidelberg.de

Abstract—Coding agents can adapt their harnesses, the software, configuration, and instructions used to run them, based on experience from earlier tasks, but whether these adaptations improve their behavior on later tasks remains unclear. We study /retro, a skill that asks an agent to review a completed session and propose harness changes, and ask what changes it proposes and whether implemented changes reduce repeated work on later tasks. We ran Claude Code on 30 SWE-bench Verified issues, qualitatively coded the 125 proposals from /retro, implemented 24, and evaluated 12 harness changes on later issues from the same repositories in fresh sessions with and without each change. Most proposals referred to an event in the session, but 18 of 43 lint-related proposals recommended a practice regardless of what had happened. Among the seven evaluations in which sessions without the change encountered the targeted problem, two changes eliminated the targeted action, one reduced its occurrence, four showed no reduction, and some changes added work on unrelated issues. Harness self-evolution requires more than generating and implementing changes: it needs ways to establish whether a change helps on later tasks and to revise or remove changes that do not.

Index Terms—coding agents, agent harness, self-evolution, retrospectives, SWE-bench

I. INTRODUCTION

Coding agents such as Claude Code run inside a harness: the software, configuration, and instructions used to run the agent, including context files such as CLAUDE.md that the agent reads at the start of each session. A session that identifies how to run a repository's tests or which tests already fail can retain this information in the harness for later sessions on the same repository. Retaining changes from completed sessions for use on later tasks, without retraining the model, is harness self-evolution [1]. Whether a retained change helps is a separate question: a change can describe one task rather than the repository, can stay outside a later session's context, or can be read without changing what the agent does.

The /retro skill is one mechanism for producing such changes. It instructs a coding agent to conduct a retrospective: a review of a completed session that generates numbered proposals for harness changes requiring human approval [2]. In our study, Claude Code completed the task sessions, generated the retrospectives, and implemented approved proposals. Two large language models (LLMs) coded the proposals, and we selected which proposals to implement, chose the later issues, and labeled the outcomes, so the process we study is self-evolution with human selection and evaluation rather than an autonomous loop. We ask two research questions. RQ1: What harness changes does /retro propose, and to what extent are they based on events in the session? RQ2: Under what conditions do implemented adaptations prevent targeted actions on later issues from the same repository?

An implemented harness change is an adaptation. For each adaptation, we operationalize repeated work as a later session performing a specific action that the adaptation was intended to prevent, such as running tests with pytest when it is not installed, or rerunning tests on unmodified code to check whether an unrelated failure was already present. This is a behavioral measure, not a judgment that the action was unnecessary or that preventing it improved the task outcome. We transferred individual adaptations, each proposed after one session, to other issues in the same repository. By recording whether later sessions encountered the targeted problem, consulted the adaptation, and repeated the targeted action, we examine when a retained adaptation changes what the agent does.