arXiv(opens in a new tab)cs.AIAug 2026Cited by 12 papers on PaperVantage

Manuscript Offprint

arXiv:2608.23041

AutoSaddler: Automatic Harness Optimization with Durable Updates from Agent Execution Traces

Sungho Park, Wonjoong Kim, Rongyuan Tan, Jue Zhang, Wook-Shin Han, Pengfei Gao, Chanyoung Park, Yongqiang Yao, Rao Fu, Elsie Nallipogu, Qingwei Lin, Saravan Rajmohan, Dongmei Zhang

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

Abstract

LLM agents remain unreliable on long-horizon tasks, where small local failures can compound over extended interactions and lead to overall task failure. Although external harnesses can substantially improve robustness, harness design remains a manual and expensive process that requires searching over a large space of prompts, tool configurations, and control logic. We propose AutoSaddler, an automatic harness optimization framework that formulates harness improvement as an offline learning problem and iteratively updates the harness using failure signals from mini-batches. AutoSaddler combines failure-trace diagnosis, structured patch generation that treats the harness as code, and validation-based update selection. Experiments on GAIA2, SWE-Bench Pro, and Terminal-Bench 2.0 show that AutoSaddler substantially improves agent performance over the corresponding base harnesses, achieving gains of 9.0, 9.6, and 10.0 percentage points, respectively. Ablation studies further suggest that effective harness optimization benefits from three ingredients: deep debugging rather than shallow reflection, targeted modifications rather than unconstrained editing, and generalization-aware selection rather than trajectory-specific repair. Together, these results suggest that automatic harness optimization is a promising path toward more performant and reliable agent systems. Project website and code will be available at https://aka.ms/AutoSaddler-website.

1 Introduction

Large Language Models (LLMs) have improved rapidly in capability in the past years. Despite this progress, they continue to exhibit “jagged intelligence”: strong performance on some tasks coexists with poor performance on others that appear closely related or even simpler. This unevenness creates a fundamental reliability challenge for agentic applications, especially in autonomous, multi-step, and long-horizon settings, where success depends on sustained competence across many consecutive decisions. In response, an emerging line of work seeks to build external harness layers around LLMs to make agent behavior more robust on long-horizon tasks [61, 3, 5, 31, 21]. Empirical evidence suggests that a well-designed harness can substantially improve agent performance [21].

Manual harness tuning, however, is time-consuming and difficult to scale. It requires exploring a large design space, including prompt specifications, tool configurations, and other system-level choices. Moreover, evaluating each candidate harness is costly, since the agent may need to execute many steps before task success or failure becomes clear. Analyzing the resulting long-horizon trajectories is itself nontrivial and often requires substantial manual effort. These challenges create a strong need

*Work done during an internship at Microsoft.

†^{\dagger}Corresponding authors.

Preprint.

Figure

(a) Compute Efficiency

(b) Learning Efficiency

Figure 1: Comparison of optimization performance and efficiency on GAIA2. (a) AutoSaddler reaches 72.3% dev accuracy with ~1,000 total task executions, whereas GEPA and Meta-Harness saturate at 64.6% and 61.5%, respectively, despite consuming ~2,800 task executions. (b) When measured by the number of execution rollouts leveraged for optimization, AutoSaddler achieves its best performance after consuming only 147 traces, ~10× fewer than Meta-Harness (1,400 traces).

for automated harness optimization methods that can efficiently adapt the harness when switching to a new underlying LLM or deploying the agent in a new domain.

In this work, we formulate automatic harness optimization as an offline learning problem and introduce AutoSaddler, a framework that iteratively refines the harness using failure signals from batches of training tasks. At each iteration, we first construct a candidate harness from the accumulated exploration history and evaluate it on the training examples in the current mini-batch. We then diagnose failed agent trajectories and use the resulting insights to guide patch generation, treating the harness itself as code. For each accepted harness update, we further assess generalization on a validation set. Together, these components enable AutoSaddler to optimize harnesses in a principled and scalable manner, while promoting updates that generalize beyond the observed training samples.

We evaluate AutoSaddler on three agent benchmarks: GAIA2 [10], SWE-Bench Pro [9], and Terminal-Bench 2.0 [28]. Across all three benchmarks, AutoSaddler substantially improves long-horizon agent performance. It surpasses the corresponding base harness by 9.0 percentage points on GAIA2, 9.6 points on SWE-Bench Pro, and 10.0 points on Terminal-Bench 2.0, and exceeds the strongest automated baseline by 7.4, 4.4, and 6.7 points, respectively. Ablations and qualitative analysis further support the design rationale of AutoSaddler, showing that effective harness optimization depends on three key ingredients. First, in-depth diagnosis is necessary because long-horizon failures require deep debugging rather than shallow reflection on agent execution failures. Second, structured intervention is important because the large and diverse harness space favors targeted modifications over unconstrained editing. Third, generalization-aware selection is critical because improving performance over a task distribution requires retaining broadly useful updates rather than repairing a single trajectory.

Our main contributions are summarized as follows:

• We formulate automatic harness optimization as an offline learning problem over prompts, tools, and middleware, leveraging failure signals from agent execution traces.

• We introduce AutoSaddler, which combines evidence-grounded diagnosis, structured patching, and generalization-aware selection to produce durable harness updates.

• We conduct extensive experiments on three challenging agent benchmarks, demonstrating the effectiveness of the proposed approach in improving long-horizon agent performance.

References (62)