Posts Tags Categories About

HARNESS² Paper Notes: Recursive Agent Harnessing for an Open World Without Ground-Truth Verifiers

A deep dive into Google Cloud AI Research's HARNESS²: how task-level contrastive recursion (Propose-Probe-Compose) and a harnessing-level experience library evolve agent harnesses in open-world streams without ground-truth verifiers, with interactive explorers and original paper figures.

#Agent Harness #Recursive Self-Improvement #LLM Agent #Test-Time Scaling #Open World
HARNESS² Paper Notes: Recursive Agent Harnessing for an Open World Without Ground-Truth Verifiers
On this page

Paper: HARNESS²: Recursive Agent Harnessing for an Open World (arXiv:2610.14224v1) · Ruiyao Xu (Northwestern University), Yanfei Chen et al. (Google Cloud AI Research) · Oct 12, 2026 · github.com/google-research/harness2

As LLM agents move beyond coding into multi-file financial reconciliation, office deliverables, and high-stakes legal review, engineering teams hit two walls immediately: at deployment time there is no ground-truth verifier to guide harness edits, and task-specific patches tuned on one job quickly turn into distracting noise on the next.

HARNESS² from Google Cloud AI Research solves this by cleanly decoupling the Execution Harness (which solves the task) from the Improvement Harness (which learns how to improve harnesses). Every new task resets to a clean base harness $H_0$, customizes it on the fly through controlled behavioral contrast, and—after submission—distills only evidence-backed executable components and lessons into an append-only Harness Improvement Library.

WorkBuddy-Bench (GLM-5)
+11.5 pts
A single step ($k=1$) lifts GLM-5 from 64.2 → 75.7, beating Gemini 3.5 Flash’s base harness (72.4); $k=5$ reaches 79.6.
LAB Legal Partial (GLM-5)
+11.8pp
Single-step gain from 59.6% → 71.4%; parallel scaling ($k=5$) climbs further to 78.1%.
Removing Skills (C6)
-5.3 pts
Largest ablation drop across all 8 components; removing all prompt components drops only -1.5 pts.
Self-Edit (Opus 5)
+5.5 pts
Even Claude Opus 5 editing itself gains on JobBench (62.4 → 67.9), proving gains are not merely strong-to-weak distillation.

1. Background: Two Walls of the Open World

Real-world agent performance follows a deceptively simple equation: $\text{Agent} = \text{Model} + \text{Harness}$ (see our earlier Harness Engineering overview). Even with frozen model weights, the surrounding execution harness—prompts, guardrails, memory, skills, tool guidance, deterministic scripts, subagents, and middleware—can make or break performance on the exact same task.

Moving harness Recursive Self-Improvement (RSI) from closed benchmarks into an open world (a non-repeating stream of unseen tasks) runs straight into two tightly coupled walls:

  1. No Ground-Truth Verifiers at Test Time: Offline harness optimizers (Meta-Harness, AHE) rely on training tasks and unit tests to ship one static harness that degrades under distribution shift. Blindly editing harnesses online without execution evidence is even worse—on WorkBuddy-Bench Code, direct editing without a library drops scores from 73.4 down to 63.2 (-10.2).
  2. Task-Specific RSI Fails to Generalize: Stateless test-time methods (Harness Scaling) discard everything after each task and repeat the same mistakes, while methods that carry over the patched execution harness directly (TTHE) pollute future tasks with single-case patches.
ParadigmRepresentativeOptimization TimingNeeds Ground TruthCross-Task TransferOpen-World Limitation
Offline SearchMeta-HarnessOffline pre-deployYesShips one static harnessFails under unseen task distribution shifts
Stateless Test-TimeHarness ScalingOnline per taskNoNone (restarts every task)Repeats pitfalls; regresses easily without contrast
Carry-Over HarnessTTHEOnline batchedProxy / testsInherits patched execution harnessTask-specific patches turn into noise on shift
Two-Level RecursionHARNESS² (Ours)Online per taskNo (behavioral contrast)Reset to $H_0$; grow Improvement LibraryCustomizes per task while accumulating verified craft
Core Insight: From a Swiss Army Knife to a Craftsman + Tool Wall
Instead of cramming every domain rule into one static “Swiss Army knife” harness—bloating context and creating conflicting instructions—HARNESS² cultivates a craftsman and a wall of proven tools (the Improvement Harness and Library). Every new task starts on a clean workbench ($H_0$), selectively adapts verified tools via live contrast, and hangs only evidence-backed artifacts back on the wall.

2. The Editing Surface: 8 Components & Cost Tiers

To keep harness evolution auditable and reusable, HARNESS² exposes $K = 8$ editable file-level components, making every edit a clean file diff compatible with both OpenCode and Codex.

Explore the 8 components below—filter by always-on token tax, on-demand zero-idle components, or hard runtime hooks to inspect their ablation impact and real-world usage:

Interactive Interactive Explorer: The 8 Editable Harness Components (C1–C8)
Filter by cost tier or click any component to inspect its runtime role and ablation impact

In the runtime dataflow, these 8 components span Context Construction, Tool Interface, Orchestration, and Middleware Control around the frozen base model $M$:

1. 上下文建構(Context Construction)決定什麼資訊進入模型上下文,以及何時進入C1System promptevery callsystemprompt.mdC2Guardrailsevery callguardrails.mdC3Memoryevery callLongTermMEMORY.mdC6Skillson invokeskills/<n>/SKILL.md凍結基礎模型Frozen Model M權重完全不變執行軌跡 + 交付物trajectory (τ) + deliverable (y)callresult4. 中介層控制(Middleware Control)於模型裁量之外,強制攔截每次工具呼叫與回合邊界C8Pluginplugin/<name>.tsinside tool loop無法被模型無視之硬性程式掛鉤2. 工具介面(Tool)C4Tool guidancetool_guidance.mdevery callC7Scriptsscripts/<name>.pyvia bash(確定性)3. 編排與委派(Orchestration)C5Subagentstask toolsub_agents/<n>/AGENT.md(獨立上下文視窗)
1. 上下文建構(Context Construction)C1 System prompt · systemprompt.mdevery call(常駐成本)C2 Guardrails · guardrails.mdevery call(硬性規則)C3 Memory · LongTermMEMORY.mdevery call(領域事實)C6 Skills · skills/<n>/SKILL.mdon invoke(按需呼叫 · 零常駐成本)凍結基礎模型 Frozen Model M權重完全不變 → 產出軌跡 τ 與交付物 y下方互動:工具迴圈攔截與子代理委派4. 中介層控制 & 2. 工具介面C8 Plugin · plugin/<name>.tsinside tool loop(強制攔截,模型無法跳過)工具介面(Tool Interface)C4 Tool guidance · tool_guidance.mdevery call(工具使用準則)C7 Scripts · scripts/<name>.pyvia bash(確定性程式計算與驗收)3. 編排與委派(Orchestration)C5 Subagents · sub_agents/<n>/AGENT.mdtask tool(獨立視窗 · 適合大輸入小輸出)
Figure 1 | Runtime architecture of the 8 editable execution harness components around frozen base model M.

Before any proposed harness runs, a static validator rejects the entire proposal (falling back to the base harness after one retry) if any of three rules fail:

  1. Explicit Skill Trigger Line: Every SKILL.md must be named with its trigger condition in always-on text (systemprompt.md or guardrails.md), otherwise the model will never invoke it.
  2. No Jinja Delimiters in Always-On Text: {{ or statement tags are forbidden to prevent pre-run template rendering crashes.
  3. Self-Contained Scripts: Every referenced script must ship inside the proposal, with skill-specific helpers placed under skills/<skill-name>/scripts/.

3. Core Architecture: Two-Level Recursion

Operating over a one-pass deployment stream, HARNESS² couples an inner Task-Level Recursion (starting from a clean $H_0$ while keeping the improvement harness $R_t$ frozen) with an outer Harnessing-Level Recursion (distilling verified artifacts into $R_{t+1}$ after submission):

任務層遞迴(Task-Level Recursion)— 任務 t(改進外殼 Rₜ 保持凍結)每題重置初始外殼 H₀執行基準 Rollout取得參考軌跡 e⁰暴露真實弱點1. Propose 提案INV 通則流程派流程、工具與驗證DOM 領域專業派領域口徑與規則2. Probe 探測相同模型與環境實跑候選外殼產出行為對比3. Compose 合成檢視基準、diff 與軌跡只合併有證據的改動(無證據則 KEEP_BASE)實跑合成外殼 H'盲選裁判(Final Selector,僅 k > 1)匿名比對渲染後成品 · 隔離外殼、軌跡與分數交卷交付物 y + 採納外殼 H*ₜ完整改殼過程寫入步驟紀錄 DₜDₜ改殼層遞迴(Harnessing-Level)經驗反思器(Reflector)不以盲選勝負論英雄,逐元件歸因<edits> 標記 helped / hurt / confounded有實證才寫 <experience>,否則 NO_ENTRY改進外殼/改殼經驗庫(Rₜ₊₁)Append-only 獨立條目資料夾存真實可執行外殼樹 H*ₜ(非摘要)+ EXPERIENCE.md + index 索引進入任務 t + 1:執行外殼重置回乾淨 H₀(防特化補丁汙染)更新後的經驗庫 Rₜ₊₁ 持續留存,掛載於 context/library/ 指導 Propose(主要)與 Compose(輔助)
任務層遞迴(Task-Level · 任務 t)每題重置回初始外殼 H₀先跑基準 Rollout,取得參考軌跡 e⁰1. Propose(分軌提案)INV 通則流程派流程、工具與驗證DOM 領域專業派領域口徑與規則2. Probe(受控探測)相同模型與環境實跑候選,製造行為對比3. Compose(證據導向合成)只合併有軌跡支持的改動;無證據則 KEEP_BASE盲選裁判(k > 1)→ 交付物 y + H*ₜ只看匿名成品,隔離外殼、軌跡與分數完整步驟紀錄 Dₜ改殼層遞迴(Harnessing-Level)經驗反思器(Experience Reflector)逐元件歸因 <edits>(含 confounded)有實證才寫 <experience>,否則 NO_ENTRY改進外殼/改殼經驗庫(Rₜ₊₁)Append-only 存真實外殼樹 H*ₜ + EXPERIENCE.md更新 index 索引,舊條目不覆寫↺ 進入任務 t + 1執行外殼重置回 H₀;Rₜ₊₁ 唯讀掛載指導下一題
Figure 2 | Two-level recursive architecture of HARNESS²: inner behavioral contrast for the current task, outer reflection into the append-only library.

3.1 Task-Level Recursion: Propose → Probe → Compose

HARNESS² structures each improvement step as a controlled A/B experiment: Propose (scoped editors) → Probe (controlled execution) → Compose (evidence-gated merge). Step through the real JobBench Producers task1 case study below (jumping from 43.1 → 77.8, +34.7 pts) and test the budget calculator for $k = 1\dots 5$:

Interactive Interactive Stepper: Two-Level Recursion (Producers Task1) + Budget Calculator
Step through Step 0–4 to watch H₀ and Rₜ evolve, or slide k to compare Parallel vs. Sequential rollouts

Formally, one contrastive improvement step is defined as (Equation 1):

$$(H', e', \xi) = \Phi(q_t, H, E; R_t)$$

Given task $q_t$, current harness $H$ (initially $H_0$), in-task history $E$, and frozen improvement harness $R_t$, $\Phi$ outputs the composed harness $H’$, its execution record $e’ = (\tau, y)$, and the step trace $\xi$. The Composer rejects speculative edits—dropping anything that causes empty deliverables and explicitly encouraging KEEP_BASE whenever trajectory contrast is weak.

3.2 Scaling Budget (k > 1): Parallel vs. Sequential Recursion

For larger test-time budgets ($k = 5$ in main experiments), HARNESS² offers Parallel and Sequential recursion with identical compute budgets at any $k$ (e.g., at $k = 3$, both spend 12 executor rollouts, 6 editors, and 3 composers):

(a) 平行遞迴 Parallel(k = 3)— 寬度海選+共享證據池混搭算力帳:3 基準 + 6 探測 + 3 實跑 = 12 次3 次基準執行Base-1 (H₀)Base-2 (H₀)Base-3 (H₀)整包共享基準池 B6 個平行編輯器(皆讀取全部 3 條基準)INV-1, INV-2, INV-33 份通則流程候選DOM-1, DOM-2, DOM-33 份領域專業候選6 次平行探測每個候選各實跑 1 次共享大證據池 P集中 3 基準+6 候選與探測軌跡3 個獨立合成器(皆看全池,反共識押注)Composer 1 → H'₁Composer 2 → H'₂Composer 3 → H'₃3 次實跑產出 3 份最終交付物(可含 KEEP_BASE)盲選裁判匿名洗牌成品對照 source/選出 1 份交卷反查得 H*ₜ(b) 序列遞迴 Sequential(k = 3)— 深度接力修正+檢查點保留算力帳:3 基準 + 3×(2 探測 + 1 檢查點) = 12 次3 次基準執行H⁽⁰⁾ = H₀固定共享底稿全程保留掛載 context/第 1 輪(在 H₀ 上改)1 INV + 1 DOM 提案→ 2 次探測 → 1 合成器檢查點 H⁽¹⁾ 實跑產出 on-policy 證據 e⁽¹⁾第 2 輪(在 H⁽¹⁾ 上改)按需讀取檔案系統歷史→ 2 次探測 → 1 合成器檢查點 H⁽²⁾ 實跑支援跨輪合併或回滾舊版第 3 輪(在 H⁽²⁾ 上改)統整全歷史紀錄與軌跡→ 2 次探測 → 1 合成器檢查點 H⁽³⁾ 實跑不強迫交最後一輪盲選裁判從已實跑檢查點與基準成品中盲選 1 份交卷避免後面改歪
(a) 平行遞迴 Parallel(k = 3 · 共 12 次)3 次基準執行(Base-1, 2, 3)整包構成共享基準池 B6 個平行編輯器(3 INV + 3 DOM)6 個編輯器皆看全部 3 條基準軌跡6 次探測 → 倒進共享大證據池 P彙整 3 基準+6 候選與實跑軌跡3 個獨立合成器各自看全池混搭產出 H'₁, H'₂, H'₃ 並各實跑 1 次(3 次)盲選裁判(Final Selector)比對匿名渲染成品,挑出 1 份交卷並反查 H*ₜ(b) 序列遞迴 Sequential(k = 3 · 共 12 次)3 次基準執行(H⁽⁰⁾ = H₀)作為共享底稿寫入檔案系統 context/第 1 輪:1 INV + 1 DOM → 2 探測 → H⁽¹⁾實跑檢查點 H⁽¹⁾,留下 on-policy 證據 e⁽¹⁾第 2 輪:在 H⁽¹⁾ 上改 → 2 探測 → H⁽²⁾按需讀檔查歷史,支援跨輪合併或回滾第 3 輪:在 H⁽²⁾ 上改 → 2 探測 → H⁽³⁾實跑檢查點 H⁽³⁾,不假設最後一輪一定最好盲選裁判(Final Selector)從已實跑的檢查點與基準成品中匿名挑出 1 份
Figure 3 | Parallel vs. Sequential recursion at budget k = 3. Both consume 12 executor rollouts and feed into the same blind Final Selector.
  • Parallel (Pool-and-Aggregate): Runs $k$ baselines into a shared pool $B$ so all $2k$ editors can separate systematic flaws from sampling noise, probes all $2k$ candidates into a shared evidence pool $P$, and lets $k$ independent Composers cross-pollinate under an anti-consensus directive (“Do not aim for the consensus answer — commit to the harness you can defend”).
  • Sequential (Iterative Refinement): Chains $k$ rounds ($H_0 \to H^{(1)} \to \dots \to H^{(k)}$) so later rounds see on-policy checkpoint evidence and can rescue earlier ideas or roll back regressions. All traces and diffs stay mounted under context/ for on-demand file reads rather than overflowing the context window.

3.3 Final Blind Selector & Rendering Blind Spots

For $k > 1$, a Final Selector chooses one deliverable from anonymized, shuffled Markdown renderings (context/candidates/<random_id>.md) alongside context/task.md and context/source/, with complete isolation from harnesses, traces, and rubrics. It evaluates strictly in six priority tiers: Delivery → Conformance → Fidelity → Internal Consistency → Operational Fitness → Finish, and is explicitly told that choosing the unmodified baseline is valid.

Large spreadsheets are rendered to Markdown with truncation markers, and raw binary deliverables are not attached to the selector. The paper does not specify the exact candidate pool formula or spreadsheet renderer implementation (inferred: evaluated cell values are read to expose blank formulas).

Because the selector cannot run hidden unit tests, Figure 14 documents real failure cases: picking a cleaner-looking 55-point candidate over a 95-point one on WB-code, and selecting a 70-point WB-web candidate out of a pool where four others scored 100.

3.4 Harnessing-Level Recursion: Reflection & Safe Reuse

After submission, the Experience Reflector audits the full record $D_t$ under a strict anti-pollution rule: “The candidate selected by the blind judge is not the only evidence.” It outputs per-component <edits> attributions (helped, hurt, no observed effect, or confounded whenever simultaneous edits prevent clean attribution) and distills at most one transferable <experience> only when solid contrast exists (otherwise NO_ENTRY).

$$R_{t+1} = \mathrm{UPDATE}(R_t, H_t^*, D_t)$$

The library is domain-scoped and append-only, storing real executable harness trees (H*ₜ) plus EXPERIENCE.md and an index rather than prose summaries. On task $t+1$, editors must physically copy reused files into the workspace and treat any domain thresholds or column mappings inside them as hypotheses to be re-verified against the new baseline trace.


4. Key Experimental Results & Engineering Trade-Offs

Evaluated across three random task orderings on WorkBuddy-Bench (Code / Web / Office), JobBench (long-horizon multi-file projects), and LAB (Harvey legal benchmark, Partial pass rate) using frozen Gemini 3.5 Flash and GLM-5 executors under OpenCode and Codex:

4.1 Main Results & Baselines

Figure 1 | Overall performance across WorkBuddy-Bench, JobBench, and LAB (original paper Figure 1).
Figure 1 | Overall performance across WorkBuddy-Bench, JobBench, and LAB (original paper Figure 1).
Representative Setup (OpenCode)Base HarnessHARNESS² ($k=1$)+ Parallel ($k=5$)Key Takeaway
WorkBuddy-Bench (GLM-5)64.275.7 (+11.5)79.6 (+3.9 more)Single step beats Gemini 3.5 Flash base (72.4)
WorkBuddy-Bench (3.5 Flash)72.477.5 (+5.1)80.8 (+3.3 more)Surpasses unmodified Claude Code across domains
JobBench (3.5 Flash)31.536.0 (+4.5)39.0 (+3.0 more)Steady scaling on long-horizon projects
LAB Partial (GLM-5)59.671.4 (+11.8pp)78.1 (+6.7pp more)Substantial gains on high-stakes legal review

Without contrastive probing and a library, online baselines frequently regress: ReasoningBank drops up to -6.6 pts on coding, and un-scoped Harness Scaling underperforms the base harness in 7 of 12 benchmark setups.

4.2 Ablations: Skills & Scripts Dominate Prompts

Mechanism ablation (Table 3, $k=1$) confirms every pillar matters: removing the library drops -3.1 / -1.8 (WorkBuddy / JobBench), removing INV/DOM scoping drops -2.9 / -3.7, and skipping composition drops -1.6 / -1.9.

Component ablation (Table 6, $k=5$) delivers the sharpest practical lesson:

  • Removing Skills (C6): -5.3 pts average drop (heaviest impact)
  • Removing Scripts (C7): -3.7 pts average (-7.4 pts on Office!)
  • Removing all Prompt components: only -1.5 pts average

4.3 Same-Model Self-Editing & Cross-Model Transfer

To rule out strong-editor distillation, Figure 8 evaluates same-model executor & editor ($k=2$) across five models up to Claude Opus 5—all five improve across all three benchmarks (GLM-5 +13.7 on LAB; Opus 5 +5.5 on JobBench). Meanwhile, Figure 12 shows harnesses refined for Flash transfer directly to GLM-5 (+17.3 pts on WB-code).

Figure 8 | Same model as executor and editor (k = 2): consistent gains across all five models and three benchmarks (original paper Figure 8).
Figure 8 | Same model as executor and editor (k = 2): consistent gains across all five models and three benchmarks (original paper Figure 8).
Figure 12 | Cross-model transfer: a harness refined for Gemini 3.5 Flash boosts GLM-5 across all WorkBuddy-Bench domains (original paper Figure 12).
Figure 12 | Cross-model transfer: a harness refined for Gemini 3.5 Flash boosts GLM-5 across all WorkBuddy-Bench domains (original paper Figure 12).

4.4 Compute Budget & The Production Escape Hatch

Full online HARNESS² is heavy: at $k=5$, WorkBuddy-Bench exceeds 10M tokens/task and JobBench exceeds 100M tokens/task—making full online loops unsuitable for low-latency chat, though still Pareto-superior to offline Meta-Harness (Figure 6).

Figure 6 | Compute–performance Pareto trade-off on JobBench and WorkBuddy-Bench vs. offline Meta-Harness (original paper Figure 6).
Figure 6 | Compute–performance Pareto trade-off on JobBench and WorkBuddy-Bench vs. offline Meta-Harness (original paper Figure 6).

Crucially, Direct Editing w/o Execution (Figure 7 left)—skipping baseline and probe rollouts entirely and assembling a one-shot edit from the accumulated library—recovers strong gains with minimal latency:

Figure 7 | Harnessing-level recursion: direct one-shot editing from the library (left) and cross-benchmark JobBench → WorkBuddy transfer (right) (original paper Figure 7).
Figure 7 | Harnessing-level recursion: direct one-shot editing from the library (left) and cross-benchmark JobBench → WorkBuddy transfer (right) (original paper Figure 7).
Direct Online Editing (No Baseline/Probe, 3.5 Flash + OpenCode)WB-codeWB-webWB-office
Base harness73.469.974.0
Blind edit w/o library63.2 (-10.2)65.0 (-4.9)77.1 (+3.1)
With $k=1$ library73.8 (+0.4)72.6 (+2.7)77.5 (+3.5)
With $k=5$ library74.3 (+0.9)74.3 (+4.4)79.1 (+5.1)

4.5 Strengths vs. Real Limitations

Figure 14 | Nine failure cases in recursive harnessing, exposing blind-selection mistakes and shared-premise bias (original paper Figure 14).
Figure 14 | Nine failure cases in recursive harnessing, exposing blind-selection mistakes and shared-premise bias (original paper Figure 14).
Core Strengths
  • Positive expected value without verifiers: Avoids online regression and achieves a better compute–score Pareto frontier than offline Meta-Harness.
  • Genuine cross-benchmark & cross-model transfer: JobBench library adds +2.9 pts to WorkBuddy Office; Flash harnesses lift GLM-5 Code by +17.3 pts.
Unavoidable Limitations
  • Heavy test-time compute & latency: 10M–100M tokens per task at $k=5$ restricts full online loops to asynchronous, high-value jobs.
  • Blind-selection ceiling & shared bias: Truncated renderings can mislead the selector, and same-model candidates can share the same false premise.
  • Unbounded library growth: Pure append-only storage lacks deduplication, retirement, and large-scale retrieval.

5. Three Engineering Takeaways to Apply Today

  1. Respect the Harness Cost Hierarchy — Stop Stuffing the System Prompt: Reach first for on-demand SKILL.md files (with explicit trigger lines) and deterministic Python Scripts; isolate heavy-input investigations in Subagents; enforce unignorable rules via Middleware Plugins (e.g., deliverable_watchdog.ts injecting a warning directly into tool output after 25 calls with an empty output/); treat always-on prompts as a last resort.
  2. Decouple Online Execution from Offline Library Growth: Keep production on a clean $H_0$, run expensive Propose-Probe-Compose asynchronously in the background on failed or high-value traces to store real executable files + EXPERIENCE.md, and assemble lightweight one-shot edits online—always borrowing workflows while re-verifying workspace facts.
  3. Tune Agents Like Controlled Experiments: Separate procedural/tool issues (INV) from domain rules (DOM), tie every edit to a concrete trajectory failure (defaulting to KEEP_BASE otherwise), and label multi-edit ambiguity honestly as confounded or NO_ENTRY rather than polluting your team’s knowledge base with fake causality.
Type to search all articles