@akshay_pachaar: Google just open-sourced Harness². (turn any harness into a self-improving system) a harness is everything wrapped arou…
Summary
Google open-sourced Harness², a plug-and-play framework that turns any agent harness into a self-improving system by recursively proposing, probing, and composing harness edits without touching model weights. Tested with Gemini 3.5 Flash and GLM-5, it outperforms fixed harnesses in a single round and carries lessons across tasks.
View Cached Full Text
Cached at: 10/18/26, 11:05 AM
Google just open-sourced Harness².
(turn any harness into a self-improving system)
a harness is everything wrapped around the model, like the system prompt, tools, memory, skills, and subagents. today a person designs it once, and the agent runs every new task with that same fixed setup.
Harness² lets the agent refine that setup for each new task on its own, with the model weights left untouched.
on every task, the agent proposes edits to its harness, runs a few candidate versions, and composes a better harness by comparing how those runs behaved.
because it learns from the differences between runs, it needs no correct answer or grader for the task.
that covers a single task. Harness² also carries what it learns from one task into the next.
after each task, it saves the harness it settled on along with the lessons that held up across the runs. the next time it refines a harness, it starts from those notes instead of from scratch.
this means every finished task makes the next round of edits more informed.
Google tested this with Gemini 3.5 Flash and GLM-5 on legal, office, and professional work benchmarks. one round of edits was enough to beat their original harnesses, and giving the agent more rounds pushed scores higher.
those extra rounds can go wide or deep. the agent either tries several candidate harnesses at once or keeps refining a single one step by step, using OpenCode or Codex to carry out the work.
you can find the Harness² repo here: https://github.com/google-research/harness2…
I wrote about a similar idea for agents already running in production, where the harness should repair itself after a failure instead of waiting for someone to debug the trace by hand.
that piece walks through how @Cometml’s Opik (open-source) closes this loop, going from a failing trace to a proposed fix to a regression test that stops the same failure from coming back. it’s quoted below.
google-research/harness2
Source: https://github.com/google-research/harness2

Recursive Agent Harnessing for an Open World
A harness is the system around a model that enables it to act as an agent: prompts, tools, memory, skills, orchestration, and more. Harnessing is the process of optimizing that system.
Harness² is a plug-and-play framework for recursive agent harnessing in an open world, where agents encounter tasks unseen during harness design. It connects two levels of recursion while keeping model weights fixed:
- Task-level recursion refines the execution harness for the current task through a contrastive Propose–Probe–Compose step: propose edits, probe their effects on the same task, and compose a refined harness from behavioral contrasts between executions, without ground-truth feedback.
- Harnessing-level recursion updates a persistent improvement harness with adopted harnesses and evidence-supported lessons from each task to guide future refinement.
Across three professional benchmarks and four model–harness configurations, a single Harness² step improves GLM-5 and Gemini 3.5 Flash over their base harnesses, with gains of up to 11.5 points on WorkBuddy-Bench, 4.5 points on JobBench, and 11.8 percentage points on LAB’s partial pass rate. Increasing the task-level recursion budget brings further gains.
The release supports parallel and sequential recursion, OpenCode and Codex executors, and JobBench, LAB, and WorkBuddy-Bench.
Video overview
https://github.com/user-attachments/assets/76b10548-b14b-4c8f-9aa5-a93662df4d56
Contents
- Video overview
- Harness components
- Install
- Run a benchmark
- Experiments
- Web access
- Results and resume
- Citation
- Contributing
- License
- Disclaimer
Harness components
Harness² exposes eight editable components around the model: system prompt, guardrails, memory, tool guidance, subagents, skills, scripts, and plugins. They control context construction, the tool interface, delegation, and behavior inside the tool loop.
Install
Use Linux, Python 3.12, and uv. From the repository root:
uv venv --python 3.12 .venv
source .venv/bin/activate
uv pip install -e '.[render]'
harness2-demo --output runs/demo --k 2
The local demo runs both recursion modes with deterministic editors and real Python executions. It requires no model credentials.
For model-backed benchmarks, install Node.js 20+, the Google Cloud CLI, and the benchmark dependencies. LAB needs Pandoc and Poppler; WorkBuddy-Bench needs Docker. Then configure your models:
cp .env.example .env
# Edit .env with your Vertex AI project and model IDs.
gcloud auth application-default login
See the setup guide for model settings, authentication alternatives, and the Codex executor.
Run a benchmark
The following example installs LAB and runs one task, then evaluates and reports its result. Model-backed runs incur API costs; start with a small task selection.
harness2-setup lab
harness2-check --bench lab
harness2 --bench lab --k 1 --mode parallel \
--only-domains antitrust-competition --max-tasks 1
harness2-judge --bench lab --k 1 --mode parallel
harness2-report --bench lab --k 1 --mode parallel
Sequential recursion runs the same commands with --mode sequential. --k is
the task-level recursion budget; see Experiments. Judging and
reporting must use the same benchmark, executor, subset, --k, --mode, and
seed as the refinement run. Add --dry-run to harness2 to preview task
selection without model calls.
| Benchmark | Tasks | Install | Guide |
|---|---|---|---|
| JobBench | Professional work | harness2-setup jb | JobBench |
| LAB | Legal work | harness2-setup lab | LAB |
| WorkBuddy-Bench | Office, web, and code | harness2-setup wb | WorkBuddy |
Choose one benchmark per command. WorkBuddy also takes --subset office,
--subset web, or --subset code on every command after setup. The
benchmark guides cover each one’s data, domains, and
grading.
Experiments
Scale task-level recursion in two ways: parallel recursion explores multiple candidate harnesses and composes refinements from their execution evidence; sequential recursion carries the refined harness and accumulated evidence through successive Propose–Probe–Compose steps.
Parallel recursion explores wider; sequential recursion refines deeper.
| Option | Behavior |
|---|---|
--k 1 | One Propose–Probe–Compose step |
--k K --mode parallel | Probe K general and K domain-specific candidates, then produce K compositions |
--k K --mode sequential | Refine the harness through K successive steps |
--substrate cx | Use Codex instead of the default OpenCode executor |
After each task, harnessing-level recursion retains the adopted harness and evidence-supported lessons to guide future refinement. See the experiment guide for task selection, concurrency, reproducibility, and baseline comparisons.
Web access
Executor network access is unrestricted, and Codex runs with its sandbox disabled. Public benchmark rubrics may be accessible online. Before evaluation, configure network restrictions to prevent access to benchmark answers and grading criteria.
Results and resume
Results are saved under runs/, organized by benchmark and subset where
applicable. They include task summaries, deliverables, adopted harnesses,
reflection notes, and evaluation results.
Repeat the same command to resume. Use a new HARNESS2_RUNS_DIR when changing
models or task selection. See results and resume
for details; each command also supports --help.
Citation
@article{xu2026harness2,
title = {Harness$^2$: Recursive Agent Harnessing for an Open World},
author = {Xu, Ruiyao and Chen, Yanfei and CuiZhu, Zhongying and Dalvi Mishra, Bhavana and Ming, Yifei and Yu, Han and Han, Rujun and Lee, Chen-Yu and Pfister, Tomas},
journal = {arXiv preprint arXiv:2610.14224},
year = {2026},
url = {https://arxiv.org/abs/2610.14224}
}
Contributing
See CONTRIBUTING.md.
License
Harness² is licensed under Apache 2.0. Third-party code under
third_party/, benchmarks, and datasets retain their
upstream licenses; see
third-party notices.
Disclaimer
This is not an officially supported Google product. This project is not eligible for the Google Open Source Software Vulnerability Rewards Program.
Similar Articles
@dair_ai: Learn to build custom harnesses, folks! Here is a highly recommended paper from Google on recursive agent harnessing. G…
Google Cloud AI Research 提出 Harness2,一种递归式 agent harness 优化框架,可在无验证器的开放世界场景中通过任务级与 harness 级递归自我改进,在 WorkBuddy-Bench、JobBench 和 LAB 上持续提升 GLM-5 与 Gemini 3.5 Flash 的表现。
Google Harness² for Recursive Self Improvement (GitHub Repo)
Google Research 开源 Harness²,一个实现递归式智能体系统优化(recursive agent harnessing)的即插即用框架,可在模型权重固定的情况下通过 Propose–Probe–Compose 循环持续改进 agent harness,在多个专业基准上带来最高 11.8 个百分点的性能提升。
@omarsar0: // Self-Harness: Harnesses That Improve Themselves // (bookmark this one) Most of the agent scaffolds we rely on today …
This paper introduces Self-Harness, a new paradigm where LLM-based agents iteratively improve their own operating harness—prompts, tools, and control flow—without human engineers or stronger external agents, achieving significant performance gains across multiple models.
@akshay_pachaar: self-evolving harnesses are here. (100% open-source) today you pick a fixed harness, and every task runs through it. a …
JIT-Agent is an open-source 27B model that dynamically generates task-specific harnesses for AI agents, outperforming hand-built systems with improved token efficiency.
Self-Harness: Harnesses That Improve Themselves
Self-Harness introduces a new paradigm where LLM-based agents iteratively improve their own operating harness by mining model-specific weaknesses, proposing harness modifications, and validating them through regression testing, achieving substantial performance gains on Terminal-Bench-2.0 across multiple base models.