Manuscript Offprint

arXiv:2610.27435

Harness Self-Evolution for Long-Horizon Terminal Agents

Ruhan Wang, Yucheng Shi, Zongxia Li, Junyao Yang, Zhongzhi Li, Yue Yu, Haitao Mi, Dongruo Zhou, Leoweiliang

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

Ruhan Wang1,2,∗^{1,2,*}, Yucheng Shi1,†^{1,\dagger}, Zongxia Li1,3^{1,3}, Junyao Yang1,5^{1,5}, Zhongzhi Li1,4^{1,4}, Yue Yu2^{2}, Haitao Mi1^{1}, Dongruo Zhou2^{2}, Leoweiliang1^{1}

1^{1}Tencent HY LLM Frontier 2^{2}Indiana University 3^{3}University of Maryland, College Park

4^{4}University of Georgia 5^{5}National University of Singapore

∗^{*}This work was conducted during an internship at Tencent. †\daggerInternship mentor.

Long-horizon terminal agents may complete a task in one run yet fail to do so consistently across repeated runs. Stochastic generation can introduce local errors that propagate through subsequent actions and context, creating a gap between task-solving ability and reliable execution. The harness controls command execution, feedback, context management, and completion decisions, providing a direct way to address this gap. The effectiveness of these mechanisms depends on the model's behavior. We present RISEHARNESS, a framework for iteratively improving agent harnesses while keeping model weights fixed. RISEHARNESS focuses on flipping tasks, which have both successful and failed runs under the same configuration. Successful runs establish that the current system can complete the task and provide references for analyzing failures. The analysis combines agent trajectories with internal harness traces collected by a runtime monitor, examining both the model's actions and how the harness executes them, presents feedback, and controls the interaction. A Harness Handbook connects this evidence to specific harness behaviors and their source code, helping identify recurring problems in mechanisms shared across tasks. To address these problems, RISEHARNESS searches other harness frameworks for relevant implementations and uses them as design references, taking into account the current execution flow, interaction protocol, available signals, and model behavior. Candidate changes undergo behavioral checks and repeated task evaluation; versions with measured gains become the basis for the next iteration. This loop progressively integrates suitable mechanisms from different frameworks into a single harness and uses new execution evidence to guide further changes. We evaluate task success and reliability across models, use ablations to examine the contributions of harness execution evidence and external research, and test transfer to unseen benchmarks with the same model. The framework treats a specific model as the unit of harness adaptation, studying how changes to shared interaction mechanisms can make existing capabilities more reliable across tasks.

Date: October 19, 2026

1 Introduction

A model that solves a long-horizon terminal task once may fail to do so consistently. Across many interactions, an incorrect command or a missed observation can change the environment and the context available for later decisions. Stochastic generation can therefore lead to different outcomes even when the task and model remain unchanged. Long-horizon terminal benchmarks examine workflows requiring hundreds of interactions and sustained progress [1, 2]. This distinction between reaching a successful outcome and succeeding reliably across repeated runs is central to agent evaluation [3, 4]. We study how to narrow this gap by improving the harness around a fixed model.

Training-based approaches improve terminal agents through reinforcement learning and verified task synthesis [5, 6]. The harness controls command execution, observation feedback, context management, and completion decisions. Interface design can affect agent performance without updating model weights [7], and the harness itself has become a target for automatic improvement. Execution traces and evaluation feedback can guide changes to harness code and support the evaluation of their effects [8–10]. Failure-informed runtime interventions have also been studied as a way to improve repeated success without changing model weights [11].

Our focus is how to connect differences between successful and failed runs to actual internal harness behavior, identify shared mechanisms to improve, and use implementations from other frameworks as references for changes suited to the current harness and model. A difference between two trajectories does not by itself establish that a harness behavior is missing: the harness may already provide the relevant feedback, or the information needed for a proposed intervention may not be available. Likewise, an effective design in another framework may depend on different interfaces or execution conditions. We introduce RISEHARNESS, which uses execution evidence to check these conditions and to design and validate changes. With the evaluated model held fixed, its evolution loop combines comparisons of successful and failed runs, internal execution analysis, and research into existing implementations.

We begin with flipping tasks, which have both successful and failed runs under the same model and harness configuration. Successful runs show that the current system can solve the task and provide references for analyzing failures. Same-task trajectory contrast and cross-task aggregation help identify recurring behavioral problems [12]. In RISEHARNESS, the contrast first identifies a behavioral need; the analysis then checks whether the current harness can support that behavior and whether it already performs it. A runtime monitor records internal execution and aligns these harness traces with agent trajectories, exposing how proposed actions are dispatched and how feedback reaches the model. We use the Harness Handbook [13] to connect these records to behavioral responsibilities and implementing code. This joint analysis helps distinguish an agent's unsuccessful response from a missing or ineffective harness mechanism and groups supported findings into targets for shared changes.

External documentation can inform the implementation of agent capabilities [14]. RISEHARNESS searches other frameworks, source code, and technical documentation for implementations relevant to the behavioral problems identified through execution analysis. For completion decisions, for example, it can examine how other frameworks track unfinished commands or verify results. The system studies the signals and interfaces these designs require, then considers the current harness's execution flow, available information, and model behavior to decide which ideas are applicable and how to modify existing mechanisms. The goal is to draw on useful designs from different frameworks to develop a harness whose mechanisms work together for the current model.

Behavioral checks assess whether a candidate implements the intended change, while repeated task evaluations measure its effect on performance. Accepted changes provide the basis for subsequent rounds; unsuccessful candidates supply execution evidence for revising the implementation or proposed mechanism. Model weights remain fixed throughout.

RISEHARNESS evolves the harness for a specific model based on its execution behavior. Models may require different forms of interaction support [15, 16]; we therefore conduct evolution separately for each model and examine the resulting behavioral changes. These changes affect shared mechanisms for command execution, observation feedback, and completion. Their benefits beyond the evolution tasks require separate validation. Repeated evaluations and ablations assess the effects on task success and execution reliability, as well as the contributions of dual-trace evidence and research into external implementations. We then hold both the model and the evolved harness fixed and evaluate on benchmarks not used for evolution to test whether these behavioral improvements support a broader range of tasks.

Our main contributions are:

• An evidence-driven harness evolution framework. We introduce RISEHARNESS, which uses successful runs as references for failed runs and iteratively retains harness changes that improve measured performance without updating model weights.

• Behavioral diagnosis from paired runs and internal execution. We combine agent and harness traces with the Harness Handbook to check proposed behavioral needs against actual execution and locate shared

Figure

Figure 1 Operations within a discovery round of RISEHARNESS: record dual traces, identify shared behavioral problems, research and adapt mechanisms, and implement and evaluate changes. The Handbook connects execution evidence to harness behavior and code.

mechanisms for modification.

• Harness modification informed by external implementations. We retrieve relevant implementations from other frameworks, examine their requirements, and use the current harness’s structure, runtime signals, and model behavior to design specific changes.

• Reliability and generalization. Repeated runs and ablations assess harness evidence and external research; we compare changes across models and test cross-benchmark transfer with the model held fixed.

References (39)