Harness Lab
A local-first experimentation platform for evaluating AI coding-agent harnesses.
Given the same software task and the same starting repository state, how do different agent harnesses and configurations compare in verified success, token usage, tool usage, latency, cost and behaviour? Harness Lab answers that question reproducibly:
TASK SUITE
│
identical starting repo (one git commit)
│
┌──────────┼──────────┐
▼ ▼ ▼
Harness A Harness B Harness C codex · claude · fake · generic · yours
│ │ │
isolated isolated isolated one git worktree per run
worktree worktree worktree
│ │ │
└──────────┼──────────┘
▼
independent verifier hidden tests + exit code / partial score
│
▼
normalized experiment provider-neutral trace + metrics + diff
│
▼
Harness Lab UI matrix · run detail · compare · grow
Harness Lab is not an observability product. It is a scientific instrument for controlled comparisons: the agent never decides whether it succeeded, every run starts from the same commit, and every trace is stored in one provider-neutral schema.
Documentation: https://bilgin-kocak.github.io/harness-lab/
Install
Python 3.12 or 3.13, git 2.20+, Linux or macOS (Windows through WSL).
pip install harnesslab # or: pipx install harnesslab / uv tool install harnesslab
harnesslab version && harnesslab doctor
Five minutes, no API keys
harnesslab run demo --variants fake-reference,fake-noop # bundled suite, two fake agents
harnesslab init my-lab && cd my-lab # editable copies of the suites, sweeps, harnesses
harnesslab sweep run sweeps/demo-fake.yaml # cheapest verified configuration
harnesslab grow run grow/demo-fake.yaml # grow a harness from failures
harnesslab serve # dashboard at http://127.0.0.1:8000 (Ctrl-C stops it)
A real harness uses real API usage, so Harness Lab says how many runs of which harness will start
and, in a terminal, asks first (--yes skips the question):
harnesslab run suites/demo/suite.yaml --variants claude-default # needs the claude CLI
What it does
- Runs the same task through different harnesses: Claude Code, the OpenAI Codex CLI, a deterministic fake agent, any CLI you wrap, or a Python adapter you write.
- Decides success independently: hidden tests are injected after the agent exits and a verifier command produces the verdict.
- Normalizes every trace: tool calls, commands, file changes, tokens, cost and LLM calls in one schema. Hidden reasoning is never persisted.
- Records what reproduction needs: base commit, task hash, harness bundle hash, config hash, CLI version, model and environment on every run.
- Compares configurations: sweeps search model × effort × toolset × compaction × action policy × harness bundle for the cheapest configuration that still passes.
- Measures improvement, not just completion: improvement tasks give the agent several rounds to make a working repository better on a measured objective, with an optional in-loop evaluator, and report the improvement curve.
- Measures safety next to success: every run gets risky-action findings, executed or blocked, and tasks can plant canary secrets and prompt-injection lures; a bundled sentinel hook can be A/B tested.
- Grows a harness from its failures: the
growloop edits a harness bundle with an optimizer, keeps only edits that fix failures without regressing a held-out gate, and records the lineage (after Grow the Harness, Not the Context, arXiv 2609.26760). - Mines tasks from your repository:
suite mineturns commits that changed code and tests into verifier-backed tasks (fail at the parent, pass at the commit), so comparisons run on dozens of tasks from your own code. - Proves each component earns its place:
ablatetests every part of a harness bundle against its own absence, and every comparison carries paired, task-level confidence intervals. - Counts attempts, discovery and recovery: pass@k and best-of-k over repetitions, tasks that grade everything an agent found against a hidden answer key, and tasks with an injected fault reported against their fault-free twin.
Guides
| Topic | Read |
|---|---|
| Architecture: runs, experiments, sweeps, grow sessions | Concepts |
| The fake demo, step by step | Quickstart |
| Running Claude Code | Run Claude Code |
| Running Codex | Run Codex |
| Creating a task suite | Write a task suite, Mine tasks from git history |
| Creating a harness variant | Task and suite YAML: variants, Test your own harness |
| Interpreting metrics | Metrics, Read and export results |
| Sweeps, grow, ablation | Configuration sweeps, Grow the harness, Ablate a harness |
| CLI and YAML reference | Reference |
| Roadmap | Roadmap |
The same pages live in docs/ and
can be read on GitHub.
Security warning
Harness Lab executes coding agents and agent-written code on your machine, isolated with git worktrees, not containers. Use trusted benchmark repositories and throwaway credentials. Redaction of secrets in traces and logs is a basic pattern filter, not a formal data-loss prevention system. Read the security model first.
Developing
git clone https://github.com/bilgin-kocak/harness-lab && cd harness-lab
uv sync && uv run pytest && uv run ruff check src tests && uv run ruff format --check src tests
uv run mkdocs build --strict
Changelog: CHANGELOG.md. License: MIT.
Metadata
Release files for harnesslab 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| harnesslab-0.3.0.tar.gz | 474.0 kB | With provenance | Details for harnesslab-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| harnesslab-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for harnesslab-0.3.0-py3-none-any.whl |
Total release size: 801.1 kB
Release files / harnesslab-0.3.0.tar.gz
| Download URL | harnesslab-0.3.0.tar.gz |
|---|---|
| Size | 474.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b6db8b78949619b70df2d13f79860a1997b6cbc7473cc49afea7b4ecba572f9c
|
|
BLAKE2b-256 checksum How to use checksums |
15ed10ef22d18471c4f987fcf65d5afd1a152a1f8df6463f5b3c99c16eefbadd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 12, 2026.
Transparency logRelease files / harnesslab-0.3.0-py3-none-any.whl
| Download URL | harnesslab-0.3.0-py3-none-any.whl |
|---|---|
| Size | 327.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b7bc52cc8db4d38bf1d813438adfe7280701039f364a17a1f2b9a1b3dbb5d91c
|
|
BLAKE2b-256 checksum How to use checksums |
c65527bde1b438767ea16c4c3349c6221556c60d41ec0071728e80f7e4fc46c1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 12, 2026.
Transparency logSecurity for harnesslab 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for harnesslab-0.3.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 12, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.