Skip to main content
GW
HomeWorkAI appsPapersAboutNotesStackLabPilotPlan↗ (opens in a new tab)INVST↗ (opens in a new tab)
Govind Waghmare

Finance systems and AI. Building in public from NYC.

Resume (PDF)Book 20 minEmail
HomeNotesWorkAboutStackPapersLabFor founders
XLinkedInGitHubllms.txt
© 2026 · New York City

Keyboard shortcuts

?
Open this list
g then h
Go to Home
g then w
Go to Work
g then n
Go to Notes
g then a
Go to About
c
Ask the AI guide
Esc
Close this list
Original paperSection A, The abstract
Open in new tab (opens in a new tab)
All papers
AI 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 3 Nov 2026 · 14 min read · arXiv 2611.04277

Share this paper

LinkedIn (opens in a new tab)X (opens in a new tab)WhatsApp (opens in a new tab)EmailDownload PDFExplainer + original paper (PDF), 2.3 MB

  • 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 1
010203040506070Average success over three tries ([[avgk|Avg@3]]), AppWorld, Qwen3.5-4BBase model31.93%[[grpo|GRPO]]48.98%GRPO with H0 rescue51.91%WHALE52.93%Harness-S (base harness)56.87%Harness-S (routed)61.45%

Hover, tap or focus a bar to read its exact value.

MethodAvg@3 (%)
Base model31.93
[[grpo|GRPO]]48.98
GRPO with H0 rescue51.91
WHALE52.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

  1. A The abstract
  2. 1 Introduction
  3. 2 Related work
  4. 3 The Harness-S method
  5. 4 The experiments
  6. 4.1 Setup and main results
  7. 4.2 Overall performance (RQ1)
  8. 4.3 Learning mechanism (RQ2)
  9. 4.4 Rescue strategies (RQ3)
  10. 4.5 Policy behavior (RQ4)
  11. 4.6 Router effectiveness (RQ5)
  12. 4.7 Cross-harness generalization (RQ6)
  13. 5 Conclusion and future work
  14. A Appendix A: Dataset splits
  15. B Appendix B: Shared policy optimization
  16. C Appendix C: Comparison variants
  17. D Appendix D: Sibling edits and behavior profiles
  18. E Appendix E: Sibling harness diversity
  19. F Appendix F: Directional evolution prompts and settings
  20. G Appendix G: Computational efficiency
  21. H Appendix H: Extended related work
  22. W Words to know

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.

The router

  • 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)
VariantRegressedRepairedNet solved
H11126+15
H21624+8
H3919+10
H41720+3

Figure 1a: tasks repaired and regressed against H0

Net solved is repaired minus regressed.

Variant at stepBoth correct / Hi onlyH0 only / Both wrongNet vs H0
H1 at 039 / 2611 / 74+15
H1 at 1048 / 1819 / 65-1
H1 at 2057 / 1822 / 53-4
H2 at 034 / 2216 / 78+6
H2 at 1044 / 2723 / 56+4
H2 at 2058 / 2221 / 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
  1. OfflineBuild a sibling harness pool
  2. TrainingRetry failed tasks with siblings
  3. Update one shared policy
  4. Policy works under base harness

Figure 2 shows the same three moves. Rank-1 routing then adds more gains.

2.1 Harness evolution
  • Execution design shapes model behavior, from reasoning formats to interfaces and search.
  • Tools for tuning: instruction refinement, evolutionary prompt search, program compilation.
  • Memory, skill libraries and context adaptation improve execution from experience.
  • System-level work searches agent designs and workflows. Code evolution tunes harnesses end to end.
  • Harness-S keeps complementary local repairs in a sibling pool.
  • The pool stays fixed. Only the behavior profiles are refreshed.
2.2 Harness and policy optimization
  • Reinforcement learning improves agents from outcome feedback.
  • Benchmarks cover web services, apps and databases, and software engineering.
  • Joint methods alternate harness and policy updates, evolve matched pairs, or learn coordination.
  • Model routing and response ensembles are related ways to share execution resources.
  • HarnessBandit schedules one harness per optimizer step.
  • HarnessX links harness evolution with cross-harness GRPO over a shared buffer.

How Harness-S differs

  • Harness-S asks a different question.
  • Can specialized harnesses rescue failures of a base system and teach one policy?
  • Its unit is a failed task under H0. Only all-failure groups trigger fresh rollouts.
  • Testing under H0 shows if the gain survives when the help is removed.
2.3 Recursive self-improvement
  • Surveys split self-improvement by whether it changes model parameters or the scaffold.
  • Program-level methods improve code or agent logic: AIDE2, RRSI and SpecForge.
  • Self-rewarding models and SEAL update parameters from self-made rewards or data.
  • Harness-S fixes the pool, the optimizer, the verifier and the training harnesses.
  • It does not redesign the improvement algorithm itself.
  • Appendix H covers agent RL training, knowledge transfer and reusable skills.

How rescue training works for one taskFrom Section 3.3 and Algorithm 1
  1. Run K tries under H0
  2. Any try succeeds? Keep the group
  3. RouterAll failed: router picks siblings
  4. One fresh try per sibling
  5. Rescue group replaces failed one
  6. 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.
ModelAppWorldSWE-GymDBBench
GPT-6-Sol82.82 / 76.3453.13 / 47.5071.33 / 68.89
DeepSeek-v4-Flash81.68 / 77.6151.88 / 46.2575.00 / 70.44
GLM-5.3-Flash80.15 / 65.6546.88 / 43.1376.67 / 72.11

Table 1: frontier models under H0 ([[passk|Pass@3]] / Avg@3)

References only. Higher is better.

Method (test harness)AppWorldSWE-GymDBBench
Base model (H0)42.62 / 31.9319.38 / 17.5059.00 / 56.89
GRPO (H0)60.31 / 48.9824.38 / 22.5066.67 / 64.00
GRPO, H0 rescue (H0)61.83 / 51.9125.63 / 23.3367.33 / 64.67
Mixed: DSH H0 + Claude Code (H0)57.63 / 46.6925.63 / 23.3365.67 / 62.78
Mixed: DSH H0 + Top-4 (H0)58.78 / 47.8426.88 / 24.3864.67 / 61.89
Meta-Harness (Hbest)48.09 / 36.2621.88 / 20.0062.67 / 60.11
Harness-S, HE only (Hrank1)56.87 / 45.4225.00 / 23.7569.33 / 66.78
WHALE (Hbest)63.36 / 52.9329.38 / 26.8870.67 / 68.11
HarnessForge (Hbest)59.54 / 49.7527.50 / 25.0069.00 / 66.22
Harness-S (H0)67.56 / 56.8738.75 / 28.7573.33 / 71.00
Harness-S (Hrank1)68.32 / 61.4542.50 / 32.2975.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)AppWorldSWE-GymDBBench
Base model (H0)50.00 / 39.6923.13 / 20.6363.00 / 60.22
GRPO (H0)64.89 / 53.3128.13 / 25.6369.67 / 67.00
GRPO, H0 rescue (H0)65.65 / 54.8329.38 / 26.8870.67 / 67.78
Mixed: DSH H0 + Claude Code (H0)62.21 / 50.8929.38 / 26.8868.67 / 65.89
Mixed: DSH H0 + Top-4 (H0)63.36 / 52.1630.63 / 27.7167.67 / 65.00
Meta-Harness (Hbest)53.44 / 42.8825.63 / 23.1365.67 / 62.78
Harness-S, HE only (Hrank1)61.45 / 50.1329.38 / 27.0872.67 / 69.78
WHALE (Hbest)68.70 / 58.0233.75 / 30.6374.00 / 71.11
HarnessForge (Hbest)64.89 / 54.8331.25 / 28.5472.00 / 69.22
Harness-S (H0)72.52 / 62.3440.00 / 32.5076.33 / 73.44
Harness-S (Hrank1)75.19 / 67.0543.75 / 36.2578.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)
RowAppWorldSWE-GymDBBench
4B, H01.87 / 1.472.22 / 1.732.36 / 1.84
4B, Hrank11.74 / 1.352.04 / 1.642.23 / 1.75
9B, H01.65 / 1.282.04 / 1.512.13 / 1.67
9B, Hrank11.56 / 1.201.84 / 1.451.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.3
0255075100Effective group rate over the full run (%)GRPO64.69%GRPO with H0 rescue70.94%Harness-S79.38%

Hover, tap or focus a bar to read its exact value.

MethodEffective groups (%)H0 validation success (%)
GRPO64.6948.00
GRPO with H0 rescue70.9454.00
Harness-S79.3863.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.
StageRandom HarnessRule RouterTop-4 x2
Steps 1-1025.0040.0043.48
Steps 11-2018.1826.6743.75
Steps 21-3020.0027.7838.89
Steps 31-4025.0044.4433.33

Table 2: rescue success by training stage (%)

GRPO has no rescue. Higher is better.

StageTop-8 FixedTop-8 Adaptive
Steps 1-1035.7152.38
Steps 11-2024.2466.67
Steps 21-3026.6745.71
Steps 31-4038.8950.00

Table 2: rescue success, Top-8 variants (%)

MethodPass@3Avg@3
GRPO60.3148.98
Random Harness62.9850.76
Rule Router66.4152.93
Top-4 x265.6555.60
Top-8 Fixed64.5052.16
Top-8 Adaptive67.5656.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 3
BaseGRPOHarness-S
0255075100Share of AppWorld runs with the behavior (%)Schema lookup before first API use22.9%38.2%67.6%Several API calls in one execute block24.8%20.5%31.5%Explicit pagination loops13.8%33.5%38.3%Repeated execute code (lower is better)15.4%30.1%9.8%Read-back after the last write69.2%56.9%69.4%

Hover, tap or focus a bar to read its exact value.

BehaviorBase (%)GRPO (%)Harness-S (%)
Schema lookup before first API use22.938.267.6
Several API calls in one execute block24.820.531.5
Explicit pagination loops13.833.538.3
Repeated execute code (lower is better)15.430.19.8
Read-back after the last write69.256.969.4
BehaviorBaseGRPOHarness-S
Agent-written assertion checks10.211.218.4
Switch to assertions after blocked tests15.413.348.5
Fail-edit-retest of the same target9.218.224.1
Diff inspection after the last edit16.323.527.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
CaseRescue in trainingGRPO on held-outHarness-S on held-out
1: Set intersectionH2 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 recoveryH5 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.
HarnessPass@3 / Avg@3 beforeH0 rate beforePass@3 / Avg@3 after
H042.62 / 31.93not used67.56 / 56.87
Rank-156.87 / 45.421.5368.32 / 61.45
Rank-253.44 / 42.116.8766.03 / 55.60
Rank-350.38 / 39.194.9664.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.

BenchmarkTrain / ValidationTestTotal
AppWorld320 / 150262732
DBBench1,600 / 2003002,100
SWE-Gym240 / 100160500

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 siblingS1 / S2 / S3 / S4S5 / S6 / S7S8 / S9
S1- / 60 / 60 / 6760 / 60 / 5360 / 67
S264 / - / 64 / 5057 / 64 / 4350 / 57
S369 / 69 / - / 6262 / 62 / 4654 / 62
S471 / 50 / 57 / -71 / 79 / 6457 / 64
S575 / 67 / 67 / 83- / 83 / 5850 / 58
S664 / 64 / 57 / 7971 / - / 7164 / 64
S773 / 55 / 55 / 8264 / 91 / -73 / 73
S864 / 50 / 50 / 5743 / 64 / 57- / 57
S971 / 57 / 57 / 6450 / 64 / 5757 / -

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.
SettingValue
Search3 rounds; proposal budgets 7 / 8 / 8; 4 parent slots
Development tasksSampled from the 320-task training set
Repair direction2-3 related root causes per candidate; at least 2 distinct failed tasks per cause
Local evaluationAt most 30 tasks, including at most 10 successful controls
Revision budgetInitial candidate plus at most one revision
Harness editorGLM-5.3; temperature 0.6; thinking on with high reasoning effort
Policy samplingGreedy decoding; one rollout per task; seed 42
Execution limits32 model calls and 30 environment actions; 65,532 context tokens and 8,192 output tokens per call
Editable componentsPrompt, 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.
SettingTraining rolloutsTraining GPU hoursH0 test Avg@3 (%)
Plain H0 GRPO2,560 (100.00%)50.5848.98
GRPO (H0 rescue)3,616 (141.25%)97.7751.91
DSH H0 + Top-42,560 (100.00%)58.4747.84
DSH H0 + Claude Code2,560 (100.00%)50.0346.69
Harness-S / Top-83,032 (118.44%)67.1956.87

Table 9: GRPO training cost, AppWorld Qwen3.5-4B, 40 updates

Percentages show rollouts relative to plain H0 GRPO.

MethodSearch / training rolloutsGPU hoursAPI tokens (M)
Meta-Harness8,000 / 035.244.89
WHALE8,640 / 2,56095.849.80
HarnessForge5,680 / 065.3924.40
Harness-S4,010 / 3,03275.7918.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.

Share this paper

LinkedIn (opens in a new tab)X (opens in a new tab)WhatsApp (opens in a new tab)EmailDownload PDFExplainer + original paper (PDF), 2.3 MB

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.

Read the original paper on arXiv: Harness-S: Learning from Sibling Harnesses for Generalizable Agent Training (opens in a new tab)

Jump to

One paper a week, in plain English

Every Monday: the new AI papers worth your time. Short lines, the key number, and what to do with it.

One email a week. Unsubscribe with one click. No spam.