JoMoHa: Joint Model--Harness Optimization with Reinforcement Learning

Xudong Wu, Guangchen Lan, Mingqi Yuan, Jiayu ChenarXiv 2026 · arXiv

TL;DR

JoMoHa (Joint Model–Harness) is the first framework to jointly train a language agent's model weights and its execution environment (the "harness") using reinforcement learning. By co-evolving these two components, JoMoHa avoids the performance plateaus of one-sided optimization and achieves state-of-the-art success rates on major agentic benchmarks like ALFWorld (97.0%).

What Problem Does This Paper Address?

Building a capable AI agent isn't just about having a smart model; it’s about the "harness" that model lives in—the code that handles state tracking, tool calls, and error recovery. Traditionally, researchers optimize these separately: they either fine-tune the model weights while keeping the harness fixed, or they search for a better harness while keeping the model frozen.

The authors identify a "compatibility trap": if you naively alternate between training the model and the harness, they often drift apart. A harness designed for an older version of a model might provide outdated guidance that confuses a newer, smarter version. This mismatch can actually lead to performance degradation over time, as the components fail to coordinate.

Methods

JoMoHa introduces a two-role system trained via Reinforcement Learning (RL):

  1. The Engineer: A policy that generates the executable harness code.
  2. The Solver: A policy that performs the actual task within that generated harness.

Unlike previous methods that use fixed external models to "search" for harnesses, JoMoHa makes harness generation a trainable capability. Both the Engineer and the Solver learn from the same task outcome (reward). If a task succeeds, both are rewarded; if it fails, both are penalized.

To make this joint training stable, the authors introduced several coordination mechanisms:

  • Collaboration-aware Value Estimation: The "critics" (the parts of the RL system that predict success) are given context about who their partner is and what the task involves.
  • ValueNorm: Since the Engineer writes code once and the Solver acts over many turns, their reward scales differ. ValueNorm standardizes these to keep training balanced.
  • Peer Weighting: This adjusts how much a model learns from a specific trajectory based on how representative that trajectory is of the current partner's behavior.
  • Asymmetric Schedules: The Solver is given more training rounds to adapt to the ever-changing harnesses produced by the Engineer.
Figure 3. Joint reinforcement learning of the Engineer and Solver. The Engineer writes a runtime program under which the Solver interacts with the task. The resulting shared reward R trains both policies, each on its own generated tokens.

Datasets

The framework was evaluated on three diverse agentic benchmarks:

  • ALFWorld: Household tasks requiring reasoning and physical interaction in a simulated environment.
  • WebShop: Goal-directed web navigation and shopping.
  • DBBench: Complex database interactions and SQL generation.

Key Insights and Ideas

  • The "Aha!" Moment on Compatibility: The researchers found that an old harness can be actively harmful. In one ALFWorld case, a smarter model succeeded in 14 turns without a harness, but hit a 50-turn limit when forced to use an outdated harness that failed to track its state correctly.
  • Recursive Self-Improvement (RSI): Because the Engineer learns to write better code based on the Solver's performance, the system effectively builds its own "operating system" to become more efficient over time.
  • Joint > One-Sided: Training both components together significantly outperforms training either one in isolation. As shown in Figure 1, the joint approach reaches a much higher performance ceiling than "Weight-only" or "Harness-only" baselines.
Figure 1. Learning the runtime writer alongside the Solver on ALFWorld. The joint system reaches 97.0%, versus 90.5% for Frozen Engineer, 89.5% for Weight-only, and 80.5% for Harness- only. Weight-only does not use harness. Frozen Engineer keeps the initial code-writing model fixed but generates harnesses while training the Solver.

Key Results

JoMoHa set new state-of-the-art records across all tested environments:

  • ALFWorld: Achieved a 97.0% success rate, a massive jump from the 80-90% range seen in previous methods.
  • WebShop: Reached 45.8% success.
  • DBBench: Reached 68.0% success.
  • Average Performance: Across all benchmarks, JoMoHa averaged 70.3%, outperforming the previous best-in-class method (WHALE) by 7.2 percentage points.

The gains were particularly pronounced in tasks requiring complex state tracking (like "Clean," "Heat," or "Cool" tasks in ALFWorld), where the co-evolved harness was much better at distinguishing completed sub-goals from remaining work.

Limitations and Future Work

While JoMoHa is highly effective, the authors noted a few areas for growth:

  • Multi-Object Complexity: The "Pick2" category (collecting and placing two objects) remains the weakest area in ALFWorld (91.8%), suggesting that even more sophisticated coordination is needed for long-horizon, multi-step tasks.
  • Computational Cost: Jointly training two policies is more resource-intensive than training one, though the authors argue the performance gains justify the cost.
  • Generalization: Future work could explore how well a "trained Engineer" generalizes to entirely new types of tasks it hasn't seen during training.

Summary updated

Abstract

The performance of language agents depends jointly on model weights and the harness. Optimizing either alone can be constrained by the other component, limiting overall performance gains. Our analysis of naive alternating training reveals progressive incompatibility between the model and harness, which increasingly interferes with task execution and may also undermine model training, leading to performance degradation. To coordinate the evolution of models and harnesses, we introduce JoMoHa, to our knowledge the first framework to jointly train an executable harness generation policy and a task execution policy through reinforcement learning. JoMoHa outperforms the evaluated weight-only and harness-only baselines and achieves the highest success rates among the evaluated methods on ALFWorld, WebShop, and DBBench, averaging 70.3% and reaching 97.0% on ALFWorld. By learning both task execution and runtime improvement from its own generated trajectories, JoMoHa performs recursive self-improvement (RSI).
BibTeX
@misc{wu2026jomoha,
  author = {Xudong Wu and Guangchen Lan and Mingqi Yuan and Jiayu Chen},
  title = {{JoMoHa: Joint Model--Harness Optimization with Reinforcement Learning}},
  year = {2026},
  eprint = {2611.11499},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.11499},
}
Figure