NewOur benchmark results are out!read it

Heal · · October 29, 2026

Give your coding agent a verification harness to check its code

Verification is the bottleneck. Give the agent somewhere to run the code.

Addy Osmani's Agentic Verification makes the case in one line: "I would always prefer a much better feedback loop to a slightly better model." A coding agent that can only read the code guesses. One that can run the product and use its interfaces and APIs can check and iterate. This is what a CI pipeline is, but placed inside the agent's session, and running in shorter cycles. We call that a verification harness.

At Heal the harness did not start as a product. It started as a question our engineers put to Claude Code in most sessions: what do you need to test your code?

Five weeks of answers became a Docker mode in the backend, a replay mode in the agent, integration specs that combine both, and a bench that drives a real Vercel sandbox. This article is about building that harness: what it is, how we designed it, what it caught, what changes when the same model runs with and without one, and why Heal now automatically builds one for every codebase.

TL;DR

  • A verification harness is three things, made available to a coding agent, so it can verify its code. Verification tools: a linter, a test framework with tests, a live browser, the app running on seeded data, a stand-in for every vendor. Context: what the tools are and how to drive them, what was already verified and how, the heuristics on where to look. Rules: a grader the agent does not control and cannot cheat: end-to-end, integration, and script-based checks.
  • Heal's own harness came from one question we ask Claude in most Claude Code sessions: what do you need to test your code? Five weeks of answers became an early version of the harness that catches the bugs that used to reach staging or production.
  • A verification harness is cheap to build now that code is cheap with AI. Our assumption is that most engineers do not build one the right way, or deeply enough, for lack of time or of expertise on the topic.
  • Most repositories have no harness, so Heal built an agent that builds one. The Heal Sandbox is one implementation. The end game is a harness tailored to each codebase, in the local workflow first, and in Heal's cloud for convenience and scalability.

1. What a verification harness is

A verification harness is three things, made available to a coding agent, so it can verify its code.

PARTWHAT IT HOLDSWAYS TO GET IT1 · Tools to verifywhat the agent runs its code againsta linter and the typecheckthe test framework with its teststhe app booted on seeded dataa live browser · a mail catcherthe database · the logsa stand-in for every vendorsign-in without the real IdPa compose file or a devcontainertestcontainers · Mailpita stub or emulator per vendora 2nd adapter behind a portHeal Sandbox: generated from the code2 · Contextwhat the agent reads firsthow to boot and the health URLevery env key with a local valuewhat each tool is and how to drive itwhat was already verified, and howwhere to look: the emails, the state a flow leaves,the API the screen does not usean AGENTS.md or CLAUDE.mda complete env examplea rule saved in the agent's memoryHeal Sandbox: a facts file written at scoping, read by every task3 · Rules to verifya grader the agent does not controlone test commanda failing test for each bug to fixan end-to-end test that passesan integration test on the real storea recorded run replayed, no modelevery claim re-run, not self-reportedthe repository's own testsintegration specs on testcontainersa replay of a recorded runHeal Sandbox: probes, page helpers,every defect behind a failing testBbuilt by hand, assembled from standard tools, or generated by an agent.

2. How Heal's harness was built

Heal's agent runs long tasks over LLMs and reports them to a backend, so many of its bugs showed up only on staging or in production. The stack already had broad test coverage, and it was not enough.

Over five weeks the engineers answered that with one habit: ask Claude Code what it needs to test its code, or say how to test it locally, and let it build a first harness version.

heal-backend · the APIwhat the agent reports to2,188 unit tests77 integration specs on testcontainers(a real Postgres, LocalStack for S3)vitest shards in CItypecheck · lintheal-agent · the runtimethe agent, run on a cloud box2,104 unit tests9 integration files: a mock backend onthe API contract, LocalStack for S3CI shardstypecheck · lintheal-frontend · the web appwhat the customer seesno teststypecheck · lintnot enough29 bugs escaped to staging or production in 90 days. A local check could have caught 23 of them:10 with the product running6 by an integration test5 by a unit test2 by a replayThe other 6 reached nothing the repositories could run.
Figure 1. Heal's stack before the harness: thousands of unit tests and integration tests on real stores in the backend and the agent, none in the frontend, and still 29 escapes in 90 days. That is why the question kept being asked.
WHEN (UTC)THE ASKWHAT IT BUILT28 Sep“You need to replay data or add tests to proveyour fixes”unit tests on the twin judge30 Sep 05:12“I want to add strong integration tests… like thebackend's, with testcontainers… a mock server”agent integration tests against a mock backend(sandbox-kit/tests/it)30 Sep 06:23“How did you handle the Claude SDK for the tests?”→ “Yes I like that a lot. Implement it and document it”replay mode: HEAL_REPLAY plays a recorded run,no call to Claude (heal-agent #211)30 Sep 08:32“How to design a BoxAdapter in the backend to use alocal Docker instead of the Vercel sandbox”Docker box: AGENT_RUN_BOX_PROVIDER=docker(heal-backend #340, merged in an hour)30 Sep 09:12“One recorded estimate run, committed so the box canreplay it… configure the run to replay with an env var”AGENT_RUN_REPLAY (#341), the agent packed asa tarball, the recipe in the README2 Oct“Use the docker mode of the backend and a new replayfrom the agent… the tests must be simple”the first replay specs, 30 s each; the methodsaved as a rule in the agent's memory3 Oct“I want to let you test that… use the replay feature…my Vercel sandbox config”the run-controls spec; a replay run on a realVercel sandbox from the developer's project9 Oct“Could we use a replay of the agent with the backendin docker mode to test E2E?”a replay past the trunk, over a stub sandbox15–19 Oct“We are adding E2E tests to find regressions but wenever run them?”the e2e-suite recording and its spec; a bedof injected bugs to check the suite finds them21 Oct“Did you use the agent replay inside the backendintegration tests?” → “Do it”the retest-delta spec; its first run caught abug on the wire (re-test verdicts never sent)
Figure 2. Ten asks and what each built, out of fifteen between 28 September and 23 October. The replay mode, the Docker box and the first recording were asked and merged in one morning.

Part of the harness lives inside the production code

The harness is kept decoupled from the production code as much as possible. In our specific case, two parts of the harness could not be completely decoupled:

  • Calling Anthropic is hard to mock, because HTTP calls have complex responses with tool definitions, cache, etc. We deemed this low value because this essentially checks that the Claude SDK is well configured.
  • Replaying a large set of different call options to mock agent behavior takes investing in a mechanism to record and replay calls (e.g. recording with a mock server).

So we used two patterns to deal with this part of the system: dependency injection, and ports and adapters. This was applied to:

  • the call site where the app is wired to the Claude SDK: the Claude SDK is stubbed with a static local replay from production;
  • production sandbox runtimes, replaced by a Docker container.

This is controlled by an env var, so the same binary runs in production and in a test, and a verification harness reaches into the production code without a fork of it. Locally, we can also toggle between the stubs and the real dependencies.

DOMAINPORTADAPTERS · AN ENV VAR PICKS ONEheal-agentthe run loopasks for the next turnport · the modelquery(session) → turnan interface, no vendorClaude · the real SDK and tools · every production runreplay · HEAL_REPLAY=<recording> · plays a recording, $0heal-backendthe run servicestarts a run's machineport · the boxstart(run) → a machinean interface, no vendorVercel · a sandbox per run · production (noop: the default)Docker · AGENT_RUN_BOX_PROVIDER=docker · a container · devproductionvalidation
Figure 3. The port-and-adapter pattern on Heal. An env var controls what gets called.

3. What the verification harness caught

Let's take a look at six examples the harness caught before merge that used to reach staging or production, and what it would have cost if shipped.

After a fix, the agent's re-check verdicts never reached the customer's dashboard

Caught by: a real run replayed against the real backend, on the test's first run

Impact: customers never told which bugs their fix closed; hours of re-checking by hand

1 / 6
Figure 4. Examples: six bugs caught before merge. They were not caught by unit tests because they sit between the agent and the backend.

4. A little data on harness performance

Public bugfix benchmarks indicate that allowing the agent to run the product dramatically improves performance, together with naming the bug to fix.

Our evaluation on more complex harnesses points in the same direction.

Public benchmark

Benchmarks indicate running and naming bugs dramatically improves performance.

SettingWhat the agent getsPublic benchmarkBest public score
Source onlythe repository, hidden tests, no hintsSWE-sweep, 4,100 real bugs in 100 repositories9.5 %
The product runningthe app, a browser, an area namedSWEeper-Bench, one obvious bug per task, LLM judge59 %
The bug describedthe above, plus the bug's descriptionSWEeper-Bench96 %

Ours (small sample)

We reproduce it on complex products with the sandbox.

SettingWhat the agent getsOurs, Claude Opus 5.5
Source onlythe repository, hidden tests, no hints8 % on Cal.com, 10 % on Infisical, the feature named
The product runningthe app, a browser, an area named28 % and 20 %, 5 to 9 bugs per feature, hidden tests

From the source alone a frontier model fixes under a tenth of real bugs. With the product running, several times more. With the bug described, nearly all. A verification harness is what moves an agent up that ladder. Our approach automatically builds one, regardless of system complexity.

5. The Heal agent: from a hand-built harness to an agent that builds one

Most repositories don't have a verification harness. The idea behind Heal's agent came from there: if an agent builds the missing piece when asked, one at a time, an agent can be asked to build all of them on a repository it has never seen, and then use them.

THE USER'S CODEBASETHE HEAL AGENT · ONE RUNWHAT THE RUN LEAVES BEHINDProduct repositoriesread, never written tothe source, on the developer'sbranchits own tests and typecheckan env example, maybea compose file, maybea CI workflow, maybeThe Heal agentbuilds, then uses, the harness1 map: reads the code, names the features and the vendors2 build: writes the sandbox (compose, stubs, seed, facts)3 verify: boots the product; a referee re-runs every check4 extend: adds the channel a feature needs: mail, a vendor5 refresh: on each commit6 hunt: finds defects on the running product, files each behind a failing testreadswritesfilesThe verification harnesssandbox/ and .heal/, beside the code1 tools: sandbox/a compose file with the storesa stub per vendorseed data and accountssign-in in test modePlaywright, page helpers, a mailcatcher client2 context: FACTS.md and .heal/how to boot, the health URLevery env key with a value that worksthe map: features, journeys, architecturethe run recordsthe defects found so far3 rules: what the referee re-runsboot and health probesthe failing test behind each defectthe product's tests
Figure 5. A run of the Heal agent produces a verification harness.

Heal's agent has built a verification harness on hundreds of products and filed tens of thousands of high-impact defects. We analyzed what the agent had to build to create the verification harness on a small subset (21 products):

a stand-in for a vendor the code calls16 of 21a launch recipe per app, with a health URL13 of 21the shipped compose file rewritten12 of 21a compose file with the product's stores7 of 21seed data and known accounts6 of 21sign-in in test mode: a gateway or a local IdP5 of 21a redirect for a hard-coded vendor host5 of 21an env file with every key and a local value4 of 21
Figure 6. The most common additions the agent makes to build a verification harness.

6. Where Heal fits

Verification harnesses can be built manually, over time. Heal's agent does it automatically in order to run its bug and vulnerability hunter.

On a new repository Heal scores what is already there against its requirements, and builds the parts that are missing. A big part of that is the Heal application sandbox, the part of the harness that allows running the app in a way that closely mimics production. That application sandbox is a verification harness designed for identifying bugs and vulnerabilities, but can also be used by coding agents.

The end game is not one sandbox shape for every repository. It is a harness that fits each codebase: the tests it has, the ports its code already exposes, the vendors it calls, the way it boots. That harness belongs in the local workflow first, where the agent that wrote the change can run it before the push, and the same harness runs in Heal's cloud when a team wants the hunt and the referee on every commit. Try it on your repo, or read how it compares with code review bots in our benchmark.