Train the agent. Train the runtime writer. Improve them together.
JoMoHa jointly optimizes a language agent's model weights and executable harness through reinforcement learning. An Engineer learns to write the runtime, a Solver learns to act under it, and both improve from the outcome of the same task execution.
Paper | Checkpoints | Getting started | Benchmark guide | Citation
- Joint model-harness learning. Train both the harness-generation policy and the task-execution policy from shared execution feedback.
- Learning to improve. The Engineer itself learns to construct better runtimes, enabling recursive self-improvement alongside the Solver.
- Coordinated reinforcement learning. Collaboration-aware critics, role-specific return normalization, partner-trajectory weighting, and asymmetric updates keep the two learners working together.
- Strong results across three environments. JoMoHa achieves 70.3% average success across ALFWorld, WebShop, and DBBench, including 97.0% on ALFWorld.
- Research resources in one place. Explore the training code, pinned benchmark runtimes, Engineer/Solver checkpoints, matching harness, and verifiable per-task experiment records.
Success rates reported in the paper:
Full benchmark comparison from the paper. Best values are bold on red; second-best distinct values are underlined on blue. Frontier models serve as fixed harness editors; Reflection uses success@2.
JoMoHa improves average success over Agent SFT + Harness-R1 by 6.1 percentage points and WHALE by 7.2 percentage points. The average is the equally weighted mean of the three benchmark success rates.
Each task attempt produces two complementary trajectories: the Engineer's generated program and the Solver's multi-turn execution. The shared task reward trains each policy on its own generated tokens, with separate actors and critics.
JoMoHa coordinates these updates through four mechanisms:
- Context: collaboration-aware value estimation.
- ValueNorm: role-specific return normalization.
- Peer: bounded partner-trajectory weighting.
- Schedule: asymmetric updates that give the Solver additional adaptation.
The repository retains the name coevolve; implementation files use MA-SAO for joint training and SAO for the single-rollout actor-critic backbone.
git clone https://github.com/xudongwu-0/coevolve.git
cd coevolve
git submodule update --init --recursiveThe pinned submodules provide WHALE, Harness-R1 benchmark runtimes, and the SAO backbone.
| Benchmark | Task | Entry point |
|---|---|---|
| ALFWorld | Household task completion | Joint training and evaluation |
| WebShop | Goal-directed shopping | Runtime, dataset builder, and evaluation |
| DBBench | Database interaction | Runtime, dataset builder, and evaluation |
See the benchmark guide for environment setup, source locations, and evaluation commands. WebShop and DBBench runtime components are integrated through the pinned official Harness-R1 submodule.
For the joint-training environment and patched AReaL source, follow the training-source setup. The recorded 9B stack uses Python 3.12, PyTorch 2.10.0+cu129, vLLM 0.19.1, and Transformers 5.7.0.
With Python 3.10+, run:
python3 -B scripts/reproduce_ma_progress.py --best97This standard-library-only command checks 4,225 evidence files, verifies the matching harness, and recomputes the best97 ALFWorld result from archived per-task outcomes. It runs locally without a GPU, model download, or API call; submodule initialization is optional for this step.
The best97 release pairs the ALFWorld Solver and Engineer with the selected executable harness:
| Artifact | Link |
|---|---|
| Solver actor, configuration, and tokenizer | best97/solver |
| Engineer actor, configuration, and tokenizer | best97/engineer |
| Matching executable harness | proposal07 |
Using the Hugging Face CLI, authenticate with hf auth login using an account with access to the dataset, then download the pinned checkpoint pair:
hf download wxd02/coevolve \
--repo-type dataset \
--revision d0e84414e8ef9e2b6a84585e1365189faf501051 \
--include "best97/solver/*" "best97/engineer/*" \
--local-dir modelsThe model directories are models/best97/solver/ and models/best97/engineer/. Checkpoint identities and file hashes are recorded in the artifact manifest.
| Location | Contents |
|---|---|
whale_local/sao_bridge/ |
Joint learning, ALFWorld execution, evaluation, and checkpoint recovery |
joint_workflow.py |
Paired Engineer/Solver rollouts |
joint_critic.py, joint_context.py |
Collaboration-aware value estimation |
joint_updates.py, joint_schedule.py |
Policy updates and role scheduling |
third_party/harness-r1-upstream/ |
Benchmark environments, harness hooks, dataset builders, and evaluation tools |
scripts/, tests/ |
Preparation utilities, offline verification, and contract tests |
reproducibility/ |
Experiment evidence, source snapshots, and checkpoint metadata |
For the evidence-packaging and offline-verification tests, use an environment with pytest installed:
python3 -m pytest -q tests/test_ma_handoff.py tests/test_reproduce_ma_progress.py
python3 -B scripts/reproduce_ma_progress.py --best97Contributions and issue reports are welcome. Include the repository revision, environment, command, and relevant error output; keep credentials and private infrastructure details out of reports. Preserve frozen evidence and add focused tests for behavior changes.
@misc{wu2026jomohajointmodelharnessoptimization,
title = {JoMoHa: Joint Model--Harness Optimization with Reinforcement Learning},
author = {Xudong Wu and Guangchen Lan and Mingqi Yuan and Jiayu Chen},
year = {2026},
eprint = {2611.11499},
archivePrefix = {arXiv},
primaryClass = {cs.LG},
url = {https://arxiv.org/abs/2611.11499}
}JoMoHa builds on WHALE, Harness-R1, the unofficial SAO implementation, and AReaL.
See third-party notices and component licenses for attribution and applicable terms. Model weights and benchmark assets follow their providers' terms.

