DEV Community

Cover image for We Built a Verification Harness for AI Coding Agents. Here’s What 17,397 Checks Revealed.
Headeron
Headeron

Posted on

We Built a Verification Harness for AI Coding Agents. Here’s What 17,397 Checks Revealed.

How Headron combines targeted context, deterministic verification, agent controls, and execution evidence to make AI-assisted software development more measurable.

AI coding agents have become remarkably capable at generating software. They can navigate repositories, modify multiple files, implement features, run commands, and propose fixes with limited human intervention.

But generating code faster does not automatically make software delivery faster.

As agents take on larger tasks, developers face a different bottleneck: determining whether the agent understood the relevant code, performed the necessary checks, and produced enough evidence to trust its changes.

This is the engineering problem behind Headron, an open-source verification and agent-harness project developed by HLIntel.

Rather than building another coding assistant, we have been developing infrastructure around existing agents. The goal is to give agents relevant context before they act, connect changes to explicit verification requirements, and preserve evidence of what actually happened.

Recent development has moved Headron beyond architectural concepts into measurable contracts, executable controls, cross-toolchain testing, and recorded verification results.

Here is what we built, what the measurements show, and where the limitations remain.

1. The Problem: Faster Code Generation Creates a Verification Bottleneck

Consider an agent assigned to update an authentication service.

It might modify the authentication handler, update API definitions, change database access logic, and generate new tests.

A successful-looking response could say:

Implementation complete. Tests passed. Ready to merge.

But that response leaves important questions unanswered.

Did the agent run the relevant integration tests? Did it check authorization boundaries? Were the tests executed against the final version of the code? Did any required checks fail or remain unexecuted?

These are different questions from whether the generated code looks reasonable.

Traditional CI systems execute configured workflows. AI code reviewers analyze changes and suggest improvements. Both are useful, but neither automatically establishes that every change received the verification it required.

Headron approaches the problem from another direction:

A code change should determine what evidence is required before the change can be considered verified.

That principle becomes the foundation of the harness.

2. The Harness Architecture: From Task to Evidence

Headron's documented agent workflow follows a structured sequence:

Classify
   ↓
Scope
   ↓
Retrieve
   ↓
Plan
   ↓
Edit
   ↓
Fast Verification
   ↓
Full Verification
   ↓
Diff Audit
   ↓
Accept
   ↓
Record
Enter fullscreen mode Exit fullscreen mode

The sequence separates activities that benefit from model reasoning from those that should be governed by explicit software rules.

An LLM can interpret a task, propose a change, and explain implementation choices.

The harness handles requirements such as tool permissions, path boundaries, budgets, verification status, and evidence recording.

This distinction matters because a prompt instruction is not the same as an enforced constraint.

For example, telling an agent not to modify a protected file is weaker than having a tool reject writes outside an explicitly permitted path.

Headron's task-contract architecture defines controls for:

  • Tool scope: commands must remain within declared allowances.
  • Sandbox scope: paths outside the declared workspace are rejected by the relevant enforcer.
  • Budgets: operations that would exceed a declared ceiling can be refused before execution.
  • Approvals: authorization must match the relevant contract, commit, or diff.
  • Effects: operations must conform to declared effect permissions.
  • Audit: execution events can be recorded with integrity information.

These controls are implemented through named enforcement functions rather than existing only as documentation.

An important boundary remains: the harness can refuse operations submitted through its controls. It cannot automatically govern an agent that bypasses those controls through an unrestricted host environment.

Host-level isolation is therefore a separate responsibility.

3. Context Engineering: Less Reading, More Relevant Information

One of the largest inefficiencies in agentic development is context retrieval.

A coding agent often needs only a small portion of a repository to understand a task. Yet common workflows repeatedly load large documentation files, broad repository summaries, and unrelated implementation details.

That increases prompt consumption and can make relevant information harder to identify.

Headron uses a different approach.

Instead of treating the entire repository as the default context, it routes the agent toward information associated with a particular file, symbol, task, or change.

For example:

headron port scripts/doctor.py
Enter fullscreen mode Exit fullscreen mode

This identifies the file's route and associated checks.

A developer can then inspect the required gates:

headron gate scripts/doctor.py
Enter fullscreen mode Exit fullscreen mode

The documented example returns formatting, compiler or type-checking, and unit-test commands.

The important distinction is that context retrieval and verification routing are connected. The agent can learn not only where to work, but also what the work is expected to satisfy.

What the routing experiments measured

Headron's published routing experiments report:

Context strategy Recorded result
Scoped routing vs. whole-tree context 89% fewer prompt tokens
Scoped routing vs. unassisted context 50% fewer prompt tokens

These measurements concern context consumption and routing tasks, not total development runtime.

A particularly interesting recorded comparison involved Claude Sonnet CLI across 76 routing questions.

Approach Correct answers Tokens per question
Unassisted 30/76 202.4
Whole-tree 60/76 950.6
Headron scoped 76/76 91.6

In this recorded experiment, scoped context used substantially fewer tokens while producing more correct routing answers.

That suggests an important architectural opportunity: better context selection can improve the information available to an agent without requiring larger prompts.

However, these are repository-authored evaluation tasks. They do not independently establish equivalent improvements in real-world software engineering productivity.

4. Deterministic Verification: The Difference Between PASS and NOT RUN

The central verification principle in Headron is straightforward:

A check that did not run cannot be reported as passed.

This sounds obvious, but it is critical when autonomous systems generate their own progress reports.

Headron distinguishes verification outcomes including:

PASS
FAIL
SKIP
NOT RUN
Enter fullscreen mode Exit fullscreen mode

The recorded verification ledger currently reports:

Outcome Recorded checks
PASS 7,357
REUSED 1,097
FAIL 1,278
NOT RUN 7,665
Total 17,397

The same repository summary reports 533 failed runs, 271 runs stopped with an unexecuted check, and zero runs reported clean despite a failed or unrun check.

These figures are important because they describe the system's recorded verification behavior, including incomplete and failed outcomes.

They are not a claim that 17,397 independent software defects were found or prevented.

Headron's verification engine aims to make incomplete evidence visible rather than allowing it to disappear behind a successful-looking summary.

Targeted checks and full verification

The CLI supports evaluating checks associated with modified files:

headron verify --changed
Enter fullscreen mode Exit fullscreen mode

It also supports change-specific profiles:

headron verify --changed --change security_sensitive
Enter fullscreen mode Exit fullscreen mode

The full verification command remains:

headron verify
Enter fullscreen mode Exit fullscreen mode

This creates a useful distinction between targeted feedback during development and the final declared verification run.

The optional commit hook can run checks before a commit. It does not, by itself, guarantee that all behavioral tests execute or that every unrun check blocks the commit.

For stronger guarantees, the relevant controls must be enforced through CI, repository policy, or the execution host.

5. Cross-Toolchain Testing: Can the Controls Actually Refuse Invalid Actions?

A verification harness is only useful if its controls behave as intended.

Headron's repository records enforcement testing across 20 toolchains.

The published result is:

31 out of 31 planted breaks refused, with 806 declared planted cases.

A planted break is a deliberately constructed violation intended to test whether a particular control detects or refuses it.

This is more meaningful than simply counting validation functions.

For example, a control designed to reject an unauthorized operation should be tested against an operation that actually violates the declared policy.

The harness also maintains a failure ledger recording recurring classes of mistakes.

Current repository figures include:

  • 124 recorded failure shapes
  • 212 sightings
  • 101 guarded within the repository
  • 23 requiring host-level enforcement

This introduces a useful engineering practice: when a failure recurs, convert the lesson into a deterministic check, regression fixture, or enforceable rule instead of continuously expanding the agent's instructions.

The results establish behavior within the declared test surface. They do not demonstrate that every agent runtime or possible bypass has been tested.

6. Using Headron in Other Repositories

A major architectural requirement is that Headron should not work only inside its own source tree.

The CLI is designed to be installed and initialized inside another repository.

The documented installation path is:

uv tool install headron-software
headron doctor
Enter fullscreen mode Exit fullscreen mode

Inside a target project:

cd path/to/your-repo
headron init
Enter fullscreen mode Exit fullscreen mode

Initialization discovers checks and configures repository integration. The documented default also writes agent configuration and installs a pre-commit hook.

For environments where automatic wiring is undesirable, Headron provides a --no-wiring option.

After making a change, the developer or agent can run:

headron verify
headron proof <file> --verify
Enter fullscreen mode Exit fullscreen mode

This approach allows an existing repository to retain its own test framework, build tools, and development workflow.

Headron acts as a verification-routing layer rather than replacing the underlying engineering tools.

The project also documents consumption through CI and machine-readable interfaces.

What external-repository testing establishes

The current public materials establish an installation path for other repositories, cross-toolchain enforcement tests, language-role coverage, and recorded field verification activity.

They also describe headless agent experiments involving small bug-fix tasks in scratch copies.

The documented agent benchmark is deliberately limited: three small, self-authored tasks, one model, and one run per task. Both comparison approaches solved every task, creating a ceiling effect.

That is useful evidence that the evaluation path can execute, but it is not evidence of a demonstrated advantage in end-to-end bug-fix success.

Broader independent tests across unrelated production repositories remain an important next step.

7. Harness Engineering: Turning Agent Failures Into Regression Controls

One of the more significant developments is Headron's treatment of failures as reusable engineering information.

A conventional agent workflow might respond to a mistake by adding another instruction:

"Remember not to modify this file."

"Always run integration tests."

"Do not exceed the tool budget."

This approach becomes difficult to maintain as instructions accumulate.

Headron instead attempts to turn repeatable failures into explicit constraints.

For example:

Observed Failure
      ↓
Failure Classification
      ↓
Deterministic Guard
      ↓
Planted Regression Case
      ↓
Verification Requirement
Enter fullscreen mode Exit fullscreen mode

The repository tracks hard invariants, agreement relationships, and instruments responsible for testing specific properties.

Its current generated facts report:

Component Count
Hard invariants 52
Agreement edges 363
Verification instruments 95
Tool entries 385
Harness Python files 179

The agreement graph is particularly interesting.

It connects declarations to the files and functions responsible for implementing them.

Rather than accepting a policy merely because it appears in configuration, the repository checks whether the declaration resolves to an actual implementation.

This is a form of contract integrity checking.

It does not establish that every declared rule is wise or sufficient, but it helps prevent an architectural failure in which documentation claims a control exists while no implementation owns it.

8. Speed Is More Than Model Inference Latency

When developers discuss faster AI agents, they often focus on tokens per second or model response time.

Those metrics matter, but they represent only part of the development workflow.

Total task time also depends on:

  • Context retrieval
  • Tool selection
  • Repository navigation
  • Verification execution
  • Failed attempts
  • Repeated work
  • Human review

Headron's approach targets several of these sources of overhead.

Scoped retrieval can reduce the context sent to a model. File-specific checks can provide earlier feedback. Structured task contracts can reduce ambiguity about allowed operations. Recorded verification results can make review more systematic.

The project's routing experiments provide measurable evidence for context efficiency.

They do not yet prove an equivalent reduction in wall-clock task completion time.

That distinction is important because a system can consume fewer tokens while still spending more time on verification.

The engineering objective is therefore not to minimize checks indiscriminately.

It is to spend verification effort where it is needed, avoid unnecessary context, and make incomplete work visible before it becomes expensive.

9. Mind API and MCP: Separating Planning From Execution

Headron also exposes a hosted Mind API for planning declared changes.

The CLI verification functionality can operate independently of the hosted service.

This separation matters for developers who want local verification without introducing a required external dependency.

MCP provides another integration surface, allowing compatible agent environments to access declared Headron capabilities.

The current public documentation describes the MCP interface as read-only.

That is a useful boundary: an integration that exposes information and verification guidance is not automatically authorized to modify repository files or execute unrestricted actions.

The broader architectural direction is to separate three responsibilities:

Planning: Determine what a change requires.

Execution: Perform the work through permitted tools.

Verification: Evaluate the recorded results against declared requirements.

These responsibilities can be connected without assuming that the same model should be trusted to perform and certify every step.

10. What We Can Prove, and What We Cannot Yet Claim

Engineering credibility depends on the scope of the evidence.

The current Headron repository supports several concrete findings:

Measured or documented:

  • Scoped context routing reduced token consumption in recorded experiments.
  • Declared enforcement controls refused planted violations within the tested surface.
  • Verification outcomes distinguish successful, failed, reused, and unexecuted checks.
  • The harness maintains executable task contracts and regression controls.
  • Headron provides installation and verification workflows for other repositories.

Not yet established by those results:

  • Universal improvements in autonomous coding success.
  • A specific percentage reduction in end-to-end development time.
  • Prevention of every unsafe agent operation.
  • Complete protection against agents bypassing the harness.
  • Guaranteed correctness of code that passes its checks.

These limitations do not undermine the architecture. They define what future evaluations need to measure.

A stronger independent benchmark would compare identical coding tasks with and without the harness across multiple repositories, languages, and agent runtimes.

The comparison should record task completion, test outcomes, elapsed time, token usage, tool calls, verification gaps, and human intervention.

Most importantly, it should distinguish a successful code change from a successful verification record.

Those are related outcomes, but they are not interchangeable.

11. Where Headron Goes From Here

The larger opportunity extends beyond AI-assisted coding.

As agents begin operating across enterprise systems, the same fundamental questions will apply to API calls, infrastructure changes, data access, automated deployments, and multi-agent workflows.

What was the agent authorized to do?

What did it actually execute?

Which policies applied?

What evidence supports the result?

Can another system independently evaluate that evidence?

Headron's long-term direction is to make these questions part of the infrastructure surrounding autonomous systems.

The open-source verification engine provides one foundation. The harness, task contracts, execution controls, evidence ledger, and Mind API extend that approach toward broader agent governance.

The objective is not to replace existing models or coding platforms.

It is to provide a layer that can remain useful as those systems evolve.

Conclusion

The next major improvement in AI coding may not come exclusively from models that write code faster.

It may also come from engineering systems that reduce unnecessary context, select the right verification work, enforce explicit boundaries, and produce trustworthy records of execution.

Headron's recent development offers measurable progress in those areas.

The recorded experiments show meaningful reductions in routing-context consumption. Enforcement tests demonstrate refusal behavior within declared boundaries. The verification ledger makes failed and unexecuted checks visible instead of treating them as successful work.

There is still more to prove, especially through independent, end-to-end evaluations.

But the underlying engineering principle is clear:

AI agents should not be trusted merely because they report success. Their actions should produce evidence that can be evaluated independently.

That is the infrastructure we are building with Headron.


Headron Software | HLIntel

Open-source repository: https://github.com/HLIntel/Headron

Website: https://headron.tech

Mind API: https://headron.tech/mind-api.html

Technical references

Measurements reflect the public repository's recorded results at the time of writing, not an independently reproduced benchmark.

Top comments (0)