WHALE alternates weight updates and harness search to lift agent accuracy

AI agents are shaped by two things at once: the model's weights, and the harness, the executable code that manages the agent's context and control flow. A new paper argues that tuning just one side leaves the system bottlenecked by the other: updating the weights changes which harness design works best, while changing the harness changes which of the model's capabilities get exposed. Existing joint-adaptation methods have optimized weights together with a text prompt, but left the broader harness fixed.
The paper proposes WHALE (Weight-Harness Alternating LEarning), a recipe that alternates between two phases rather than tackling both sides at once. In the first phase, the model is updated under its current harness using online rejection-sampling fine-tuning. In the second, the harness is searched for improvements under the now-updated model, using a method the paper calls Meta-Harness. Deciding when to switch between the two phases matters: switch at the wrong point and it becomes hard to separate a real improvement from noise, since each phase is optimizing against a moving target, the other component, which keeps changing. WHALE handles this with either a fixed schedule of phase durations or an adaptive patience rule that watches the training signal.
The authors test WHALE with Qwen3.5-2B and Qwen3.5-4B agents across three domains: search question answering, mathematical reasoning, and chess puzzles. Against three baselines, weight-only optimization, harness-only optimization, and a method called Fast-Slow Training, WHALE's best mean@8 accuracy comes out 4.15 to 24.38 percentage points ahead.
Which component acts as the bottleneck shifts by domain. On SearchQA, searching the harness alone is enough to match the peak accuracy of weight-only optimization, and it gets there with far fewer rollouts. On the math reasoning tasks, harness search only pays off once a weight update has already happened, so weight tuning has to come first there. The paper also compares scheduling strategies directly: making small, interleaved updates to weights and harness beats a stagewise weight-then-harness schedule on both final accuracy and rollout cost.
The code for WHALE is published under the GitHub organization krafton-ai. The abstract does not name individual authors or an institutional affiliation, and it gives no absolute accuracy numbers for WHALE or any baseline: the reported gains are strictly the percentage-point gap between methods, not standalone accuracy scores. It also does not explain what Fast-Slow Training is beyond naming it as a baseline, and gives no rollout counts, training budgets, or compute figures despite discussing rollout cost.
Key facts
- WHALE alternates two phases: online rejection-sampling fine-tuning updates the model's weights, then a method called Meta-Harness searches for a better harness under the updated model.
- Tested with Qwen3.5-2B and Qwen3.5-4B agents across three domains: search question answering, mathematical reasoning, and chess puzzles.
- WHALE beat weight-only, harness-only, and Fast-Slow Training baselines by 4.15 to 24.38 percentage points in best mean@8 accuracy.
- On SearchQA, harness search alone matched peak weight-only accuracy with far fewer rollouts; on math tasks, harness search only helped after a weight update had already happened.
- Small interleaved weight-and-harness updates beat a stagewise weight-then-harness schedule on both accuracy and rollout cost.
Why it matters
Agent performance depends on two things at once: the model's weights, and the harness, the executable code that manages its context and control flow. Existing joint-adaptation methods optimize the weights alongside a text prompt but leave the broader harness fixed. That is a problem because the two interact: updating the weights changes which harness design works best, and changing the harness changes which of the model's capabilities actually get used, so tuning only one side leaves the system stuck behind whichever piece was left alone. WHALE is a recipe for adjusting both, alternating between updating the weights and searching for a better harness instead of fixing one and optimizing only the other.
Who it affects
Anyone building or fine-tuning agentic systems on top of an LLM, where an external harness handles context management and control flow around the model rather than just prompting a fixed model directly. The paper's own tests cover search question answering, mathematical reasoning, and chess puzzles using Qwen3.5-2B and Qwen3.5-4B agents, so it speaks most directly to teams already running an online rejection-sampling fine-tuning loop, WHALE's weight-update phase, who also iterate on harness design and are deciding where to invest optimization effort.
How to use it
The code is available on GitHub under the organization krafton-ai. WHALE itself is a training recipe rather than a packaged product: it alternates a model-update phase, online rejection-sampling fine-tuning under the current harness, with a harness-search phase called Meta-Harness, run under the updated model, and switches between the two either on a fixed schedule of phase durations or via an adaptive patience rule that watches training signals to tell real gains from noise. No licence, pricing, or setup instructions beyond the code link appear in the source.
How solid is it
The comparison goes beyond a single headline number. Alongside an overall 4.15 to 24.38 percentage-point gain in best mean@8 accuracy over weight-only, harness-only, and Fast-Slow Training baselines across three domains, the authors test where the improvement actually comes from. On SearchQA, harness search alone reaches peak weight-only accuracy using far fewer rollouts; on the math tasks, harness search only helps once a weight update has already run first. They also directly compare scheduling strategies, finding that small interleaved weight-and-harness updates beat a stagewise weight-then-harness approach on both accuracy and rollout cost. That domain-by-domain and schedule-by-schedule breakdown is more convincing than one aggregate number, though everything reported is scoped to Qwen3.5 agents at 2B and 4B parameters.
Risks and caveats
The abstract gives no absolute accuracy figures for WHALE or any baseline, only the percentage-point gap between them, so there is no way to judge from the source alone how strong the underlying accuracy actually is. It does not explain what Fast-Slow Training, one of the three baselines, actually does, and it gives no rollout counts, training budgets, or compute figures despite discussing rollout cost directly. It also names no individual authors or institutional affiliation, only the GitHub organization krafton-ai behind the code release. Every result is at the 2B and 4B parameter scale across three specific task types, so it is unclear how the method holds up at larger scale or on different domains.