Google Research open-sources Harness², a framework for recursive AI agent improvement without retraining model weights

Google Research has released Harness², an open-source framework that allows AI agents to improve execution strategies without modifying the underlying language model. The system experiments with changes to prompts, tools, memory, guardrails and other surrounding components, then uses the results to refine future execution.
Published on October 9, 2026, the research introduces recursive agent harnessing, combining task-specific optimization with persistent learning across assignments. Code is available under the Apache 2.0 license in Google's research repository.
Across three professional benchmarks and four model–harness configurations, researchers report gains of up to 11.5 points on WorkBuddy-Bench, 4.5 points on JobBench and 11.8 percentage points on the LAB legal benchmark's partial pass rate after a single recursive improvement step. The experiments use GLM-5 and Gemini 3.5 Flash, with model weights unchanged.
These are researcher-reported results under specific benchmark configurations. The approach also introduces optimization costs, evaluation uncertainty and security considerations that matter when moving beyond controlled experiments.
··········
HARNESS² INTRODUCES RECURSIVE IMPROVEMENT AT THE AGENT-SYSTEM LEVEL.
An AI agent combines a language model with tools, memory, file access, execution environments and workflow controls. The components surrounding the model form its agent harness.
Harness² makes this harness the optimization target, experimenting with how the model receives instructions, accesses information, delegates work and interacts with its environment rather than updating its parameters.
........
Characteristic | Harness² |
Research organization | Google Research |
Research publication | October 9, 2026 |
Framework | Recursive agent harnessing |
Model weights | Unchanged |
Optimization target | Agent execution harness |
Task-level method | Propose–Probe–Compose |
Persistent improvement | Harnessing-level recursion |
Execution backends | OpenCode and Codex |
Evaluated model families | GLM-5 and Gemini 3.5 Flash |
Benchmarks | WorkBuddy-Bench, JobBench, LAB |
License | Apache 2.0 |
Repository | google-research/harness2 |
........
The framework addresses open-world assignments that may differ substantially from tasks anticipated when the agent was designed. An unfamiliar repository, spreadsheet or legal document may require a different combination of tools, instructions and memory management. Harness² attempts to adapt those components while retaining useful lessons across tasks.
··········
THE FRAMEWORK CAN MODIFY EIGHT COMPONENTS AROUND A FIXED MODEL.
Harness² exposes eight categories of agent components for optimization, extending beyond ordinary prompt engineering.
........
Component | Function | Example optimization |
System prompt | General instructions | Clarify execution priorities |
Guardrails | Permitted behavior | Improve restrictions and validation |
Memory | Retained information | Preserve useful context |
Tool guidance | Tool selection | Reduce incorrect calls |
Subagents | Delegation | Improve specialization |
Skills | Reusable procedures | Select task-specific methods |
Scripts | Programmatic operations | Automate repeated work |
Plugins | External capabilities | Improve service integrations |
........
An agent processing unfamiliar documents might benefit from a specialized extraction script, while a coding agent might need better repository search instructions. Such changes can affect execution even when the model's core reasoning ability remains constant.
These examples illustrate the types of modifications the framework permits rather than independently measured gains for those specific applications.
··········
PROPOSE–PROBE–COMPOSE ALLOWS IMPROVEMENT WITHOUT GROUND-TRUTH ANSWERS.
Agent optimization is difficult when no complete reference answer is available. Many professional assignments involve judgment, multiple valid outputs or intermediate actions that are hard to score automatically.
Harness² uses a contrastive procedure called Propose–Probe–Compose.
During Propose, the system generates candidate changes to the harness. During Probe, it executes the task using alternative configurations and observes their behavior. During Compose, it analyzes differences between executions and constructs a refined harness from the available evidence.
Unlike methods requiring a definitive answer for every task, this process can learn from contrasting executions. However, an apparently better execution is not necessarily factually correct. For legal, financial or safety-critical work, independent validation remains necessary even when contrastive evidence supports a modification.
··········
TWO LEVELS OF RECURSION CONNECT TASK OPTIMIZATION WITH LONG-TERM LEARNING.
Harness² separates immediate task improvement from persistent adaptation.
Task-level recursion repeatedly refines the harness for the current assignment. A coding agent might experiment with repository search, test execution or delegation before selecting a revised configuration.
Harnessing-level recursion updates a persistent improvement harness using adopted configurations and evidence-supported lessons from previous tasks. The goal is to make future adaptation more effective, rather than preserving a single successful configuration indefinitely.
Transferability is difficult because a procedure that improves a complex legal analysis could add unnecessary latency to a simple spreadsheet task. Persistent optimization must distinguish generalizable improvements from strategies that work only in narrow circumstances.
··········
GOOGLE REPORTS GAINS OF UP TO 11.8 PERCENTAGE POINTS ACROSS PROFESSIONAL BENCHMARKS.
The research evaluates Harness² across professional, legal, office, web and coding tasks using four model–harness configurations with GLM-5 and Gemini 3.5 Flash.
........
Benchmark | Domain | Maximum reported gain |
WorkBuddy-Bench | Office, web and coding | +11.5 points |
JobBench | Professional tasks | +4.5 points |
LAB | Legal tasks, partial pass rate | +11.8 percentage points |
........
The figures are maximum reported improvements, not gains achieved by every configuration. The LAB figure specifically concerns a partial pass rate, which can improve when an agent completes more individual requirements without necessarily completing every assignment.
A gain of 11.5 percentage points also differs from an 11.5% relative gain. For example, an increase from 50 to 61.5 points is 11.5 points but 23% relative improvement. These distinctions are essential when comparing benchmark claims with operational productivity.
··········
PARALLEL AND SEQUENTIAL RECURSION EXPLORE DIFFERENT IMPROVEMENT PATHS.
Harness² supports both parallel and sequential recursion.
Parallel recursion explores multiple candidate harnesses independently, while sequential recursion carries a refined harness through successive improvement steps.
........
Dimension | Parallel recursion | Sequential recursion |
Main objective | Explore alternatives | Refine progressively |
Candidate evaluation | Multiple branches | Successive iterations |
Information flow | Compare executions | Accumulate evidence |
Potential advantage | Broader exploration | Deeper refinement |
Trade-off | Concurrent resource demand | Dependence on prior decisions |
........
The repository exposes a recursion budget through the `--k` parameter. With `--k 1`, the system performs one Propose–Probe–Compose step. Parallel and sequential budgets need not imply equivalent compute usage: the number of candidate executions, model calls and intermediate artifacts can differ.
Cost-normalized comparisons are therefore more meaningful than comparing iteration counts alone.
··········
HARNESS OPTIMIZATION DIFFERS FROM FINE-TUNING AND MODEL-LEVEL SELF-IMPROVEMENT.
Recursive self-improvement can describe several distinct mechanisms. Harness² changes the agent system, not the neural network's learned parameters.
........
Approach | What changes | Main resource |
Prompt optimization | Instructions | Inference and evaluation |
Harness² | Prompts, tools, memory, execution | Repeated agent runs |
Supervised fine-tuning | Model weights | Training data and compute |
Reinforcement learning | Model weights | Training and reward signals |
Model-level recursive improvement | Model-development process | Broader training capabilities |
........
Harness-level optimization can improve an existing deployment without training access to the underlying model. Its ceiling nevertheless depends on the model's capabilities and available tools. Better orchestration can prevent avoidable errors, but it does not guarantee knowledge or reasoning capabilities the model lacks.
The research therefore demonstrates adaptive system optimization, not unlimited autonomous intelligence growth.
··········
THE PUBLIC IMPLEMENTATION SUPPORTS OPENCODE AND CODEX.
The repository includes OpenCode and Codex execution backends and benchmark integrations for JobBench, LAB and WorkBuddy-Bench. WorkBuddy tasks cover office, web and coding subsets.
The documented setup uses Linux, Python 3.12 and uv. Model-backed experiments additionally require relevant benchmark dependencies, Node.js 20+ and Google Cloud CLI tooling.
A local demonstration can run without model credentials using deterministic editors and Python execution:
```bash
uv venv --python 3.12 .venv
source .venv/bin/activate
uv pip install -e '.[render]'
harness2-demo --output runs/demo --k 2
```
Experiments produce artifacts such as task summaries, generated deliverables, adopted harnesses, reflection notes and evaluation results. Those records are important for investigating which changes were attempted and what evidence justified their adoption.
··········
RECURSIVE IMPROVEMENT HAS AN INFERENCE AND TOOL COST.
Each proposed modification may require additional task executions, model calls, tool usage and evaluation. The economic benefit depends on whether subsequent performance improvements outweigh that overhead.
Consider a hypothetical task costing $0.20 per execution. Six additional optimization runs would cost $1.20. If the resulting harness saves $0.04 per future task, recovering the optimization overhead requires 30 subsequent tasks.
........
Hypothetical metric | Value |
Baseline task cost | $0.20 |
Extra optimization executions | 6 |
Optimization overhead | $1.20 |
Saving per subsequent task | $0.04 |
Break-even task count | 30 |
........
This is a mathematical illustration, not a measured Harness² cost result. It assumes savings remain stable and the improved harness transfers successfully. For recurring enterprise workflows, overhead may be recovered; for one-off tasks, optimization may cost more than simply using a stronger model or a carefully engineered static harness.
Accuracy improvements can also justify costs even without reducing tokens, particularly when avoiding an error has substantial economic value.
··········
PERSISTENT OPTIMIZATION CAN PROPAGATE ERRORS AND OVERFIT TASKS.
A persistent improvement harness can preserve useful strategies, but it can also retain misleading lessons. A modification adopted from incomplete evidence may affect subsequent assignments, and strategies optimized for one benchmark can degrade performance elsewhere.
Versioned harness configurations, rollback procedures and independent testing on unseen tasks are important safeguards. A successful optimization should improve performance across a representative distribution of assignments rather than merely reproduce favorable outcomes on the tasks used to develop it.
The research's open-world focus addresses this challenge, but does not remove the need for validation.
··········
UNRESTRICTED EXECUTION REQUIRES SECURITY CONTROLS.
The repository documents an important operational limitation: executor network access is unrestricted, and Codex runs with its sandbox disabled. Public benchmark rubrics could also be accessed during evaluations unless network restrictions are configured.
This creates security risks when agents can execute scripts or access sensitive services, and evaluation-integrity risks when agents can retrieve grading material instead of solving tasks independently.
Production deployments should isolate optimization environments, limit tool permissions, protect credentials and validate changes to executable components before adoption. Research code with broad execution permissions should not be treated as a complete production security architecture.
··········
ENTERPRISE APPLICATIONS INCLUDE CODING, DOCUMENTS AND OFFICE AUTOMATION.
Harness² is relevant to repeated workflows where one model faces changing requirements. Coding agents could optimize repository search and testing procedures; document-processing agents could adapt extraction methods to unfamiliar layouts; office automation agents could refine tool-call ordering and context management.
These are plausible applications of the framework, not claims of measured productivity gains in each industry.
A practical pilot should start with a narrow workflow, establish a fixed baseline and compare task completion, elapsed time, token use, error rates and security outcomes after one optimization step. Improvements should be promoted into persistent configurations only after testing on unseen tasks.
··········
WHAT THE RESULTS ESTABLISH AND WHAT REMAINS UNPROVEN.
The experiments indicate that execution-harness design materially influences model-agent performance, and that useful modifications can sometimes be discovered through contrasting executions without complete ground-truth answers.
The published gains across WorkBuddy-Bench, JobBench and LAB provide evidence for this approach under tested configurations. They do not establish universal gains, unlimited recursive progress, or economic superiority over manual harness engineering in every workload.
Further independent replication is needed to determine how reliably improvements transfer across unrelated tasks, how harmful modifications are rejected and whether persistent optimization remains effective over long periods.
··········
HARNESS² TURNS AGENT ENGINEERING INTO AN AUTOMATED OPTIMIZATION PROBLEM.
Harness² shows that agent performance depends not only on the underlying language model but also on instructions, tools, memory, delegation and validation procedures. Google Research makes these components editable and testable through recursive experimentation while leaving model weights unchanged.
The reported gains—up to 11.5 points on WorkBuddy-Bench, 4.5 points on JobBench and 11.8 percentage points on LAB—suggest that harness optimization can produce measurable improvements. The associated inference costs, evaluation uncertainty and security requirements remain important limitations.
Harness² shifts part of AI performance optimization from model training to agent infrastructure. Its lasting value will depend on whether automatically discovered improvements are reliable, transferable and economical outside the benchmarks used to develop them.
··········
FOLLOW US FOR MORE.
DATA STUDIOS
datastudios.org




