All papersAI agents and tools
Train one AI with many helper setups
Paper: Harness-S: Learning from Sibling Harnesses for Generalizable Agent Training
Kangning Zhang, Wenxiang Jiao, Bowen Fang, Shuai Shao, Jiachen Zhu, Rong Shan, Shijian Wang, Hao Wang, Yuan Lu, Weiwen Liu, Weinan Zhang · arXiv preprint (cs.AI) · Posted · 14 min read · arXiv 2611.04277
- An AI agent is a model plus a harness.
- The harness is the prompts, tools, memory and rules around the model.
- Each harness edit fixes some failures and breaks other tasks.
- No single harness is best, and the best one changes as the model learns.
56.87%average success on AppWorld with the base harness. Plain training got 48.98%.
- The authors made a pool of sibling harnesses, each a repair of the base one.
- They trained Qwen3.5-4B and Qwen3.5-9B models.
- They used AppWorld, SWE-Gym and DBBench.
- They tested the models under the original harness.
- Training with rescue from siblings beats plain training in every test.
- The model keeps new habits after the helper harness is removed.
- A router that picks one sibling per task adds more gains.
- A 4B model with routing beats the 9B model trained with plain GRPO.
Rescue training lifts a 4B model on [[appworld|AppWorld]]From Table 1Hover, tap or focus a bar to read its exact value.
| Method | Avg@3 (%) |
|---|
| Base model | 31.93 |
| [[grpo|GRPO]] | 48.98 |
| GRPO with H0 rescue | 51.91 |
| WHALE | 52.93 |
| Harness-S (base harness) | 56.87 |
| Harness-S (routed) | 61.45 |
- The tests use small Qwen models and three benchmarks.
- Under outside harnesses, the model still scores below the base harness.
- Pool building uses a large editing model and API tokens.
- The authors say behavior counts are not proof of correctness.
Jump to
Every detail from the paper
Cards follow the paper's own order. Dotted words link to Words to know. Numbers match the paper.
The idea
- Harness edits show three traits: Locality, Complementarity and Nonstationarity.
- Variants repair different failures. Their value changes as the Policy learns.
- The authors do not seek one best harness.
- They build Harness-S to rescue failures of a base system with sibling harnesses.
- They move the gains into one policy that works under the original harness.
The three parts
- Directional Harness Evolution builds sibling harnesses along different repair directions.
- They form a Sibling Harness Pool. It stays fixed during policy training.
- Complementary Harness Rescue Training uses the pool only when all first tries fail.
- The same policy makes fresh rollouts under chosen helper harnesses.
- These rollouts replace the failed group for reinforcement learning.
- An Adaptive Harness Router picks the Top-k variants.
- It uses Harness Behavior Profiles and votes from several LLMs.
- Policy-aware profile re-anchoring refreshes this evidence as the policy learns.
Results and links
- Tests: AppWorld, SWE-Gym and DBBench.
- The trained policy beats policy-only training when it returns to the base harness.
- Behavior studies and held-out cases support that the habits moved into the policy.
- Using the router for Rank-1 inference adds gains at the same executor rollout count.
- Keywords: language model agents, agent harnesses, reinforcement learning, routing.
- The code is on GitHub under DeepExperience.
Background
- An agent depends on its model policy and its harness.
- The harness is the prompts, tool interfaces, context and memory, and execution rules.
- With model weights fixed, the harness still shapes what the model sees.
- ReAct showed the value of mixing reasoning and action.
- SWE-agent showed that the agent-computer interface changes results.
- Newer methods tune prompts, workflows and harness code from feedback.
The setting
- The question: can specialized help improve the policy itself?
- Then the gains would stay under the original harness.
- The authors study harness evolution from one common base, called H0.
- The variants are sibling harnesses. They share the same execution base.
- Their example base is DeepSeek Harness.
- Related work: Meta-Harness, HarnessX and Life-Harness.
Three traits (Figure 1)
- Locality. An edit repairs some failures but breaks tasks that worked before.
- So each variant gains its own strengths.
- Complementarity. Siblings fix each other's errors.
- Their oracle union solves more tasks than one variant or repeated sampling with H0.
- Nonstationarity. A harness's value changes as the policy learns.
- Its edge over H0 can turn into a loss. Rankings can flip between checkpoints.
Figure 1: the numbers behind the three traits (Qwen3.5-4B, AppWorld)
| Variant | Regressed | Repaired | Net solved |
|---|
| H1 | 11 | 26 | +15 |
| H2 | 16 | 24 | +8 |
| H3 | 9 | 19 | +10 |
| H4 | 17 | 20 | +3 |
Figure 1a: tasks repaired and regressed against H0
Net solved is repaired minus regressed.
| Variant at step | Both correct / Hi only | H0 only / Both wrong | Net vs H0 |
|---|
| H1 at 0 | 39 / 26 | 11 / 74 | +15 |
| H1 at 10 | 48 / 18 | 19 / 65 | -1 |
| H1 at 20 | 57 / 18 | 22 / 53 | -4 |
| H2 at 0 | 34 / 22 | 16 / 78 | +6 |
| H2 at 10 | 44 / 27 | 23 / 56 | +4 |
| H2 at 20 | 58 / 22 | 21 / 49 | +1 |
Figure 1c: paired outcomes as the policy trains
H1 goes from +15 to -4 as the policy learns. This is the nonstationary trait.
- Figure 1b compares the Oracle union union of variants with H0 pass@K.
- Both use the same rollout count. The union is higher.
- The paper shows this only as a chart.
Two limits of harness tuning
- Limit 1. Merging local repairs into one universal harness is very hard.
- Repairs can need incompatible rules. Even compatible edits can clash.
- One merged design can lose the strengths of its parts.
- Limit 2. Updating harness and policy together costs a lot and limits reuse.
- Earlier repairs lose value as the policy changes.
- Gains of the evolved pair may vanish when the policy returns to H0.
Harness-S, step 1
- Directional Harness Evolution. Find failure causes in runs.
- Each child harness targets a few related causes.
- Joint validation coverage picks the next parents. All valid variants are kept.
- The large Sibling Harness Pool stays fixed during training.
Harness-S, step 2
- Rescue training. When all first rollouts for a task fail, the router picks helpers.
- It picks the Top-k helper harnesses.
- The same policy runs fresh rollouts under them from the start state.
- These rescue rollouts replace the failed group for RL.
- The goal: keep the learned behavior when the policy returns to H0.
Harness-S, step 3
- The router matches tasks to siblings using behavior evidence and votes from several LLMs.
- Behavior Profiles say when a variant helps or hurts the current policy, against H0.
- Re-anchoring refreshes profiles from current-policy validation runs.
The four contributions
- 1. They name Locality, Complementarity and Nonstationarity, and introduce Harness-S.
- 2. Directional Harness Evolution keeps complementary variants in a reusable pool.
- 3. Rescue training restores learning signals when all H0 tries fail.
- The router picks the siblings.
- 4. Harness-S beats policy-only training under H0 on all three benchmarks at both model sizes.
- Behavior studies, held-out cases and less router dependence support transfer.
- Rank-1 routing adds gains. Gains also hold under unseen harnesses with no more updates.
Harness-S in three movesFrom Figure 2- OfflineBuild a sibling harness pool
- TrainingRetry failed tasks with siblings
- Update one shared policy
- Policy works under base harness
Figure 2 shows the same three moves. Rank-1 routing then adds more gains.
How rescue training works for one taskFrom Section 3.3 and Algorithm 1- Run K tries under H0
- Any try succeeds? Keep the group
- RouterAll failed: router picks siblings
- One fresh try per sibling
- Rescue group replaces failed one
- TrainGRPO updates the policy
Fresh tries start from the task's initial state.
3.1 Policy, harness and task outcome
- For task x, the policy makes a trajectory under harness H.
- A verifier gives the outcome R as 0 or 1.
- The utility of a harness is the expected success rate (Equation 1).
- The pool holds H0 and variants H1 to HM from the same base.
- All share the execution base, the environment interfaces, the verifier and the policy weights.
- Their relative value changes across tasks and checkpoints. So selection must be per task.
3.2 Directional Harness Evolution
- Start with the parent set P1 holding only H0.
- Run each parent on fresh training tasks. Derive repair directions.
- A direction groups related root causes backed by many failed tasks.
- An editor changes the parent to fix the causes (Equation 2).
Picking parents
- Parent selection maximizes joint validation coverage (Equation 3).
- Pick at most B parents from the valid children of this round.
- Valid means it runs and follows the protocol.
- A task counts once. This favors parents that cover each other's failures.
- The pool keeps all valid children, also those not picked as parents (Equation 4).
- After T generations the pool is fixed for policy training.
3.3 Complementary Harness Rescue Training
- For each task, the policy makes K rollouts under H0.
- If all fail, the router picks K distinct auxiliary harnesses.
- The same policy makes one fresh try under each.
- The group kept for training is the H0 group if any try won (Equation 5).
- Otherwise it is the rescue group.
- Rescue groups with wins and losses give reward contrasts the first tries lacked.
The learning step
- GRPO gives each try an advantage (Equation 6).
- The advantage is its reward minus the group mean, over the group deviation.
- A small epsilon keeps the division stable.
- The shared optimizer maximizes a clipped token objective (Equation 7).
- The ratio compares current weights with pre-update weights.
- Only policy tokens enter the objective.
- Optimizer details are in Appendix B.
3.4 Adaptive Harness Router
- A Harness Behavior Profile says when a sibling helps or hurts the current policy.
- It has a prefer list and an avoid list (Equation 8).
- Each entry has a When field. It names the task condition.
- It also has a Behavior field. It says what the variant does versus H0.
- An LLM groups behavior differences from paired validation runs into entries.
- Appendix D has examples.
Voting
- Each of V voters ranks harnesses using the task, profiles, validation rates and similar tasks.
- Rank weights add up across voters (Equation 9).
- The router picks the Top-K harnesses, not counting H0 (Equation 10).
- The weight drops with rank and is zero for unlisted candidates.
Re-anchoring
- Re-anchoring refreshes evidence at checkpoints.
- Freeze the policy. Collect validation runs under each harness.
- Recompute the profiles (Equation 11).
- Paired runs share tasks, start states and limits.
- Test outcomes are never used.
Algorithm 1 in plain steps
- 1. Build profiles and validation evidence.
- 2. For each training batch, re-anchor profiles if a calibration is due.
- 3. For each task, sample K rollouts under H0.
- 4. If all fail, select siblings with the router and make one rollout each.
- 5. Keep the group by Equation 5. Update the policy with GRPO.
- 6. After training, re-anchor profiles with the final policy.
3.5 Knowledge transfer to the policy
- The trained policy takes in behaviors from siblings through rescue updates.
- These behaviors can stay when it runs under H0.
- Sections 4.5 and 4.6 give the evidence.
- Rank-1 routing adds more gains to the same trained policy.
- After the last re-anchoring, pick from the full pool, including H0 (Equation 12).
- Selection comes before execution at a matched rollout count. Appendix C details voting.
- The authors ask six questions.
- RQ1. Does Harness-S improve task success, also under H0?
- RQ2. Does rescue give better learning signals than resampling or fixed mixes?
- RQ3. How do rescue allocation and re-anchoring affect recovery and final scores?
- RQ4. Which behaviors change under H0? Do they transfer to untrained cases?
- RQ5 and RQ6. Do router ranks predict results? Do gains transfer to unseen harnesses?
Setup
- Models: Qwen3.5-4B and Qwen3.5-9B.
- Benchmarks: AppWorld (app APIs), DBBench (databases), SWE-Gym (software work).
- Harness editing and policy training use training tasks.
- Validation tasks guide parent choice and profile anchoring.
- Pass@3 is the share of tasks solved at least once.
- Avg@3 averages success over three tries.
- Scores are means over three random runs. Hardware: eight NVIDIA H800 GPUs.
Compared methods
- Controls: GRPO, GRPO with H0 rescue, and fixed mixes with Claude Code or siblings.
- All controls are tested under H0.
- WHALE uses rejection-sampling fine-tuning. HarnessForge adapts branch policies.
- Meta-Harness, WHALE and HarnessForge use one chosen Hbest for all test tasks.
- Hrank1 is the router's top pick for each task.
- Harness-S (HE only) freezes the start policy.
- Full Harness-S tests the same checkpoint under H0 and under Hrank1.
| Model | AppWorld | SWE-Gym | DBBench |
|---|
| GPT-6-Sol | 82.82 / 76.34 | 53.13 / 47.50 | 71.33 / 68.89 |
| DeepSeek-v4-Flash | 81.68 / 77.61 | 51.88 / 46.25 | 75.00 / 70.44 |
| GLM-5.3-Flash | 80.15 / 65.65 | 46.88 / 43.13 | 76.67 / 72.11 |
Table 1: frontier models under H0 ([[passk|Pass@3]] / Avg@3)
References only. Higher is better.
| Method (test harness) | AppWorld | SWE-Gym | DBBench |
|---|
| Base model (H0) | 42.62 / 31.93 | 19.38 / 17.50 | 59.00 / 56.89 |
| GRPO (H0) | 60.31 / 48.98 | 24.38 / 22.50 | 66.67 / 64.00 |
| GRPO, H0 rescue (H0) | 61.83 / 51.91 | 25.63 / 23.33 | 67.33 / 64.67 |
| Mixed: DSH H0 + Claude Code (H0) | 57.63 / 46.69 | 25.63 / 23.33 | 65.67 / 62.78 |
| Mixed: DSH H0 + Top-4 (H0) | 58.78 / 47.84 | 26.88 / 24.38 | 64.67 / 61.89 |
| Meta-Harness (Hbest) | 48.09 / 36.26 | 21.88 / 20.00 | 62.67 / 60.11 |
| Harness-S, HE only (Hrank1) | 56.87 / 45.42 | 25.00 / 23.75 | 69.33 / 66.78 |
| WHALE (Hbest) | 63.36 / 52.93 | 29.38 / 26.88 | 70.67 / 68.11 |
| HarnessForge (Hbest) | 59.54 / 49.75 | 27.50 / 25.00 | 69.00 / 66.22 |
| Harness-S (H0) | 67.56 / 56.87 | 38.75 / 28.75 | 73.33 / 71.00 |
| Harness-S (Hrank1) | 68.32 / 61.45 | 42.50 / 32.29 | 75.00 / 72.67 |
Table 1: Qwen3.5-4B (Pass@3 / Avg@3)
Harness-S rows are means across three runs. The paper also gives standard deviations.
| Method (test harness) | AppWorld | SWE-Gym | DBBench |
|---|
| Base model (H0) | 50.00 / 39.69 | 23.13 / 20.63 | 63.00 / 60.22 |
| GRPO (H0) | 64.89 / 53.31 | 28.13 / 25.63 | 69.67 / 67.00 |
| GRPO, H0 rescue (H0) | 65.65 / 54.83 | 29.38 / 26.88 | 70.67 / 67.78 |
| Mixed: DSH H0 + Claude Code (H0) | 62.21 / 50.89 | 29.38 / 26.88 | 68.67 / 65.89 |
| Mixed: DSH H0 + Top-4 (H0) | 63.36 / 52.16 | 30.63 / 27.71 | 67.67 / 65.00 |
| Meta-Harness (Hbest) | 53.44 / 42.88 | 25.63 / 23.13 | 65.67 / 62.78 |
| Harness-S, HE only (Hrank1) | 61.45 / 50.13 | 29.38 / 27.08 | 72.67 / 69.78 |
| WHALE (Hbest) | 68.70 / 58.02 | 33.75 / 30.63 | 74.00 / 71.11 |
| HarnessForge (Hbest) | 64.89 / 54.83 | 31.25 / 28.54 | 72.00 / 69.22 |
| Harness-S (H0) | 72.52 / 62.34 | 40.00 / 32.50 | 76.33 / 73.44 |
| Harness-S (Hrank1) | 75.19 / 67.05 | 43.75 / 36.25 | 78.00 / 75.67 |
Table 1: Qwen3.5-9B (Pass@3 / Avg@3)
Harness-S rows are means across three runs. The paper also gives standard deviations.
Harness-S standard deviations across runs (Table 1)
| Row | AppWorld | SWE-Gym | DBBench |
|---|
| 4B, H0 | 1.87 / 1.47 | 2.22 / 1.73 | 2.36 / 1.84 |
| 4B, Hrank1 | 1.74 / 1.35 | 2.04 / 1.64 | 2.23 / 1.75 |
| 9B, H0 | 1.65 / 1.28 | 2.04 / 1.51 | 2.13 / 1.67 |
| 9B, Hrank1 | 1.56 / 1.20 | 1.84 / 1.45 | 1.96 / 1.55 |
Pass@3 / Avg@3, plus or minus
- Harness-S beats policy-only training, frozen-policy harness tuning and joint adaptation.
- This holds under both H0 and Hrank1.
- The routed 4B policy beats the 9B GRPO with H0 rescue on every reported metric.
- The routed 9B policy also beats the frontier references on DBBench.
Why it wins
- The gains mix retained policy gains and better execution support.
- Under H0, Harness-S beats plain GRPO and H0 rescue in all benchmark and size settings.
- So the benefit goes beyond extra sampling.
- With the policy frozen, Harness-S (HE only) beats Meta-Harness.
- This supports the sibling pool and per-task selection.
Routing and cost
- Routing the trained policy improves both metrics in every setting.
- It does not raise the executor rollout count.
- On AppWorld 4B, Harness-S beats H0 rescue with fewer rollouts and less training GPU time.
- Full-pipeline GPU hours and external-model tokens fall in the range of the joint baselines.
Reward contrast
- Selective rescue gives more reward contrast than extra sampling or fixed mixes.
- The Effective Group (EG) rate is the share of kept groups.
- Those groups hold both wins and losses.
- Harness-S leads in every stage.
- All-failure groups give no contrast. Recovering some gives GRPO something to reinforce.
- Both fixed mixes stay close to plain GRPO.
- So harness diversity helps most when aimed at tasks the base group fails.
Token share
- Effective groups also hold a larger share of kept training tokens.
- The share counts policy tokens in effective groups, which allows for length differences.
- Harness-S has the highest share all through training.
- It reaches 80.88% overall against 72.68% for GRPO with H0 rescue.
Validation success
- From the same start policy, Harness-S leads at every later validation checkpoint.
- Both fixed mixes end below GRPO, despite early gains from the Claude Code mix.
- The results show that selective rescue gives lasting signals.
- The benefits stay after the helper harness is removed.
Harness-S has the most groups with wins and lossesFrom Figure 3 and Section 4.3Hover, tap or focus a bar to read its exact value.
| Method | Effective groups (%) | H0 validation success (%) |
|---|
| GRPO | 64.69 | 48.00 |
| GRPO with H0 rescue | 70.94 | 54.00 |
| Harness-S | 79.38 | 63.33 |
The variants
- Setup: AppWorld, Qwen3.5-4B, fixed rescue rollout budget.
- Random Harness picks pool members at random.
- Rule Router ranks by success on similar validation tasks, with no profiles.
- LLM Router (4 x 2) gives two rollouts to each of four harnesses.
- Top-8 gives one rollout to each of eight harnesses.
- Top-8 Fixed keeps profiles unchanged. Top-8 Adaptive (Harness-S) re-anchors them.
- Rescue success is the share of rescue-triggering tasks with at least one win.
| Stage | Random Harness | Rule Router | Top-4 x2 |
|---|
| Steps 1-10 | 25.00 | 40.00 | 43.48 |
| Steps 11-20 | 18.18 | 26.67 | 43.75 |
| Steps 21-30 | 20.00 | 27.78 | 38.89 |
| Steps 31-40 | 25.00 | 44.44 | 33.33 |
Table 2: rescue success by training stage (%)
GRPO has no rescue. Higher is better.
| Stage | Top-8 Fixed | Top-8 Adaptive |
|---|
| Steps 1-10 | 35.71 | 52.38 |
| Steps 11-20 | 24.24 | 66.67 |
| Steps 21-30 | 26.67 | 45.71 |
| Steps 31-40 | 38.89 | 50.00 |
Table 2: rescue success, Top-8 variants (%)
| Method | Pass@3 | Avg@3 |
|---|
| GRPO | 60.31 | 48.98 |
| Random Harness | 62.98 | 50.76 |
| Rule Router | 66.41 | 52.93 |
| Top-4 x2 | 65.65 | 55.60 |
| Top-8 Fixed | 64.50 | 52.16 |
| Top-8 Adaptive | 67.56 | 56.87 |
Table 2: final test performance (%)
Top-8 Adaptive has the best Pass@3 and Avg@3.
Findings
- Task-specific selection improves rescue success in all stages.
- Rule and LLM strategies both beat random choice.
- Top-8 Adaptive beats LLM Router (4 x 2). Wider exploration recovers more failures than repeats.
- Under the final AppWorld policy, single siblings repair 11 to 15 base failures.
- The nine analyzed siblings repair 29 in union.
- That coverage needs each sibling run once. Routing must pick before seeing results.
Profiles and trade-offs
- Adaptive profiles beat the fixed-profile Top-8 in all four stages.
- Re-anchoring improves final Avg@3 by 4.71 percentage points.
- All strategies beat GRPO.
- Rule Router has higher Pass@3 than LLM Router (4 x 2). Its Avg@3 is lower.
- So rescue success does not fully set the final ranking.
- Top-8 is best on both recovery and final test success.
AppWorld habits
- Harness-S changes how the policy gathers evidence and finishes actions under H0.
- On AppWorld it checks API schemas before first use more often than GRPO.
- It repeats execute code less.
- It paginates, batches calls and reads back after writes more.
- This suggests more use of interface facts and state checks, not just more tool use.
- The counts describe behavior, not correctness.
- More calls or checks help only when they serve the task.
Harness-S looks up schemas before API calls far more oftenFrom Table 3BaseGRPOHarness-S
Hover, tap or focus a bar to read its exact value.
| Behavior | Base (%) | GRPO (%) | Harness-S (%) |
|---|
| Schema lookup before first API use | 22.9 | 38.2 | 67.6 |
| Several API calls in one execute block | 24.8 | 20.5 | 31.5 |
| Explicit pagination loops | 13.8 | 33.5 | 38.3 |
| Repeated execute code (lower is better) | 15.4 | 30.1 | 9.8 |
| Read-back after the last write | 69.2 | 56.9 | 69.4 |
| Behavior | Base | GRPO | Harness-S |
|---|
| Agent-written assertion checks | 10.2 | 11.2 | 18.4 |
| Switch to assertions after blocked tests | 15.4 | 13.3 | 48.5 |
| Fail-edit-retest of the same target | 9.2 | 18.2 | 24.1 |
| Diff inspection after the last edit | 16.3 | 23.5 | 27.5 |
Table 3: SWE-Gym behavior frequencies under H0 (%)
An LLM labels full evaluation runs. Higher is better for all four rows.
SWE-Gym habits
- On SWE-Gym, Harness-S writes more assertion checks and revisits a failed target after an edit.
- It also inspects the final diff more.
- When tests are blocked, it switches to assertions in 48.5% of cases.
- GRPO does this in 13.3% of cases.
- These are other ways to check a patch when the usual test flow is blocked.
Table 4: two cases from rescue to held-out test
| Case | Rescue in training | GRPO on held-out | Harness-S on held-out |
|---|
| 1: Set intersection | H2 picks liked songs also in library or playlists, then sends the draft. Used at update 10. | Uses a union, sends an overinclusive list. Failure. | Applies the intersection and sends the right email. Success. |
| 2: Account recovery | H5 does a Venmo workflow: reads codes, resets the password, checks login. Used at update 3. | On Amazon, asks for a code but leaves the password. Failure. | Reads new codes, resets the Amazon password, checks access. Success. |
Table 4: two AppWorld transfer cases
All eight first H0 tries failed in training. Held-out checks use H0.
- Case 1 carries a task rule to new instances.
- Case 2 carries a multi-step recovery from Venmo to Amazon.
- Both successful rescues entered a policy update.
- The same behavior later appeared on a different instance under H0.
- This links helper-harness experience to behavior the policy keeps.
- Router rank predicts run quality before and after training.
- Qwen3.5-4B is tested under H0 and three task-specific ranks, with three rollouts each.
- Pass@3 and Avg@3 drop from Rank-1 to Rank-3 both before and after training.
- Before training, all three ranks beat H0. Specialized support helps the starting policy.
- The order holds after training, so routing stays useful as the policy improves.
| Harness | Pass@3 / Avg@3 before | H0 rate before | Pass@3 / Avg@3 after |
|---|
| H0 | 42.62 / 31.93 | not used | 67.56 / 56.87 |
| Rank-1 | 56.87 / 45.42 | 1.53 | 68.32 / 61.45 |
| Rank-2 | 53.44 / 42.11 | 6.87 | 66.03 / 55.60 |
| Rank-3 | 50.38 / 39.19 | 4.96 | 64.89 / 54.20 |
Table 5: AppWorld router ranks, Qwen3.5-4B (%)
H0 rate after training: Rank-1 22.52, Rank-2 14.89, Rank-3 13.36. H0 rate is the share of tasks placing H0 at that rank.
H0 gets chosen more
- H0 at Rank-1 rises from 1.53% to 22.52%. Rank-2 and Rank-3 rates also rise.
- The router prefers the base harness more often. This fits less need for helper support.
- The Rank-1 margin over H0 shrinks from 14.21 to 0.76 points in Pass@3.
- It shrinks from 13.49 to 4.58 points in Avg@3.
- The trained policy under H0 also beats Rank-2 and Rank-3 on both metrics.
- Rank-1 keeps an edge in Avg@3. Task-specific support still helps consistency.
- Test: Qwen3.5-4B policies on AppWorld and SWE-Gym under DSH H0, Claude Code and OpenClaw.
- No more policy updates are made.
- Harness-S has the highest Pass@3 on every benchmark and harness.
- It also beats mixed-harness GRPO under Claude Code and OpenClaw.
- So fixed mixing is not enough to match its transfer.
Size of the gains
- The gains over GRPO range from +4.96 to +14.37 percentage points (Figure 4).
- Other labels in Figure 4: +7.25, +9.16, +12.50 and +10.62.
- Harness-S still scores below DSH H0 on both outside harnesses and both benchmarks.
- So the model builds habits useful beyond its training harness.
- But the execution support still changes how reliably those habits work.
- Harness-S trains one shared policy to keep capabilities from complementary siblings under H0.
- Directional evolution keeps distinct repair strategies.
- Selective rescue recovers learning signals from base-harness failures.
- Gains persist under H0 on AppWorld, SWE-Gym and DBBench.
- Behavior studies support transfer. Rank-1 routing improves inference.
Next steps
- Future work: study lasting transfer and efficient pool reuse across policies.
- Study how independent harnesses exchange task state across interfaces.
- Run Harness Scaling tests on how more repair diversity changes gains and calibration cost.
| Benchmark | Train / Validation | Test | Total |
|---|
| AppWorld | 320 / 150 | 262 | 732 |
| DBBench | 1,600 / 200 | 300 | 2,100 |
| SWE-Gym | 240 / 100 | 160 | 500 |
Table 6: task instances per benchmark
Test tasks are kept for final evaluation only.
- Harness editing and policy training use training tasks.
- Parent choice and profile anchoring use validation tasks.
Setup
- Baseline and Harness-S use the same optimizer.
- They differ only in which trajectories are kept for each task.
- Each kept group holds G = K = 8 trajectories.
- Rewards are centered per task.
- They are scaled by the group standard deviation.
- Epsilon is 10 to the minus 6.
- The objective is PPO-style (Equations 13 to 15).
- The loss averages over valid policy tokens per task, then equally over tasks.
Details
- Harness-injected instructions and tool observations are left out of the token loss.
- Each helper trajectory keeps its own generating context for the probability ratio.
- Tasks with no valid tokens add zero.
- Rollout and training backends can give different probabilities to the same token.
- A detached correction weight w is clipped between 0 and 2 (Equation 16).
- It gets no gradient.
- Clipping uses 0.20 below and 0.28 above, with no reference-model KL term.
Basics
- All methods start from the same size-matched Qwen3.5 policy and base harness.
- Interfaces and verifiers stay unchanged.
- Each method keeps its own search style and update rule.
- Hbest is one harness fixed across test tasks. Hrank1 is chosen per task.
- Frontier models under H0 serve as extra references.
Evaluation protocol
- Each test task gets three executor rollouts per run.
- Main scores are means over three random runs. Standard deviations come from across runs.
- Rank-r means the candidate at position r for each task.
- It is tested with the same rollout count.
Control and baseline details
GRPO controls
- GRPO and H0 rescue. Plain GRPO keeps each first group.
- The rescue control replaces an all-failure group with fresh H0 rollouts.
- Total sampling depends on rescue frequency and includes dropped base attempts.
Rescue allocation variants
- All rescue groups hold eight rollouts.
- Random Harness samples pool members. Rule Router uses validation success on similar tasks.
- LLM Router (4 x 2) gives two rollouts to each of four.
- Top-8 gives one rollout to each of eight.
- Fixed-profile Top-8 keeps profiles. Harness-S refreshes them at checkpoints.
Fixed mixed-harness GRPO
- The Claude Code mix uses four rollouts for DSH H0 and four for Claude Code.
- The Top-4 mix joins DSH H0 with four chosen siblings throughout training.
- The same mix is used for all training tasks.
- It does not wait for an all-failure group.
- Only policy weights update. Both are tested under H0.
Meta-Harness, WHALE, HarnessForge
- Meta-Harness. The policy is frozen.
- A proposer revises harness code from past code, scores and runs.
- Candidates are checked and tested on training tasks. One Hbest is used at test.
- WHALE. It alternates Meta-Harness-style search with rejection-sampling fine-tuning on wins.
- HarnessForge. Failure analysis guides edits. Wins train branch policies.
- HarnessForge shows zero extra training rollouts. It reuses search wins.
- Its policy is not frozen.
Pool, profiles and voting
Pool
- The pool holds H0 and 19 auxiliary harnesses.
- Rescue selects eight auxiliaries. Inference ranks all 20.
- The nine siblings in Appendix E define that analysis, not the pool size.
- The HE-only variant freezes the start policy.
- The two trained variants share a checkpoint and differ only in test harness choice.
Profile refresh
- For AppWorld 4B, profiles are built before training and refreshed every ten updates.
- They are re-anchored with the final policy.
- Each calibration freezes the policy for paired validation runs.
- Between checkpoints, routing uses the latest profiles. All harness code stays fixed.
Inference voting
- Several LLMs rank candidates on their own.
- Each ballot ranks four distinct candidates with weights 1, 3/4, 1/2 and 1/4.
- Unlisted candidates get zero. Weights add up across ballots.
- Ties use validation success, then harness ID. Candidate order varies across calls.
- Each picked harness is fixed across the three test rollouts of its task.
- Ranking ends before any outcome is seen. Failed tries do not trigger a new pick.
Overview
- Table 7 pairs three configuration edits with profile entries from the step-40 AppWorld calibration.
- The policy is frozen.
- Each sibling is compared with H0 on matched tasks, limits and seeds.
- The edits add guidance to the shared base system.
- A null entry means H0 has no such rule or hook.
- Pagination and completion hooks add reminders.
- The intersection rule gives an instruction through action_guidance.
- The S7 and S8 examples use the same validation task.
Table 7, case 1: S6, complete pagination across sources
- Edit: an after-tool reminder to keep paging until the data is fully read.
- The hook is state.hooks.pagination-completion-guidance. H0 has null.
- Its warning says: do not treat the first page as complete.
- When: collecting information across inbox, spam and archive.
- Behavior: page through all sources, merge, and remove duplicates.
- The H0 run matches in one pass and omits some sources.
Table 7, case 2: S7, joint filtering of target records
- Edit: an action-guidance rule to take the intersection of task conditions.
- The rule is state.prompt_rules.reconcile-before-side-effect. H0 has null.
- It says: fetch each condition alone, compute the intersection, and do not widen an item.
- When: finding office desks returned in the current month.
- Behavior: get all return records, then filter on product name and return date together.
- The chosen records meet both product and time limits.
Table 7, case 3: S8, reserve budget for submission
- Edit: a low-budget reminder to finish needed checks and keep one step to finish.
- The hook is state.hooks.low-budget-completion. H0 has null. The threshold is 3 steps left.
- When: filtering and checks are done and the answer must go through the dedicated API.
- Behavior: finish checks and submit with complete_task.
- The H0 run reaches a conclusion but ends before submitting it.
How profiles are built
- Profiles describe execution differences in complete paired trajectories.
- Entries sit in prefer and avoid lists.
- Repeated observations are merged by task condition and behavior.
- Useful single-task observations are kept.
- Each paired example succeeds with the sibling and fails under H0.
- The test uses nine siblings and the final AppWorld Qwen3.5-4B policy.
- It uses one greedy rollout per validation task.
- Each harness has the same start state and limits.
- One task had an invalid paired outcome. It is dropped, leaving 149 shared tasks.
- For each sibling, Ri is the set of H0 failures it repairs.
- Figure 5 shows directed overlap.
- It is the share of a row sibling's repairs that a column sibling also makes.
- The average across distinct ordered pairs is 62.47%.
Reading the matrix
- The matrix is directional. Overlap can differ when row and column swap.
- High overlap means another sibling gives many of the same repairs.
- Lower overlap marks coverage a pair does not share.
- This concerns repairs of H0 failures, not overall success on all validation tasks.
- Incomplete overlap supports keeping different repair directions.
- Single siblings repair 11 to 15 failures. Their union repairs 29. That is oracle coverage.
Figure 5: shared repair coverage (%)
| Row sibling | S1 / S2 / S3 / S4 | S5 / S6 / S7 | S8 / S9 |
|---|
| S1 | - / 60 / 60 / 67 | 60 / 60 / 53 | 60 / 67 |
| S2 | 64 / - / 64 / 50 | 57 / 64 / 43 | 50 / 57 |
| S3 | 69 / 69 / - / 62 | 62 / 62 / 46 | 54 / 62 |
| S4 | 71 / 50 / 57 / - | 71 / 79 / 64 | 57 / 64 |
| S5 | 75 / 67 / 67 / 83 | - / 83 / 58 | 50 / 58 |
| S6 | 64 / 64 / 57 / 79 | 71 / - / 71 | 64 / 64 |
| S7 | 73 / 55 / 55 / 82 | 64 / 91 / - | 73 / 73 |
| S8 | 64 / 50 / 50 / 57 | 43 / 64 / 57 | - / 57 |
| S9 | 71 / 57 / 57 / 64 | 50 / 64 / 57 | 57 / - |
Row sibling's repairs also made by the column sibling
A dash marks the diagonal, which the paper leaves out.
The search
- The AppWorld search freezes the Qwen3.5-4B base and uses the 320 training tasks.
- They serve failure analysis, candidate editing and local tests.
- Validation tasks guide parent choice and profile anchoring.
- The analysis prompt groups every valid failure by root cause.
- Otherwise the failure is marked unresolved.
- The evidence sets how many groups form.
- Each candidate targets a few related causes backed by many failed tasks.
Editing and testing
- Edits can change prompts, skills, context, memory, hooks or the tool view.
- Other candidate briefs push for different mechanisms, triggers or recovery plans.
- Local tests check that an edit fixes target failures and keeps successes.
- Each candidate can submit one first version and one revision.
- The editing agent sends an artifact with its state and self-review.
- Then it asks for checks or rollouts.
- The host supplies the results. Self-review does not decide success.
Next round
- New valid variants compete for B = 4 parent slots under the coverage goal.
- Parents are paired with diagnosed causes for the next round.
- The archive keeps all executable, protocol-compliant variants.
- The code stays fixed in policy training. Only profiles and allocation change.
| Setting | Value |
|---|
| Search | 3 rounds; proposal budgets 7 / 8 / 8; 4 parent slots |
| Development tasks | Sampled from the 320-task training set |
| Repair direction | 2-3 related root causes per candidate; at least 2 distinct failed tasks per cause |
| Local evaluation | At most 30 tasks, including at most 10 successful controls |
| Revision budget | Initial candidate plus at most one revision |
| Harness editor | GLM-5.3; temperature 0.6; thinking on with high reasoning effort |
| Policy sampling | Greedy decoding; one rollout per task; seed 42 |
| Execution limits | 32 model calls and 30 environment actions; 65,532 context tokens and 8,192 output tokens per call |
| Editable components | Prompt, Skill, Context, Memory, Hooks, Tool View |
Table 8: AppWorld evolution run settings
Proposal counts are budgets, not counts of accepted variants.
Saved prompt excerpts
- Attribution: for each failure, follow the earliest decision or tool result that explains it.
- Then inspect the later effect.
- Planning: choose among all six components by diagnosed cause.
- Do not default to prompt or skill edits.
- Submission: summarize observed gains, regressions and unresolved causes. Never claim unrun tests.
- Stages get the parent harness, full runs and scoring notes.
- Hidden scoring answers are not given to the executor policy.
- All experiments use eight NVIDIA H800 GPUs.
- External model use is counted in API tokens.
- Two tables split policy-training cost from full pipeline cost.
| Setting | Training rollouts | Training GPU hours | H0 test Avg@3 (%) |
|---|
| Plain H0 GRPO | 2,560 (100.00%) | 50.58 | 48.98 |
| GRPO (H0 rescue) | 3,616 (141.25%) | 97.77 | 51.91 |
| DSH H0 + Top-4 | 2,560 (100.00%) | 58.47 | 47.84 |
| DSH H0 + Claude Code | 2,560 (100.00%) | 50.03 | 46.69 |
| Harness-S / Top-8 | 3,032 (118.44%) | 67.19 | 56.87 |
Table 9: GRPO training cost, AppWorld Qwen3.5-4B, 40 updates
Percentages show rollouts relative to plain H0 GRPO.
| Method | Search / training rollouts | GPU hours | API tokens (M) |
|---|
| Meta-Harness | 8,000 / 0 | 35.24 | 4.89 |
| WHALE | 8,640 / 2,560 | 95.84 | 9.80 |
| HarnessForge | 5,680 / 0 | 65.39 | 24.40 |
| Harness-S | 4,010 / 3,032 | 75.79 | 18.69 |
Table 10: full pipeline resources
Training rollouts count extra samples. HarnessForge reuses successful search runs.
Training cost
- Training costs include failed attempts as well as kept trajectories.
- Harness-S raises H0 Avg@3 by 7.89 points over plain GRPO, with 18.44% more rollouts.
- It beats H0 rescue with fewer rescue attempts and less GPU time.
- The fixed mixes match the plain-GRPO rollout count but do not get the same gain.
Full pipeline cost
- Directional evolution cuts search rollouts by 29 to 54%.
- GPU hours and API tokens stay within the joint baselines' range.
- Against WHALE, Harness-S uses fewer GPU hours but more API tokens.
- Against HarnessForge, it uses fewer API tokens but more GPU hours.
- Re-anchoring lets the pool be reused across checkpoints.
- Extending the pool between runs can spread earlier evolution cost.
H.1 Agent RL training
- Toolformer and AgentTuning start tool use from examples and tuning.
- WebGPT mixes browsing demos with human feedback.
- ReTool and Search-R1 learn to mix reasoning with code or search.
- SWE-RL uses software evolution data.
- RAGEN, LOOP, AgentGym-RL and Agent Lightning tackle long interactions, credit and runtime design.
- Hindsight Experience Replay, RUDDER and Go-Explore help when success is rare or delayed.
- PPO and GRPO shape updates. DAPO keeps groups with reward variation.
- Harness-S changes the execution help before it makes fresh tries on the same failed task.
- It keeps the task and verifier fixed to find wins for updates.
H.2 Knowledge transfer
- Distillation moves predictions. Sequence-level distillation moves whole solutions.
- Policy Distillation and Kickstarting fold several experts into one learner.
- Expert Iteration, STaR and Distilling Step-by-Step use richer training-time traces.
- DAgger, Generalized Knowledge Distillation and MiniLLM handle the learner's own state spread.
- Learning by Cheating uses privileged teacher information.
- Harness-S gets diversity by running one policy under different harness contexts.
- Task outcomes supervise runs. Tests under H0 show if habits stay when help is removed.
H.3 Harness editing and reusable skills
- ReAct, SWE-agent, CodeAct and AutoGen set control structures and action forms.
- OPRO, EvoPrompt, Promptbreeder, DSPy, TextGrad, AFlow and AgentOptimizer tune different parts.
- ADAS and the Darwin Godel Machine keep archives of agents.
- GEPA keeps a Pareto frontier of prompts.
- Meta-Harness shows its proposer past code, scores and runs. Harness-R1 learns the editing policy.
- Tool Makers, Voyager and Agent Workflow Memory store reusable tools and routines.
- Reflexion, ExpeL and ACE keep memory in language. MMSkills, SkillRise and SkillGate manage skills.
- Co-Harness and WHALE alternate harness and model updates. HarnessForge couples them.
- Harness-S sets a fixed pool at task level.
- It calls the pool after all H0 tries fail.
Words to know
- AppWorld: A test of tasks that call app APIs, like email and music.
- Avg@3: Average success across three tries per task.
- Behavior profile: A note on when a harness helps or hurts the model.
- DBBench: A test of database tasks.
- GRPO: A training method that compares tries for the same task.
- Harness: The prompts, tools, memory and rules around a model.
- KL term: A penalty that keeps a model near a reference model.
- Oracle union: The tasks solved by any variant, counted with hindsight.
- Pass@3: The share of tasks solved at least once in three tries.
- Policy: The AI model that picks each next action.
- Reinforcement learning: Training a model from rewards for its results.
- Rollout: One full try at a task, step by step.
- Router: A part that picks which harness to use for a task.
- Sibling harness: A harness variant made from the same base, with its own repairs.
- SWE-Gym: A test of real software fixes in code repositories.
- Verifier: Code that checks if a task ended in success.
Ask AI about this paper
Stuck on a word or an idea? Ask in plain words. The answer comes from the write-up on this page.
Jump to