Scientific discovery with language models requires finding the best valid solution within a finite computational budget. We study how feedback from this search can improve the procedure used to conduct it. We introduce HarnessTTT, a test-time learning framework that trains a harness proposer while keeping the executor frozen. The proposer generates executable harnesses comprising system prompts, reusable skills, tools, middleware, and execution controls. Each harness guides a budgeted discovery rollout, whose outcome provides feedback for updating the proposer. A discovery-oriented policy-gradient objective combines gap-normalized rewards, leave-one-out advantages (RLOO), and max-sharpening to favor high-performing proposals. Generated components are validated before execution, and the search retains the best valid solution and selected harnesses across rounds. Across fourteen discovery tasks in mathematics, systems, GPU kernels, heuristic programming, astrodynamics, and biology, HarnessTTT with a frozen 9B executor improves on OpenEvolve with the same executor on all eleven benchmark tasks (e.g., from 1.17 to 2.64 on circle packing), improves on the discovery-fine-tuned Finch-9B by up to 92%, holds the best open-weight sub-10B result on nine, and reaches 0.380919 on Erdős minimum overlap, better than the best human reference of 0.380927. Scaling the proposer and frozen executor to 27B improves on eleven of fourteen tasks, and transferring the learned harnesses to GPT-5.5 matches or exceeds the strongest reported system of any backbone on nine of fourteen tasks. Together, these results show that harness search can itself be learned at test time: a trained proposer lets a small frozen executor search effectively, and the harnesses it finds carry over to stronger executors.
Figures & tables
Figure 2: HarnessTTT on one page. (a) Executor RL versus HarnessTTT : the same loop, but the reward updates the executor or the proposer. (b) Properties of a learned harness. (c) Tasks at or above the reported frontier. (d) Task-specific harnesses written by the proposer. (e) A circle-packing campaign and its transfer to a frozen GLM-5.2 executor.
Figure 3: Where is test-time reward retained? (a) Executor weights : the policy that solves the task is also the policy being trained [ 77 , 65 ] . (b) Proposer context : the executor stays frozen and a fixed proposer re-reads an archive or harness accumulated over rounds [ 42 , 58 , 29 ] . (c) Proposer weights (ours) : a separate proposer is trained to write complete harnesses for a frozen executor, so adaptation is amortized into weights while remaining expressed as inspectable artifacts.
Figure 4: Overview of HarnessTTT . A trainable proposer generates K candidate harnesses from a shared task state. Accepted harnesses guide a frozen executor through budgeted discovery rollouts. Their outcomes provide group-relative rewards for updating the proposer; selected solutions, harnesses, and an experience digest condition the next round. Executor parameters remain fixed throughout.
Reported systems
Our method
Task
OpenEvolve
AlphaEvolve
Hyra
SimpleTES
TTT-Discover
ShinkaEvolve
CORAL
ALE-Agent
GEPA
LEVI
HarnessTTT (9B)
HarnessTTT (27B)
backbone
multiple
Gemini 2.0
Hy3
gpt-oss- 120B
gpt-oss- 120B
multiple
Opus 4.6
Gemini/ GPT
GPT-5/ Gem. 3
mixed
Qwen3.5- 9B
transfer → GPT-5.5
Qwen3.8- 27B
transfer → GPT-5.5
Mathematical discovery
Erdős ↓
0.380910
0.380924
0.380859
0.380868
0.380875
0.38156
0.38089
–
–
–
0.380919
0.380923
0.380902
0.380868
AC1 ↓
1.506604
1.503170
1.502850
1.503871
1.502863
–
–
–
–
–
1.504680
1.506805
1.503778
1.503871
AC2 ↑
0.944900
0.961020
0.962901
0.962694
0.959180
–
–
–
–
–
0.933900
0.934210
0.934868
0.963589
Table 3: With harness transfer, HarnessTTT matches or exceeds the reported frontier on nine of fourteen tasks and is within 1% on four more. Baseline columns are the strongest reported system per task family regardless of backbone. For HarnessTTT, the first column searches with its own frozen executor and the second moves the learned harness to GPT-5.5 and continues search. Bold : state of the art per task; underline : second best. TriMul entries are geometric-mean latencies ( μ s) under the GPU MODE kernelbot protocol and software stack, all re-measured on one H100 in interleaved passes. Entries that agree at the printed precision are ranked by their unrounded scores. Each transfer column is a separate search with GPT-5.5 under the learned harness, so executor and evaluation variance can leave it slightly below the own-executor column on a few tasks.
Figure 5: Ablations . (a) Reward routing on Erdős and autocorrelation II: normalized score versus rollouts spent; every arm spends 16 rollouts per round (8 proposer and 8 executor rollouts for the proposer-weight and context arms, 16 executor rollouts for the executor-weight arm, which has no proposer); (b) Best score over 15 rounds on circle packing and Hadamard for K∈{2,…,32} proposals per round; round cost grows with K ; (c) Proposer objective (§ 3.1 ), normalized as in (a); the RLOO curve is the K=32 run in (b).
Figure 6: Search from different initial programs. (a) Autocorrelation II from the default seed and from the ThetaEvolve StrongInit program. (b) Search continued from already-strong programs: Autocorrelation II from a ThetaEvolve program and Erdős from the HarnessTTT -27B program. Curves show the incumbent score after each outer round.
Figure 7: Cross-executor replay of the 9B harness. Left : custom-tool calls per 100 turns (eleven tasks, three decode seeds). Right : mean normalized score after 48 OpenEvolve iterations from the initial versus the evolved harness (one search seed). Point estimates; the aggregate includes the two quarantined tasks.
Appendix figures & tables7 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 8: What a generated harness contains. Prior methods emit fragments—a patch or a skill snippet [ 56 , 64 ] —into a fixed scaffold. Our proposer can change every component of the executable harness, which is bound by agent.yaml and compiled into a runnable agent.
Field
Type
Semantics
Overrides of existing components
system_prompt
text
executor system prompt
skill_description
text
skill card shown in the executor’s tool list
skill_body
text
skill playbook body
tool_descriptions
map
descriptions of the fixed tools
sampling
map
temperature, top- p , top- k , max tokens
Appendix
Table 4: Fields of a harness spec. The upper block overrides components the parent already has; the lower block changes the set of components.
Group
Method
Behavior
Program state
get_program()
current program
get_best_program()
best program so far
best_score()
score of the best program
Editing
stage_edit(code)
stage an edit to the program
Scoring
evaluate()
full evaluation; uses one of the B evaluator calls
probe()
subsampled evaluation, ∼ 8 × cheaper; outside B but separately capped
Appendix
Table 5: The ctx interface available to generated tools.
Parameter
27B campaign
9B campaigns
Search
Outer rounds per task
20
Proposals per round K
8
32
Trajectories per round
2K=16
2K=64
Parent beam
incumbent + best candidate within 2% of the top score that adds a new component, else the second-highest scorer
Advantage group size Kg
K in the first round, K/2 afterwards
Appendix
Table 6: Proposer-training hyperparameters. Values centered across both columns are shared; — : not recorded for the 9B campaigns.
Task
Metric
f(x)
uτ
f(uτ)
Source
Backbone
Mathematical discovery
Erdős ↓
c5
0.380922 / x
0.999987
0.380927
Best human
—
AC1 ↓
c1
1.505293 / x
1.000029
1.505250
TTT-Discover
Qwen3-8B
AC2 ↑
c2
0.896280 x
1.056813
0.947200
TTT-Discover
Qwen3-8B
CP26 ↑
sum of radii
2.635 x
1.000373
2.635983
ThetaEvolve
R1-Qwen3-8B
Hadamard ↑
det. ratio
x
0.935673
0.935673
Best human
—
Appendix
Table 7: Reference scores uτ of the 27B campaign. x is the evaluator’s combined score (higher is better); f maps it to the native metric of Table 3 .
Task
Harness
Spec hash
Tools
Skills
Best program
Proposer’s prompt policy
CP26 ↑
r13/c06
128394fe5159501a
2
2
2.635983 (r18)
preflight–repair–rank loop; transform as comparator
Table 8: The two final 27B harnesses. Best program: the campaign’s retained program in native units (Table 7 ) and the round that produced it.
Round
Components of the round’s best candidate
Promoted
Harness score
0
Appendix
Table 9: Circle packing: lineage of the final harness. Harness score (combined; native =2.635x ) after each round, and the generated components of the round’s best candidate: tools , skills , and prompt edits . Shaded: the round that produced the final harness.
Open-ended scientific discovery often requires repeatedly proposing and evaluating candidate solutions. LLM-based systems can support this process by generating and refining executable solutions from verifier feedback. Methods such as TTT-Discover use test-time training (TTT) to update the solution-generating LLM from verifier feedback, adapting its generation policy to improve subsequent proposals on the target problem. However, this becomes expensive when reliable execution requires a large model, since training must maintain gradients, optimizer states, and policy statistics while repeatedly generating long, structured outputs. It also complicates credit assignment: outcome-level verifier feedback must jointly evaluate the high-level strategy and its low-level implementation. In this work, we introduce Guidance-TTT, which separates these roles. A compact guidance model is trained at test time to propose high-level strategic changes, while a frozen execution model implements them as complete executable solutions. At each step, the system selects a promising previously discovered solution, proposes a change, executes and verifies it, and updates only the guidance model using an adaptive group-relative RL objective. This concentrates test-time learning on short strategic decisions while retaining the implementation capability of a substantially stronger model without adapting it. Without web access, Guidance-TTT produces strong solutions across four distinct domains: combinatorial optimization (Polyomino Packing), heuristic programming (AHC058), machine learning (Lasso), and GPU kernel optimization (TriMul). Across these tasks, it outperforms the best solutions reported in prior work while remaining competitive with state-of-the-art results on public online leaderboards. Code is available at https://github.com/Human-Agent-Society/reef/tree/guidance-ttt-support.
Chonghe Jiang, Ao Qu, Siyuan Liu +9
Massachusetts Institute of Technology · Singapore-MIT Alliance for Research and Technology · Hong Kong Polytechnic University +6
Autonomous discovery systems such as OpenEvolve and TTT-Discover are often used as general-purpose harnesses. However, in practice these are composite systems combining several design choices about archives, parent selection, exploration, and budget allocation into a single recipe. Because discovery runs are expensive and inherently stochastic, existing harnesses are often compared using too few independent trials to distinguish key methodological improvements from run-to-run variance. We systematically decompose OpenEvolve-style evolutionary search and the TTT-Discover search harness into its constituent components and systematically evaluate 30 budget-matched harnesses across 12 model-problem pairs using more than 3.1 million LLM rollouts and repeated-trial statistical analysis. Our results show that discovery harnesses have a generalization problem: No fixed harness is reliably superior across the evaluated model-problem pairs, and variants of OpenEvolve generally underperform simpler alternatives. Thus, harness choice is better viewed as a hyperparameter rather than as a universal recipe, and should be tailored to the specific problem and underlying model. We also find that early discovery progress predicts final performance, and use this property to present a budget-matched adaptive-allocation experiment that starts multiple harnesses, prunes weak partial runs, and reallocates compute to stronger survivors, outperforming both commitment to a randomly sampled fixed harness and a non-adaptive harness ensemble. Together, these results motivate shifting from fixed harness selection to online adaptation guided by early performance. We release all run pools including baseline null distributions for every model-problem pair as reusable statistical infrastructure against for future harness proposals.
The performance of large language model (LLM) systems depends not only on model weights, but also on their harness: the code that determines what information to store, retrieve, and present to the model. Yet harnesses are still designed largely by hand, and existing text optimizers are poorly matched to this setting because they compress feedback too aggressively. We introduce Meta-Harness, an outer-loop system that searches over harness code for LLM applications. It uses an agentic proposer that accesses the source code, scores, and execution traces of all prior candidates through a filesystem. On online text classification, Meta-Harness improves over a state-of-the-art context management system by 7.7 points while using 4x fewer context tokens. On retrieval-augmented math reasoning, a single discovered harness improves accuracy on 200 IMO-level problems by 4.7 points on average across five held-out models. On agentic coding, discovered harnesses surpass the best hand-engineered baselines on TerminalBench-2. Together, these results show that richer access to prior experience can enable automated harness engineering.