DeltaHarness: Self-Evolving Harnesses for Resource-Adaptive Tool Execution

Lecheng Yan, Jianze Lin, Xicheng Han, Xiantao Xu, Wenxi Li, Chenyang LyuarXiv 2026 · arXiv

TL;DR

DeltaHarness is a framework that enables tool-using AI agents to "self-evolve" their execution strategies by running real-world experiments. By measuring actual performance in a specific environment—accounting for hidden factors like CPU contention and network speed—it automatically revises how it schedules and executes tools, achieving up to a 30% reduction in latency.

What Problem Does This Paper Address?

When an LLM-based agent uses tools (like FFmpeg for video editing or a compiler for code), it relies on an execution harness to organize these operations. Traditionally, these harnesses use static rules. However, the "best" way to run a task often depends on runtime conditions that aren't visible in the task description.

For example, should you process four video clips in parallel or fuse them into one operation? The answer depends on your current CPU load, cache state, and network bandwidth. A plan that is fastest on a powerful server might be sluggish or even fail on a resource-constrained laptop. DeltaHarness addresses this "uncertainty gap" by allowing agents to perform firsthand execution to identify the most efficient physical plan for their specific target setting.

Methods

The authors introduce an execution-guided policy-search method. The core of DeltaHarness is a loop consisting of three main components:

  1. Physical Policy ($H$): Decides how to structure the task (e.g., partitioning, concurrency, and whether to "materialize" intermediate files).
  2. Dispatcher ($Q$): Schedules the operations based on measured delivery times.
  3. Experiment Selector ($I$): Chooses which task-resource combinations to test next to gather the most useful information.
Figure 1: Firsthand harness adaptation. (a) A tool interface admits plans with unknown relative cost. (b) I chooses paired trials. (c) The model revises H from the resulting experience; Q dispatches the graph. The illustrated revision materializes clips before local fusion.

The system uses a "procurement" panel to gather evidence and an independent "confirmation" panel to decide if a new candidate policy is actually better than the current incumbent. A particularly novel feature is the recursive variant, where the agent doesn't just update its execution plan but actually rewrites its own "evidence-analysis" program to better interpret performance data over time.

Figure 2: The update loop in Algorithm 1. Selected trials supply feedback; common confirmation controls incumbent replacement. Both panels use fresh randomized-order pairs. Frozen policies are evaluated on held-out tasks and resources.

Datasets

The researchers evaluated DeltaHarness primarily on complex video-editing tasks using FFmpeg.

  • Environments: They tested across diverse hardware and resource settings, including 12-core Macs and Linux servers with varying CPU affinities (2 to 32 cores) and simulated network constraints (using FUSE and HTTP shaping from 1.5 to 16 MiB/s).
  • Tasks: Evaluation included both "development" tasks used for evolution and "held-out" tasks to test how well the learned policies generalize to new editing configurations.

Key Insights and Ideas

  • Firsthand Evidence is Essential: The authors demonstrate that runtime conditions can completely reverse which execution plan is faster. You cannot reliably predict the optimal strategy without actually running code in the target environment.
  • The "Materialization" Trade-off: One surprising finding was that "materializing" (saving) intermediate video clips before fusion often reduced latency by 30%. While this adds local compute work, it significantly reduces the traffic on constrained input paths, proving that "more work" can sometimes mean "faster delivery."
  • Self-Improving Analysis: By allowing the agent to rewrite its analysis logic (the recursive variant), it becomes better at identifying patterns in performance noise, leading to more robust policy improvements.
  • Active Exploration: Rather than random testing, the agent's ability to select which experiments to run ($I$) allows it to close the performance gap much faster than uniform sampling.

Key Results

  • Latency Reduction: In a fixed-dispatch video editing case, the evolved policy reduced complete-delivery latency by 30.0%.
  • Generalization: On held-out tasks (tasks the agent hadn't seen during training), the evolved policies reduced latency by 8.2% compared to the best possible fixed plan.
  • Reliability: Under tight resource constraints (like 1.5 MiB/s bandwidth), the reference policies often failed to complete tasks, while the DeltaHarness-evolved policies maintained 100% completion rates.
  • Efficiency: The system successfully increased average active CPU utilization (FFmpeg cores) from 0.95 to 1.80, showing it learned to better exploit available hardware.
Figure 3: Frozen-policy transfer: per-configuration H/HP latency, geometric mean of two fresh pairs. Val- ues below one favor H. Crosses in the lower strip mark reference frame deficits, which leave the full-panel speed ratio undefined. All H outputs complete.

Limitations and Future Work

  • Amortizing Acquisition Cost: Running experiments takes time and compute. The authors note that this "policy acquisition cost" is a one-time overhead that must be justified by the gains across many subsequent task executions.
  • Fixed Kernels: Currently, DeltaHarness optimizes the harness (the organization) but leaves the underlying tool kernels (e.g., the FFmpeg binary itself) and the LLM weights fixed.
  • Higher-Level Recursion: While the agent rewrites its analysis program, the authors suggest that future work could involve the agent also rewriting its experiment selection logic ($I$), adding another layer of self-evolution.

DeltaHarness represents a significant step toward agents that don't just "use" tools, but actively learn how to master them within the specific constraints of their digital "bodies" and environments.

Summary updated

Abstract

Tool-using agents rely on execution harnesses to organize and schedule tool operations. The same task and resource description can conceal runtime conditions that reverse the latency ordering of valid execution plans. Resolving this uncertainty requires firsthand execution in the target setting. We introduce DeltaHarness, an execution-guided policy-search method that adapts agent harnesses from cold-start measurements. Its QHI loop uses the observed response to update runtime dispatch, revise physical plans, and select experiments for later proposals. An independent confirmation panel controls policy replacement. With fixed dispatch, a revised materialization policy reduces complete-delivery latency by 30.0% on one video-editing task across three fresh pairs. On held-out tasks, the evolved policies reduce latency by 8.2% relative to the best fixed plan in one seed and by 4.6% relative to the initial proposal in another.
BibTeX
@misc{yan2026deltaharness,
  author = {Lecheng Yan and Jianze Lin and Xicheng Han and Xiantao Xu and Wenxi Li and Chenyang Lyu},
  title = {{DeltaHarness: Self-Evolving Harnesses for Resource-Adaptive Tool Execution}},
  year = {2026},
  eprint = {2611.21688},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.21688},
}
Figure