Harness² (harness2) vs OpenCode and Codex CLI — MCP illustration

harness2 vs other agent harnesses: what it is and how to start

Harness² (harness2) is an open-source research framework from Google Research that tunes the harness around an agent while the model stays fixed. It runs on top of existing agent harnesses rather than replacing them. This page compares it with OpenCode and Codex CLI using only each project’s own documentation.

What harness2 is

The repository describes Harness² as “Recursive Agent Harnessing for an Open World”: a plug-and-play framework for recursive agent harnessing in open-world settings, with model weights held fixed. It is released under Apache 2.0. The README says it is not an officially supported Google product, and links the paper as arXiv:2610.14224.

How it differs from other harnesses

OpenCode and Codex CLI are coding agents you use directly. Harness² is a layer above them: its README names OpenCode (the default) and Codex as the executors it runs on. So the question is not which one to pick, but whether you want to run an automated harness-improvement loop on top of an agent you already use.

Reported results, not independent tests

The README reports that a single Harness² step, with GLM-5 and Gemini 3.5 Flash over their base harnesses, improved WorkBuddy-Bench by up to 11.5 points, JobBench by up to 4.5 points and LAB by up to 11.8 percentage points of partial pass rate. These are the authors’ own figures; AgentSkillsDir has not run them.

When to use it, and when not to

It suits researchers and teams who already run OpenCode or Codex and want to test automated harness tuning on JobBench, LAB or WorkBuddy-Bench. It is not a ready-made daily coding agent. It needs Linux, Python 3.12 and uv; the model-backed benchmarks also need Node.js 20+ and the Google Cloud CLI, LAB needs Pandoc and Poppler, and WorkBuddy-Bench needs Docker. The local demo needs no model credentials.

Harness² compared with OpenCode and Codex CLI

Facts from each project’s own README and GitHub page, checked 20 Oct 2026
ProjectRole (from its README)LicenseNeedsOfficial source
Harness²Framework for recursive agent harnessing; model weights fixed; runs on OpenCode (default) or CodexApache-2.0Linux, Python 3.12, uv; local demo needs no model credentialsgoogle-research/harness2
OpenCode“The open source AI coding agent”MIT (per GitHub)See its README for install optionsanomalyco/opencode
Codex CLI“A coding agent from OpenAI that runs locally on your computer”Apache-2.0Install via npm, Homebrew or the install scriptopenai/codex

Gemini, Codex and OpenCode are named only to identify those projects. Anything not stated in an official source is left out.

Install and get started (official sources)

Harness²

Official README

Run from the repository root. This is the README’s local demo and needs no model credentials.

uv venv --python 3.12 .venv
source .venv/bin/activate
uv pip install -e '.[render]'
harness2-demo --output runs/demo --k 2

Codex CLI

Official README

npm install -g @openai/codex

OpenCode

Official site

Several install methods exist; follow the current ones in the official README.

Commands are copied from the official READMEs. Read them before running anything; nothing is installed from this page.

FAQ

What is harness2?

Harness² is an open-source framework from Google Research for recursive agent harnessing: it improves the harness around an agent while the model weights stay fixed. It is released under Apache 2.0 and is not an officially supported Google product.

Is harness2 a replacement for OpenCode or Codex?

No. Its README names OpenCode (default) and Codex as the executors it runs on, so it sits on top of them.

How do I install harness2?

From the repository root, create a Python 3.12 environment with uv, install it with uv pip install -e '.[render]' and run harness2-demo. The exact commands are in the install section of this page and in the official README.

Are the benchmark gains independently verified?

No. The figures come from the project’s README; AgentSkillsDir has not run the benchmarks.

Reference: https://github.com/google-research/harness2

These selections are organized by task, without invented ratings, search volumes or compatibility-test results.