CoHARL: Co-Evolving Agent Policies and Executable Harnesses with Reinforcement Learning
Organizations: University of North Carolina at Chapel Hill · RIKEN · Cisco
Abstract
Large language model (LLM) agents interact with their environments through executable harnesses that govern tool use and feedback. Optimizing a harness for a fixed policy overlooks how its behavior changes during learning, while training a policy under a fixed harness leaves the interface that generates its training experience unchanged. This motivates adapting the harness throughout policy training. We introduce CoHARL, a population-based reinforcement learning framework that co-evolves a shared policy and a population of executable harnesses. The policy learns from rollouts across the population, and a proposer uses its execution traces to revise harness code during training. CoHARL achieves a 27.6% mean resolved rate on SWE-rebench, improving over harness-only search by 6.4 percentage points. Experiments on SWE-bench Verified and Terminal-Bench 2.0 show gains in software engineering and terminal-based tasks. Under matched training budgets, CoHARL also outperforms searching for a harness once before RL and alternating policy updates with revisions to a single active harness.
Figures & tables
| Method | Weights | Harness | Resolved |
|---|---|---|---|
| Base | Qwen3.5-35B-A3B | SWE-mini | 17.3% |
| Meta-Harness | Qwen3.5-35B-A3B | Meta-Harness ∗ | 21.2% |
| Plain GRPO | RL-trained | SWE-mini | 20.3% |
| CoHARL (ours) | RL-trained | Co-evolved | 27.6% |
| Methods | Weights | Harness | Resolved |
| Closed-source models | |||
| GPT-4o † | - | - | 33.2% |
| Claude 3.5 Sonnet † | - | - | 49.0% |
| Qwen3.5-35B-A3B-based methods | |||
| Base | Fixed | SWE-mini | 44.2% |
| Meta-Harness | Fixed | Meta-Harness ∗ | 52.0% |
| Method | Harness | Success |
|---|---|---|
| Base | Terminus-2 | 26.6% |
| Meta-Harness | Meta-Harness | 33.7% |
| Flat GRPO (Shepherd) † | Terminus-2 | 34.2% |
| CoHARL (ours) | Co-evolved | 36.8% |
| Configuration | Resolved rate | Resolved |
|---|---|---|
| CoHARL (full) | 25.5% | 28/110 |
| A1: Fixed-harness RL | 20.0% | 22/110 |
| A2: No archive context | 20.0% | 22/110 |
| A3: No execution traces | 20.9% | 23/110 |
| A4: Search-then-RL | 22.7% | 25/110 |
| A5: Single-harness alternating RL | 19.1% | 21/110 |
Appendix figures & tables5 assets
Supplementary material from the paper’s appendix.
Appendix
| Group | Hyperparameter | Value |
| Model | Policy | Qwen3.5-35B-A3B (MoE, 3B active) |
| Initialization | Initial model checkpoint | |
| Adaptation | LoRA, rank 32 | |
| RL | Algorithm | GRPO, group-relative advantage |
| Importance-ratio clip (DAPO) | ||
| PPO epochs | 2 |
| Setting | SWE | TB-2 | Historical A1–A3 |
|---|---|---|---|
| Training entries | 400 | 843 | 400 |
| Task groups rollouts/group | |||
| Training temperature | 0.7 | 0.9 | 0.7 |
| Episode timeout (s) | 600 | 1,200 | 600 |
| Policy-monitoring tasks | 32 | 20 | 32 |
| Configuration | Statistic | Group retention |
|---|---|---|
| CoHARL (full) | Mean over recorded filtering steps | 79.1% |
| A1: Fixed-harness RL | Mean over recorded filtering steps | 52.2% |
| CoHARL (full) | First included step ( groups) | 91.7% |
| A1: Fixed-harness RL | First included step ( groups) | 37.5% |
| A2: No archive context | Mean over 27 recorded filtering steps | 64.2% |
| A3: No execution traces | Mean over 24 recorded filtering steps | 74.0% |
| Framework | Adaptation target | Edit generation | Training organization |
|---|---|---|---|
| EvoTrainer ( Chen et al., 2026a ) | Training-side diagnostics and training recipes | Trainer agent diagnoses artifacts and proposes interventions | Versioned training branches with promotion, pruning, and skill reuse |
| WHALE ( Kim et al., 2026 ) | Executable harness and model weights | Meta-Harness proposer searches under frozen weights | Weight updates under one selected harness alternate with search; instantiated with online RSFT |
| HASE ( Luo et al., 2026 ) | Guidance harness; local evaluator where permitted | Task policy emits both solutions and harness edits | GRPO with rollout-local edits; reviewed candidates update one persistent harness at phase boundaries |
| HarnessForge ( Chen et al., 2026b ) | Population of harness–policy pairs | Meta-agent uses trajectory feedback and an archive | Each surviving harness receives a dedicated policy adapter |
| HarnessBandit ( Wei et al., 2026a ) | Shared policy and harness scheduling | No online harness-code evolution | One harness per update, selected from a given set using learnability and transferability signals |
| CoHARL | Population of executable agent-side harnesses and shared policy weights | Separate proposer uses current-policy traces and a historical Pareto archive | Shared-policy RL across scheduled pool members; accepted candidates enter at step boundaries |
Agent Harness Optimization
Agent harness optimization improves the prompts, tools, memory, workflows, and control code that shape how AI agents act.
See all 185 papers