Harness optimization improves long-horizon agents by refining the prompts, tools, memory, and hooks around a frozen model. Offline methods can learn from completed trajectories, but deploy one shared harness that may overfit training tasks and cannot react to evidence revealed during a new run. Online evolution can adapt before, during, or after one run through an evolver, but may have to reason about every intervention from scratch or rely on verifier feedback that is usually unavailable at test time. We introduce Meta2, which moves offline optimization one level up: rather than optimizing a shared harness, it learns reusable knowledge for harness evolution and applies it within each task online. Offline, Meta2 learns a textual Meta-Skill M by contrasting training rollouts of the same task agent under three configurations: without an evolver, with an evolver guided by the current version of M, and with an evolver given privileged verifier information available only in training. Contrasts in trajectories and outcomes are aggregated across tasks to refine M into reusable guidance on when and how to evolve, when to leave the harness unchanged, and which interventions to avoid. Online, an evolver combines the frozen M with emerging trajectory evidence to decide whether to KEEP the harness unchanged or EVOLVE it through a task-local edit. Each edit applies to the rest of the same run without resetting its environment or progress. Thus, evolution guidance transfers across tasks while harness edits remain task-local, and held-out verifier feedback is never available to the evolver. On two long-horizon benchmarks, Terminal-Bench 2.1 and DeepSWE 1.1, Meta2 achieves the highest performance among evaluated methods with GPT-5.6-Terra, reaching 81.00% and 44.44%, respectively. Ablations support the value of contrastive evolution guidance and keeping online harness edits task-local.
Figures & tables
Figure 1: Motivation and overview of Meta 2 . Offline evolution produces a shared harness that may overfit training tasks and cannot adapt to evidence revealed during a new run, while online methods face limitations in intervention timing, knowledge guidance, and verifier availability. By moving offline optimization one level up, Meta 2 learns a reusable Meta-Skill from contrastive training rollouts and freezes it to guide task-local harness evolution at checkpoints online, without access to verifier feedback at test-time. Across both evaluated benchmarks, this design yields the highest performance among the compared methods.
Figure 2: Design of Meta 2 : offline knowledge learning, online harness evolution and format of Meta-Skill. Offline, rollouts are collected under three conditions: the task agent alone (A), evolution guided by the current Meta-Skill (B), and evolution with verifier knowledge (C). Deterministic pairing of terminal outcomes yields act , avoid , and hold contrasts. LLM-based reflection and cross-task aggregation distill these contrasts into reusable lessons, which iteratively update the Meta-Skill. Online, the frozen Meta-Skill guides an evolver LLM to retain or modify the harness at deterministic checkpoints, while the task agent continues along a single trajectory in one environment. Meta-Skill entries specify when, how and why to intervene with reference examples.
Method
Terminal-Bench 2.1
DeepSWE 1.1
Perf.
Cost ($)
Perf.
Cost ($)
Offline
Online
Full
Offline
Online
Full
Human-Designed Harnesses
NexAU Seed
66.33
–
34.09
34.09
34.67
–
62.67
62.67
Codex CLI
68.33
–
56.59
56.59
31.11
–
136.53
136.53
mini-swe-agent
67.33
–
41.08
41.08
29.33
–
68.87
68.87
Table 1: Main performance and cost comparison. Results with GPT-5.6-Terra (medium reasoning) on Terminal-Bench 2.1 (mean@5) and DeepSWE 1.1 (mean@3). Parentheses report the point change from the NexAU seed; costs are aggregate US dollars over each evaluation.
Method
Perf.
Cost ($)
Offline
Online
Full
NexAU Seed
70.00
–
16.83
16.83
Self-Evolution Methods
ReasoningBank
69.33 (-0.67)
8.08
21.21
29.29
ACE
65.00 (-5.00)
58.30
21.56
79.86
TF-GRPO
66.33 (-3.67)
37.15
19.86
57.01
Table 2: Robustness across backbones. Terminal-Bench 2.1 test-set results with DeepSeek-V4-Flash-0731 (high reasoning), reported as mean@5. Parentheses report the point change from the NexAU seed; costs are aggregate US dollars over each evaluation.
Figure 3: Checkpoint-interval sensitivity. Performance on Terminal-Bench 2.1 versus log-scaled online cost.
Figure 4: Component ablations. The first four settings evaluate the online evolver and two Meta-Skill construction methods. The fifth retains online edits across tasks instead of resetting to h(0) .
Appendix figures & tables9 assets
Supplementary material from the paper’s appendix.
Appendix
Symbol
Meaning
ξ=(x,Ex,Vx)
Task instance: public instruction, interactive environment, and verifier.
st,ot,at
State, observation, and action at step t .
τ≤t
Partial trajectory through step t .
πθ
Frozen task-agent policy.
h(0)
Seed harness.
h(k)
Harness after decision k .
Appendix
Table 3: Core notation used in the main text.
Benchmark
Training tasks
Test tasks
Runs per test task
Terminal-Bench 2.1
29
60
5
DeepSWE 1.1
38
75
3
Appendix
Table 4: Task counts and evaluation repetitions for each benchmark.
Figure 5: Early intervention guided by an act entry (Terminal-Bench 2.1). The task requires a Git push to deploy hello.html to a web server on port 8080. At the first checkpoint, the evolver without Meta-Skill specifies an implementation and requests validation only “where feasible.” The task agent tests in a temporary sandbox but does not run the installer in the task environment; the evolver accepts the result despite the missing /git/server directory and inactive service. With Meta-Skill, entry E-02 guides the evolver to require end-to-end evidence: a clone, commit, and push followed by a fresh HTTP request confirming that the deployed page returns “hello world.” The task agent installs the service and verifies this sequence, after which the evolver chooses KEEP at the subsequent and terminal checkpoints.
Figure 7: Avoiding premature redirection with an avoid entry (Terminal-Bench 2.1). By checkpoint t3 , both task agents have identified the bundled Rave warrior as a promising candidate, but its performance against stone remains below the required threshold. Without Meta-Skill, the evolver uses its final notice to redirect exploration toward other bundled warriors. The task agent constructs an Aeka–Rave hybrid but finishes with 74 wins against stone, one short of the required 75. With Meta-Skill, entry E-06 discourages changing the search strategy while exploration continues to make progress. The evolver chooses KEEP at t3 and subsequent checkpoints, allowing the task agent to continue tuning Rave and satisfy all five performance thresholds.
Terra
DeepSeek
Method
Terminal-Bench 2.1
DeepSWE 1.1
Terminal-Bench 2.1
NexAU Seed
66.33±2.17
34.67±1.33
70.00±2.64
Codex CLI
68.33±5.14
31.11±3.08
–
mini-swe-agent
67.33±4.18
29.33±3.53
–
Pi agent
69.00±4.94
39.11±6.71
–
DeepSeek Harness
68.00±3.42
34.22±4.68
–
Appendix
Table 5: Mean performance ± sample standard deviation across repeated evaluation runs (percentage points). Terminal-Bench 2.1 uses five repetitions over 60 tasks, and DeepSWE 1.1 uses three repetitions over 75 tasks. Terra denotes GPT-5.6-Terra, and DeepSeek denotes DeepSeek-V4-Flash-0731. Dashes indicate settings not evaluated.
Figure 9: Performance versus full cost with GPT-5.6-Terra. Full cost includes one-time offline construction and online evaluation costs, plotted on a logarithmic horizontal scale. Dashed lines connect the non-dominated performance–cost point estimates for Terminal-Bench 2.1 (left) and DeepSWE 1.1 (right).
Method
Offline optimization
Pre-run evolution
Within-run evolution
After-run evolution
Test-time verifier requirement
Meta-Harness [ 20 ]
✓
×
×
×
Not required
AHE [ 24 ]
✓
×
×
×
Not required
JIT-Agent [ 57 ]
✓
✓
×
△
Mode-dependent
ACE [ 61 ]
✓
×
×
✓
Mode-dependent
Harness-R1 [ 39 ]
✓
×
×
✓
Required
Continual Harness [ 18 ]
×
×
✓
△
Not required
Appendix
Table 6: Evolution regimes and test-time verifier requirements of representative methods. ✓ denotes explicit support, △ restricted support, and × no support in the described protocol. Verifier requirements refer to deployment-time adaptation rather than offline training or final evaluation.
Table 7: Evolution regimes by timing, evidence, and update scope. Online edits occur pre-run, within-run, or after-run; after-run updates target either the next attempt or later tasks. Meta 2 learns reusable M offline and applies task-local edits within-run.
Field
Content
ID / title
A stable identifier for citation and a short title describing the situation.
Type
act supports intervention; hold supports leaving the run unchanged; avoid discourages a particular intervention.
Time point
start , during , or end , indicating the execution stage to which the entry applies.
When to refer
An observable condition that the evolver can assess from the task instruction, trajectory, permitted workspace observations, or channel budget.
Guidance
The harness action to take or avoid, including the channel and message content when applicable.
Why
The pattern observed across training tasks that supports the guidance, including relevant qualifications.
Appendix
Table 8: Fields of a Meta-Skill entry. Each entry specifies an observable situation, evolution guidance, and supporting training examples.
Salesforce Research · University of North Carolina at Chapel Hill, conducted this work during an internship at Salesforce Research · University of Wisconsin–Madison +1