Meta2

Preprint · 2026Long-horizon agents · Harness evolution · Self-improvement

Meta2

Precomputing Reusable Knowledge for Online Harness Evolution in Long-Horizon Agents

Offline harness optimization ships one shared harness that cannot react to a new run. Online evolution can react, but it reasons about every intervention from scratch. Meta2 moves offline optimization one level up: instead of optimizing the harness, it learns a reusable Meta-Skill that tells an online evolver when and how to edit the harness, and when to leave it alone. Every edit stays local to the run that motivated it.

81.00%
Terminal-Bench 2.1
GPT-5.6-Terra, mean@5
44.44%
DeepSWE 1.1
GPT-5.6-Terra, mean@3
+14.67
pts over the seed harness on Terminal-Bench
+9.77
pts over the seed on DeepSWE, where most evolvers fail to improve
77.67%
Terminal-Bench with DeepSeek-V4-Flash, also #1
0
held-out verifier signals used by the evolver at test time

01Overview

Precompute how to adapt,
then adapt locally as the task unfolds.

Long-horizon agents act through a harness: prompts, context policy, tools, memory and hooks wrapped around a frozen model. The need to change it often appears during execution. A missing tool shows up when the agent reaches for it; a one-time warning turns out to need a recurring check.

Offline, Meta2 learns a textual Meta-Skill M by contrasting training rollouts of the same task agent under three configurations: (A) no evolver, (B) an evolver guided by the current M, and (C) an evolver given privileged verifier information available only during training. These contrasts are aggregated across tasks into guidance on when to evolve, when to hold, and which interventions to avoid.

Online, an evolver combines the frozen M with emerging trajectory evidence to KEEP the harness or EVOLVE it through a task-local edit. The task agent continues in the same environment with its progress intact, and held-out verifier feedback is never available to the evolver.

Motivation and overview of Meta²: offline evolution, online evolution, and Meta² with headline results
Figure 1. Offline evolution produces a shared harness that may overfit training tasks and cannot adapt to a new run, while online methods are limited in intervention timing, knowledge guidance and verifier availability. Meta2 learns a reusable Meta-Skill from contrastive training rollouts and freezes it to guide task-local harness evolution at checkpoints, with no verifier feedback at test time.

02When should a harness evolve?

An evolver g revises the harness from evidence. Methods differ in when the edit is chosen, what evidence it sees, and which executions it affects. Each regime gives up something.

BEFORE DEPLOYMENT

Offline

Learns from completed training trajectories and verifier outcomes, then ships one harness h⋆ shared by every target task.
Fixed once execution begins; persistent edits may overgeneralize.
t = 0

Pre-run

Adapts the harness from the target instruction and initial environment before the run starts.
Cannot use evidence that only emerges during execution.
AT CHECKPOINT tk

Within-run

Sees the partial trajectory and workspace and edits the harness for the rest of the active run.
No eventual outcome feedback, and existing systems decide without guidance.
AFTER THE ATTEMPT

After-run

Uses completed trajectories and outcomes to improve the next attempt or later tasks.
Too late for the run that exposed the problem; often needs feedback.
Hybrid · ours

Meta2

Offline

Learn reusable evolution knowledge M from training trajectories and verifier feedback. M is carried across tasks.

Online · within-run

Combine M with checkpoint evidence I(k), never the outcome. Each edit δ(k) expires when its run ends.

Central questionHow can lessons from completed training runs guide selective edits during a new run, without held-out verifier feedback, and without letting one task's correction persist into unrelated tasks?

Partial information

At a checkpoint the evolver sees the trajectory, not the verdict. Acting can rescue a failing run, but it can also derail productive work. Sometimes the right move is to do nothing.

Coarse supervision

A terminal pass/fail judges a whole sequence of checkpoint decisions at once, not which individual edit helped or harmed.

Cost of reasoning from scratch

Deliberating over every evolution decision without prior knowledge adds online tokens, latency and money.

03Meta2: optimize the knowledge, not the harness

The model, seed harness h(0), checkpoint interface and edit channels stay fixed. Offline optimization changes only the evolver's reusable knowledge M.

Design of Meta²: offline knowledge learning, online harness evolution and Meta-Skill format
Figure 2. Offline, rollouts are collected under three conditions and paired into act, avoid and hold contrasts; reflection and cross-task aggregation distill these into reusable lessons that iteratively update the Meta-Skill. Online, the frozen Meta-Skill guides an evolver to keep or modify the harness at checkpoints while the task agent continues along a single trajectory in one environment. Click any figure to enlarge.
3.1 · ONLINE

Checkpoint-based harness evolution

ChallengeIntervene before an active attempt ends, without resetting its environment, discarding its trajectory, or taking over its actions.

A task agent runs from the seed harness. A separate evolver, instantiated from the same frozen model, observes the run every L steps. It receives the newly accumulated trajectory, permitted read-only workspace observations, and whether its previous edit was loaded, retained or rolled back. It then makes one binary decision:

u(k) ∈ { Keep, Evolve(δ(k)) },   δ(k) ∼ g( · | h(k−1), I(k), M )

When the agent claims completion, a terminal checkpoint also collects workspace state. KEEP accepts the artifact; EVOLVE applies a bounded correction and sends the agent back for more work.

noticereaches one worker turn
instructionpersistent standing update
hookread-only check or probe
tooladds an action to the harness
Watch a run · checkpoints every L = 5 steps · illustrative, paraphrasing entries of the learned Terminal-Bench Meta-Skill
EVOLVER
The task agent starts from the seed harness h(0)…
Reusable knowledge
MMeta-SkillFROZEN
Active harness h(0)
SEEDNexAU seed harness h(0)
One environment, one continuous trajectory. Edits shape only the remainder of this run.
3.2 · OFFLINE

Precomputing reusable evolution knowledge

ChallengeThe verifier scores the whole run, not individual checkpoint decisions. A pass or fail does not reveal which intervention helped, harmed, or was unnecessary.

A/B/C rollouts make terminal feedback informative. For each training task, the same agent, model and seed harness run under three conditions:

ATask agent alone, no evolver
BEvolver guided by the current Meta-Skill
CEvolver with privileged verifier informationTraining only. It may not pass verifier details to the agent, and audited leaks are excluded.

On hard tasks where both A and B fail, C can still produce successes, so B–C contrasts reveal recoveries the current evolver missed. Deterministic pairing of outcomes yields five contrast directions:

B✓ vs A✗→actThe current evolver's intervention helped. Evidence for a potentially useful edit.
C✓ vs B✗→actA recovery the current evolver missed. Verifier-informed evolution found a way through.
B✗ vs A✓→avoidThe current intervention hurt a run that would have passed on its own.
C✗ vs B✓→avoidEven verifier-informed evolution caused harm. Rule out that kind of edit.
A✓ + B✓→holdThe agent succeeds with or without an evolver. Leave the harness alone.

These contrasts give each candidate lesson a direction, though they do not establish the causal effect of a single checkpoint decision. Training tasks are processed in batches, and three LLM stages turn contrasts into rules:

REFLECT · frefInspect each contrastive group with its training-time verifier info; write contrast-grounded candidate entries.
AGGREGATE · faggMerge recurring patterns across tasks and strip instance-specific details.
UPDATE · fupdAdd, merge, refine or delete entries relative to the previous Meta-Skill.
M(r) = fupd( M(r−1), fagg( fref( G(r), V(r) ) ) )
3.3 · DEPLOYMENT

Freeze globally, adapt locally

ChallengeNo held-out verifier confirms whether an edit helped, and an edit motivated by one task may be wrong for another.

After the final batch, M is frozen. Every run starts from the same seed harness h(0). Online decisions, task-specific edits and outcomes are never written back to M; neither held-out verifier feedback nor an LLM-as-a-judge signal is used to update it.

CARRIED ACROSS TASKS

  • The frozen Meta-Skill M
  • Guidance on when to act, hold or avoid

DISCARDED AT RUN END

  • Every harness edit δ(k)
  • The evolver's checkpoint conversation

04Inside the Meta-Skill

The Meta-Skill is plain text: a set of entries that link observable execution conditions to decisions. Below are entries from the Meta-Skill learned on Terminal-Bench 2.1 (abridged).

Typeact · avoid · hold
Time pointstart · during · end
When to referthe observable situation to match on
Guidancewhat to do, or not do
Whywhat training runs showed
Reference examplesillustration only

05Results

Two long-horizon benchmarks, split 1:2 into train/test. Baselines: 5 human-designed harnesses, 3 self-evolution methods and 3 harness-evolution methods. Every evolution method starts from the same NexAU seed harness, and within a backbone setting all agent roles use the same model.

Seed harness Human-designed Self-evolution Harness-evolution Meta²
Method Group Perf. (%) Δ vs seed Offline $ Online $ Full $

Click a column to sort. Costs are aggregate US dollars over each evaluation, computed from per-call charges reported by a single LiteLLM proxy. Offline = one-time construction; Full = offline + online.

+14.67 / +9.77

Gains over the seed on Terminal-Bench / DeepSWE, versus +7.00 / +2.66 for Meta-Harness, the strongest harness-evolution baseline.

3 of 6

evolution baselines fall below the seed on DeepSWE (ReasoningBank, ACE, Continual Harness), and AHE only matches it. Meta2 keeps a 9.77-point gain, suggesting condition C supplies useful training examples on hard tasks.

77.67%

with DeepSeek-V4-Flash-0731, again the best, +7.67 over the seed. A separate Meta-Skill is built per backbone, so this tests robustness, not zero-shot transfer.

06Analysis

RQ2Is precomputation cost-effective when reused?

Against the offline harness-evolution methods, Meta2 achieves higher performance at lower full cost on both benchmarks. Compared with Continual Harness, it pays more up front but less online: $64.72 vs $83.48 on Terminal-Bench and $129.34 vs $155.61 on DeepSWE. The Meta-Skill is built once and reused, so later deployments pay only online cost.

Full cost = offline (one-time) + online
Cost–performance Pareto frontier on both benchmarks
Figure 3. Cost–performance Pareto frontier. With the highest observed performance among evaluated methods, Meta2 lies on the frontier on both benchmarks.

RQ3How often should the evolver check in?

Terminal-Bench 2.1 · performance vs online cost (log scale)
Hover a point. L = 5 gives the best balance: 81.00% at $64.72 online.

A moderate interval of L = 5 achieves the highest performance (81.00%) and the best observed performance–cost balance.

More frequent checkpoints cost more without helping: L = 3 and L = 1 cost $74.22 and $83.41 but score 80.33% and 79.00%. Longer intervals save a little (down to $59.10 at L = 11) but performance drops.

Across every evaluated L, Meta2 outperforms every baseline, so its advantage does not depend on the checkpoint schedule.

RQ4Which components produce the gains?

!Reset between tasks. Carrying online edits into later tasks instead of resetting to h(0) lowers performance from 81.00 → 78.33 on Terminal-Bench and 44.44 → 39.11 on DeepSWE. Edits derived from one trajectory encode task-specific interventions that do not transfer.

Adding an online evolver helps on both benchmarks. A self-distilled Meta-Skill helps on Terminal-Bench but slightly hurts DeepSWE. Contrastive Meta-Skill learning improves over self-distillation by 4.00 and 8.88 points respectively, with the largest gain on the harder benchmark.

07Case studies

Each case compares two runs of the same task with the same model, seed harness and checkpoint schedule: one evolver without a Meta-Skill and one guided by the learned Meta-Skill. Together they cover all three entry types.

Case study: configure-git-webserver
Early intervention guided by an act entry. The task requires a Git push to deploy hello.html to a web server on port 8080. Without the Meta-Skill, the evolver asks for validation only "where feasible"; the agent tests in a temporary sandbox and never runs the installer, yet the result is accepted. With the Meta-Skill, entry E-02 requires end-to-end evidence: clone, commit, push, then a fresh request that returns "hello world". The agent installs the service and verifies it, and the evolver keeps the harness thereafter. Failed → Passed.
Case study: obsidian-linter link style
Mid-run intervention guided by an act entry. The task requires a Link Style rule with independently configured linkStyle and imageStyle. At t3 both evolvers issue a notice. Without the Meta-Skill it targets parser issues from failing tests and leaves the image route unchecked, so images are wrongly converted. 58/60 hidden tests pass. With the Meta-Skill, E-02 directs attention to the unverified execution route; the evolver finds the link/image parsing interaction and the agent repairs it. 60/60.
Case study: winning-avg-corewars
Avoiding premature redirection with an avoid entry. By t3 both agents found the bundled Rave warrior, still short of the threshold against stone. Without the Meta-Skill, the evolver redirects exploration toward other warriors; the resulting hybrid ends at 74 wins against stone, one short of 75. With the Meta-Skill, E-06 discourages changing route while exploration is still advancing. The evolver keeps the harness, and the agent tunes Rave until all five thresholds are met.
Case study: path-tracing-reverse
Preserving the notice budget with a hold entry. In both runs the first command fails because file is unavailable, and the agent switches tools. Without the Meta-Skill, the evolver spends notices at t1 and t2, exhausting the channel before a substantial output mismatch appears. With the Meta-Skill, E-04 discourages a notice about the isolated tool failure, while an instruction guided by E-03 requires output comparison. Notices remain for t4–t5, and the agent reproduces the reference output. This illustrates a difference in timing rather than proving that withholding the notice decides success.

08Takeaways

01

Move offline optimization one level up

Learn reusable knowledge about how to evolve a harness rather than a single shared harness. The same knowledge supports different edits in different runs.

02

Contrasts beat successes

A/B/C rollouts turn coarse terminal outcomes into directional act / avoid / hold evidence, including recoveries found only with training-time verifier help.

03

Keep edits task-local

Freeze the Meta-Skill, reset the harness for every task. Carrying edits forward costs 2.67 and 5.33 points on the two benchmarks.

Precompute how to adapt, then adapt locally as the task unfolds.

09Cite

@misc{yuan2026meta2,
  title  = {Meta$^2$: Precomputing Reusable Knowledge for Online Harness Evolution in Long-Horizon Agents},
  author = {Yuan, Lingzhi and Cai, Yiguang and Liu, Weize and Yang, Siqi and Han, Feijiang and Lee, Yongkyun and Sehwag, Udari Madhushani and Huang, Furong},
  year   = {2026},
  note   = {Preprint},
  url    = {https://meta-square.github.io/paper.pdf}
}
Affiliations