Install Harness² (harness2)
Last updated: October 19, 2026
Install Harness² with uv and Python 3.12, run the credential-free demo, configure Vertex AI models, and avoid the dependency traps that block benchmark runs.
Harness² is a Python package plus a set of benchmark adapters. The local demo is deliberately boring: it runs both recursion modes with deterministic editors and real Python executions, and it needs no model credentials. Model-backed benchmarks are the part that needs cloud setup.
Prerequisites
| Requirement | What it is for | When you need it |
|---|---|---|
| Linux | The platform the README documents for benchmark runs | All benchmark work |
| Python 3.12 | The documented interpreter target | All work |
| uv | Creates the virtual environment and installs the package | All work |
| Node.js 20+ | Benchmark tooling and the Codex CLI | Model-backed benchmarks, Codex executor |
| Google Cloud CLI | Application Default Credentials for Vertex AI | Model-backed benchmarks |
| Pandoc and Poppler | Required by LAB | LAB |
| Docker Engine | WorkBuddy-Bench containers | WorkBuddy-Bench |
The setup guide adds one useful nuance: the Python package also supports Python 3.13, even though the README's quick start uses 3.12. The benchmark host itself is documented as Linux. Windows and macOS are not listed as supported benchmark platforms.
Install 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 2The first three lines create an isolated environment and install Harness² with the rendering extra. The fourth line runs the local demo.
What the demo proves
The demo runs both recursion modes with deterministic editors and real Python executions. It requires no model credentials. That makes it the right first check: if the demo fails, the problem is local packaging or Python, not Vertex AI access.
--output runs/demo writes the run artifacts under runs/demo. --k 2 gives the demo a two-step task-level budget so you can see more than a single Propose–Probe–Compose pass.
Configure models for real benchmarks
Copy the example environment file, fill in your Vertex AI project and model IDs, then authenticate:
cp .env.example .env
# Edit .env with your Vertex AI project and model IDs.
gcloud auth application-default loginThe setup guide documents these settings:
| Setting | Meaning |
|---|---|
HARNESS2_SOLVER_MODEL | Executor model in OpenCode's provider/model format |
HARNESS2_IMPROVER_MODEL | Improver model in the same format; defaults to the executor |
HARNESS2_JUDGE_MODEL | Bare judge model ID; the adapter adds the Vertex prefix |
HARNESS2_RUNS_DIR | Output root; defaults to runs/ |
GOOGLE_CLOUD_PROJECT | Your Google Cloud project |
GOOGLE_CLOUD_LOCATION | Vertex location; defaults to global |
Shell environment variables take precedence over .env. The provided configuration uses Vertex Gemini executors and judges, and supports either Vertex Claude or Gemini as the improver. LAB also supports the upstream judge's direct providers when their credentials are configured.
If the browser flow is inconvenient, the setup guide lists alternatives: gcloud auth application-default login --no-browser, a service account key through GOOGLE_APPLICATION_CREDENTIALS, or impersonation with --impersonate-service-account. Keep gcloud on PATH in every case, because the installation check runs gcloud auth application-default print-access-token.
Install a benchmark
Benchmarks install separately. Install only the one you intend to run:
harness2-setup lab
harness2-check --bench labUse harness2-setup jb for JobBench or harness2-setup wb for WorkBuddy-Bench. Each benchmark environment lives inside its upstream checkout, so do not activate those environments for the main commands; Harness² selects the interpreters automatically.
harness2-check verifies dependencies, credentials and configuration without calling a model. It does not test model availability. Access to an executor, improver or judge model is tested when that model is first called.
Common pitfalls
These are the places where the documented dependencies actually bite. The official docs do not publish these as error messages, so treat this as a map of failure points rather than a transcript.
- No Linux host. The README says Linux. If you are on macOS or Windows, the documented benchmark path does not apply; expect to solve installer and container issues yourself.
- No Python 3.12.
uv venv --python 3.12needs a 3.12 interpreter. uv can download CPython fromastral.shwhen the host has no system 3.12, so a blocked network can fail here. The package also supports 3.13, but the quick start is written for 3.12. - Virtual environment not active. After
source .venv/bin/activate,harness2-demoandharness2should resolve. If you skip activation,uv pip installmay install into a different environment and the commands will not be onPATH. - No Node.js 20+. The local demo does not need it. Benchmark setup and the Codex CLI do. Install Node before benchmark work, not before the demo.
gcloudmissing fromPATH. The install check callsgcloud auth application-default print-access-token. A workinggcloudthat is not onPATHstill fails the check.- No Pandoc or Poppler. LAB needs both; on Debian/Ubuntu the setup guide installs
pandocandpoppler-utils. Other benchmarks do not. - Docker not running or not permitted. WorkBuddy-Bench needs Docker Engine and permission to run
docker info. A running daemon is not enough if your user cannot talk to it. - Restricted network during setup. Benchmark setup clones pinned upstream repositories from
github.com, fetches packages fromregistry.npmjs.org, downloads data fromhuggingface.coand its CDN, pulls a Docker image, and may fetch CPython 3.12 fromastral.sh. - Codex bridge not running. The Codex executor needs the optional bridge dependencies and a running
harness2-bridge. For WorkBuddy, start it withharness2-bridge --host 0.0.0.0so containers can reach it, and pass--substrate cxto setup, checks, refinement, judging and reporting. - Wheel install expectations. A wheel ships the
harness2package only. The task partitioner,python scripts/split_tasks.py, requires the source tree. For a wheel install, work from a dedicated directory because.env,dependencies/andruns/are resolved there. - If a benchmark fails after the demo succeeds, the cause is almost always a benchmark-only dependency — Node 20+, the gcloud CLI, Docker, or Pandoc and Poppler — not the install itself.
Next steps
- Setup guide — full requirements, credentials and benchmark installation.
- Codex executor — bridge setup and
--substrate cx. - Benchmarks — what to run after installation.
- Tutorial — how
--kand the recursion modes change a run.