We built an Agentic skill using a code agent that runs Google's Harness² on a custom agent domain, and the first version passed every test we wrote for it. We then reviewed the skill's design and code against the upstream Harness² source, line by line, and the review found 11 flaws. The worst flaw sat in the spend guard: one flag combination let a paid judge run start with no spend-cap check at all. We fixed all 11 flaws, grew the acceptance suite from 25 checks to 42 checks, and published the skill as open source. This article gives the build record, the flaw list, and the procedures. A reader who builds agent harnesses gets three things from the paid section: the adapter contract in full, the three validation gates with the exact commands, and a sample procedure for running the loop on a new domain without an uncapped run.
The skill splits into two halves. One half operates the loop: the operator runs preflight checks, validates a harness tree, wires three separate model settings, and starts a run only inside a spend cap the user sets in advance. The other half builds adapters: the builder scaffolds the one interface a new domain needs, an 11-method adapter, plus a valid base harness for each of the 2 substrates Harness² supports, Codex and OpenCode. The skill drives a local clone of Harness² as an external tool and vendors none of the upstream code. The skill is open source on GitHub. The repo link is in the paid section below.
The upstream project defines the scope. Harness² is Google Research code, Apache 2.0, 12,747 lines of Python in the harness2
package, and the skill pins the clone at commit 1cfe254 so a reader reproduces the exact behavior this article describes. The upstream repo ships three benchmark domains; the skill exists for every domain outside those three. A team names the work in plain words — a red-teamer, a gateway agent, a document agent — and the adapter pattern turns that description into tasks, deliverables, and trajectories the loop can optimize. The skill itself carries an MIT license and a test suite that runs with no credentials, so a reader can verify every claim in this article locally before spending anything on a model.
We produced the build record in two passes, and the paid section keeps the passes separate. Pass one built the skill and its 25-check acceptance suite, and every check passed. Pass two re-read every skill file against the upstream source and tested each documentation claim as an assertion about the code. Pass two found the 11 flaws, and the fixes shipped in a single commit with a regression check per flaw. The article therefore reports two different kinds of numbers: build numbers, which state what the skill contains, and review numbers, which state what the first build got wrong. A reader who only wants the artifact can take the repo link and the procedure. A reader who maintains skills or agent tooling gets the second record as well: a worked example of a test suite passing while the documentation overclaims, and the review method that closed the gap.
Figure 1 is the session flow the skill enforces: an agent request enters at the left, and each step gates the next one.
Figure 1: One session, five gated steps. The validator and the spend cap block a run before any model session starts.
The paid section contains the full build record in 7 parts:
The seam: one adapter, 11 methods— the exact interface a custom domain implements, the prompt slots that reject 5 measurement words, and the code a domain author writes by hand.Three gates, not one— the validator runs all 3 checks the recursion itself applies, and the first build ran only 1 of the 3 while the documentation claimed all 3.The spend guard, before and after— a pre-flight estimate gate, a post-run tally with exit code 3 on overrun, and the budget identity R=4k rollouts and P=3k improver sessions that exposes a broken summary.The review round: 11 flaws— the full flaw table with severities and fixes, including the judge dry-run bypass that removed the cap check from a paid command.The acceptance suite: 42 checks at $0— measured results from the upstream demo, 5 validator rejections, and a toy domain whose adopted deliverable corrects a planted counting defect.Run the loop on your own agent— the step-by-step procedure with the commands, the failure points at each step, and the order that keeps spend at zero until the design holds.Self-improvement, with an adoption gate— how an agent applies this loop to its own workspace harness, and the 3 limits that keep the loop honest.
One boundary applies to everything after the paywall. The skill improves the harness around a frozen model; the skill never changes model weights, and the article claims nothing about model quality. Every number in the paid section comes from a local run, a file in the public repo, or the upstream source at the pinned commit. A reader who follows along needs three things only: Python 3.12, a git clone of the upstream repo, and this skill. The demo and the acceptance suite need no model credentials and no API key, and the procedure in section 6 keeps every step at $0 until the reader chooses a model route and sets a cap.