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

Manuscript Offprint

arXiv:2609.09134

Co-Evolving Harnesses and Models: On-Policy Correction Helps Weaker Models Catch Up Where Imitation Fails

Zhou Yu, Bin Bi, Shiva Kumar Pentyala, Shubham Mehrotra, Sougata Chaudhuri, Shilpa Bhagavath, Zeyuan Chen, Ran Xu, Phil Mui, James Zhu, Sitaram Asur

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

Abstract

Agent harnesses (the system prompt, tool set, execution hooks, and context-management scaffolding around a model) are a critical determinant of agentic task success, and automated harness evolution has recently proven highly effective at enabling smaller models to perform well on domain-specific tasks at a fraction of the cost of frontier models. Since both the harness and the model's weights shape an agent's behavior, and fine-tuning methods such as LoRA are a widely adopted practical model lever for small and mid-sized models, we ask how these two levers should be combined. Using seven enterprise agentic benchmarks [Yang et al., 2026], we first evolve a harness with the weaker model and realize its gains; we then find that a stronger expert model often makes even better use of the evolved harness, suggesting that the weaker model could learn from the expert to close the remaining performance gap. However, the natural next step of teaching the weaker model using the expert's trajectories under the evolved harness surprisingly backfires: imitating the expert causes the weaker model to regress on all seven tasks (-4 to -30 points), a result reproduced across two model families (Qwen3-Coder and Gemma 4)¹, even though the identical procedure helps under the unevolved baseline harness. Our analysis reveals that, under imitation, the weaker model does acquire the expert's knowledge and makes greater use of the harness scaffold, but its fit to the harness is impaired. The weaker model adopts the expert's planning strategy without the competence to execute it and no longer fits the harness that was evolved around its native planning style. To effectively introduce a teaching signal, we instead develop an on-policy expert-correction pipeline, automated end-to-end by a meta-level MLE agent: it localizes the failing turn in each of the weaker model's own rollouts and has the expert rewrite only that turn, preserving the model's planning style. This approach learns from the expert without breaking harness fit, thereby combining the benefits of both harness evolution and model adaptation. We identify and resolve a source of contention between harness evolution and model-weight adaptation, yielding a recipe can be incorporated into a co-evolution loop. Our results shed light on how to jointly and economically co-evolve harnesses and model weights to achieve strong performance on domain-specific enterprise tasks.

*Corresponding author: zhou.yu@salesforce.com ¹qwen3-coder-30b-a3b-instruct (30B total / 3B active) and gemma-4-26b-a4b-it (26B/4B active);

Preprint.

1 Introduction

The capability of an agent is determined jointly by the underlying LLM and by the harness that surrounds it—the system prompt, tool set, execution hooks, and context-management scaffolding that determine what the model observes and its action space. Recent work has shown that the harness is a powerful lever, and treating it as an editable program and searching over it automatically can lift a small open-weight model to near-frontier accuracy on coding and enterprise tasks [Yang et al., 2026, Agrawal et al., 2025, Lee et al., 2026, Chen et al., 2026b]. This is especially valuable for enterprise agentic tasks involving tool calling against internal APIs, code refactoring, and long-horizon data auditing, where inference cost also matters and a task-specific harness can provide the scaffolding needed for a smaller model to perform reliably at substantially lower cost.

Harness evolution, however, is only one of two levers for adapting an agent to a domain; the other is the model weights. In this study, our interest is in the co-evolution of the harness and model in the domain-specific regime, rather than in broader post-training aimed at raising a model's general agentic ability. Therefore, we mainly experiment with parameter-efficient fine-tuning, such as LoRA-SFT [Hu et al., 2022] which is widely used to adapt a small or mid size model to a narrow task in a few GPU-hours. The central question we ask is: for task-specific domain adaptation under a reasonable budget, how should harness evolution and lightweight model fine-tuning be combined, and can they be co-evolved to achieve synergistic gains rather than interfere with one another?

Expert trajectories are effective supervision for agentic model adaptation [Wang et al., 2026], suggesting a natural next step after harness evolution. Prior work has shown that evolved harnesses transfer upward across model backbones [Xu et al., 2026], and we confirm that a stronger expert placed in a harness evolved for a weaker model adapts to it readily and often uses it more effectively than the weaker model does. A natural training signal for closing this model capability gap is therefore to imitate the stronger expert, and this suggests a simple recipe: evolve the harness first, then fine-tune the weaker model under the expert model's guidance. Surprisingly, we find that fine-tuning on expert trajectories collected under the evolved harness consistently degrades task success, even though the same recipe yields substantial gains under the unevolved baseline harness, indicating that the failure arises from the interaction between imitation and harness evolution rather than from imitation itself. The regression is not a loss of harness usage or of knowledge; what degrades is the fit between model and harness. The fine-tuned model copies the expert's planning strategy without the competence to execute it, and no longer matches a harness that was evolved around its native planning strategy. Motivated by this diagnosis, we introduce the teaching signal on-policy instead: a meta-level MLE agent localizes the failing turn in each of the weaker model's own rollouts and has the expert rewrite only that turn, leaving the model's planning distribution intact.

Our contributions are as follows:

(i) Upward harness transfer reveals model-side headroom and enables expert supervision. Across seven enterprise agent tasks, a stronger expert readily operates the harness evolved for the weaker model and uses its task-specific adaptations effectively. Under this shared harness, the expert outperforms the weaker model on every task and matches or exceeds its own default-harness performance, demonstrating that the evolved harness remains useful across model backbones while exposing capability that the weaker model may not yet have realized.

(ii) Full-trajectory expert imitation breaks model–harness fit. After harness evolution, fine-tuning the weaker model on trajectories from the expert model degrades task success on all seven benchmarks by 4 to 30 points, and the effect persists with a second model family, while the same procedure yields gains under the unevolved harness, isolating the failure to the interaction between imitation and harness evolution. The cause is not lost knowledge or scaffold usage (both increase after SFT), but planning-strategy drift: the model adopts the expert's strategy and no longer matches a harness evolved around its own.

(iii) On-policy expert correction resolves this conflict and enables iterative co-evolution. We develop an on-policy expert correction loop to mitigate the planning regression caused by direct imitation. A meta-level MLE agent localizes the failing turn in the model's own rollouts and has the expert model demonstrate only that turn. We show that this approach can achieve further model-side gains on top of the gain from the evolved-harness, and can be incorporated into a harness-model co-evolution loop (Figure 1).

Figure

Figure 1: Harness-model co-evolution. Each round evolves a harness Ht∗H_t^* around the current weaker model MtM_t and then updates the model under that harness. Full-trajectory expert imitation can disrupt the resulting model-harness fit, whereas on-policy expert correction uses the weaker model's visited states together with localized corrections from the stronger expert, producing an updated model Mt+1M_{t+1} while preserving the fit. The updated model can then re-enter harness evolution in the next round.

More broadly, our results indicate that harness and model adaptation cease to be independent once a harness has been optimized for a particular model: the resulting scaffold becomes coupled to the model's planning and execution behavior, so subsequent weight updates should preserve rather than inadvertently disrupt that fit. For practitioners building cost-effective enterprise agents, this suggests a concrete design principle: after harness evolution, provide on-policy supervision at states visited by the student model instead of relying on wholesale imitation of a stronger model's trajectories. This allows model updates to build on harness improvements and supports iterative co-evolution.

References (14)