<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Alireza Bashiri</title>
    <description>The latest articles on DEV Community by Alireza Bashiri (@al3rez).</description>
    <link>https://dev.to/al3rez</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4179551%2F5daf5ddc-79ff-4a27-9951-0d5fb3f7ae7f.jpg</url>
      <title>DEV Community: Alireza Bashiri</title>
      <link>https://dev.to/al3rez</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/al3rez"/>
    <language>en</language>
    <item>
      <title>Coding agents can write a feature, run the test suite, and report success.</title>
      <dc:creator>Alireza Bashiri</dc:creator>
      <pubDate>Mon, 12 Oct 2026 14:26:37 +0000</pubDate>
      <link>https://dev.to/al3rez/coding-agents-can-write-a-feature-run-the-test-suite-and-report-success-4h7i</link>
      <guid>https://dev.to/al3rez/coding-agents-can-write-a-feature-run-the-test-suite-and-report-success-4h7i</guid>
      <description>&lt;p&gt;Then you open the application and find that the feature doesn't work.&lt;/p&gt;

&lt;p&gt;I've been thinking about this problem while studying coding-agent harnesses and building software with agents.&lt;/p&gt;

&lt;p&gt;The problem is often in how we verify the result.&lt;/p&gt;

&lt;p&gt;A green test suite tells us that the code passed the checks we ran. It doesn't tell us whether the agent solved the user's problem, changed unrelated code, or introduced a failure that our tests missed.&lt;/p&gt;

&lt;p&gt;I think verification needs to become a first-class part of the coding-agent harness.&lt;/p&gt;

&lt;p&gt;Here's how I would build it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The research shows three different failure modes
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. The agent changes code when it shouldn't
&lt;/h3&gt;

&lt;p&gt;The &lt;a href="https://www.sri.inf.ethz.ch/publications/gloaguen2026coding" rel="noopener noreferrer"&gt;FixedBench research&lt;/a&gt; examines tasks where the reported bug is already fixed.&lt;/p&gt;

&lt;p&gt;The benchmark contains 200 human-verified tasks. The correct solution is to inspect the repository, confirm that the issue no longer exists, and leave the code unchanged.&lt;/p&gt;

&lt;p&gt;Across five models and four harnesses, agents still made unwanted changes in 35–65% of these tasks.&lt;/p&gt;

&lt;p&gt;That exposes a problem with how we define success.&lt;/p&gt;

&lt;p&gt;Many coding-agent workflows assume that every ticket needs a patch.&lt;/p&gt;

&lt;p&gt;But a successful task can also end with no code changes.&lt;/p&gt;

&lt;p&gt;The harness should support both outcomes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The agent finds a real defect, fixes it, and verifies the result.&lt;/li&gt;
&lt;li&gt;The agent confirms that the requested behavior already works and provides evidence.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A ticket is a request to investigate or change behavior. It isn't proof that the repository needs an edit.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. The agent passes tests but violates repository rules
&lt;/h3&gt;

&lt;p&gt;The &lt;a href="https://arxiv.org/abs/2610.06193" rel="noopener noreferrer"&gt;SWE-CC paper&lt;/a&gt; studies whether coding agents follow repository policies.&lt;/p&gt;

&lt;p&gt;The researchers extracted 823 machine-checkable policies from 12 open-source repositories and evaluated 500 software tasks.&lt;/p&gt;

&lt;p&gt;Agents violated 43.1% of applicable policies in the reported evaluation.&lt;/p&gt;

&lt;p&gt;Nearly half of the violations occurred during execution rather than in the final patch.&lt;/p&gt;

&lt;p&gt;This matters because final-state tests cannot detect every action an agent took.&lt;/p&gt;

&lt;p&gt;For example, an agent might temporarily modify a protected file, run an unsafe command, or use a forbidden dependency. It could then remove the change before submitting the patch.&lt;/p&gt;

&lt;p&gt;A final diff would miss some of that behavior.&lt;/p&gt;

&lt;p&gt;The harness needs to enforce important rules while the agent works, not only when it finishes.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. The agent solves the task but adds unnecessary complexity
&lt;/h3&gt;

&lt;p&gt;Developers often report another problem.&lt;/p&gt;

&lt;p&gt;They ask for a small change, and the agent adds new abstractions, dependencies, or unrelated features.&lt;/p&gt;

&lt;p&gt;The code might compile. The tests might pass. But the team now owns code that nobody requested.&lt;/p&gt;

&lt;p&gt;This is different from a correctness failure.&lt;/p&gt;

&lt;p&gt;It is a scope failure.&lt;/p&gt;

&lt;p&gt;I would track it separately because a successful test result cannot tell us whether the agent made the smallest reasonable change.&lt;/p&gt;

&lt;h2&gt;
  
  
  What a verification harness should check
&lt;/h2&gt;

&lt;p&gt;I would divide verification into five parts.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Layer&lt;/th&gt;
&lt;th&gt;What it checks&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Static checks&lt;/td&gt;
&lt;td&gt;Types, lint rules, formatting, build errors&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Behavioral checks&lt;/td&gt;
&lt;td&gt;Unit tests, integration tests, browser E2E&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Runtime checks&lt;/td&gt;
&lt;td&gt;Actual application behavior, errors, logs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Policy checks&lt;/td&gt;
&lt;td&gt;Protected files, dependencies, permissions&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Scope checks&lt;/td&gt;
&lt;td&gt;Unrelated changes, unnecessary files, extra features&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Each layer catches problems that the others can miss.&lt;/p&gt;

&lt;p&gt;For example, a TypeScript build can pass while a button does nothing.&lt;/p&gt;

&lt;p&gt;A browser test can pass while an agent modifies a protected configuration file.&lt;/p&gt;

&lt;p&gt;A clean diff can still contain a logic error.&lt;/p&gt;

&lt;p&gt;The harness should collect evidence from multiple sources before it accepts a result.&lt;/p&gt;

&lt;h2&gt;
  
  
  Build a basic verification pipeline
&lt;/h2&gt;

&lt;p&gt;Let's start with a TypeScript web application.&lt;/p&gt;

&lt;p&gt;The project has these commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"scripts"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"typecheck"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"tsc --noEmit"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"lint"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"eslint ."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"test"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"vitest run"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"build"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"vite build"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"test:e2e"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"playwright test"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These checks provide useful evidence, but they don't cover every failure.&lt;/p&gt;

&lt;p&gt;We can run them from one verification script.&lt;/p&gt;

&lt;p&gt;Create &lt;code&gt;scripts/verify.sh&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/usr/bin/env bash&lt;/span&gt;
&lt;span class="nb"&gt;set&lt;/span&gt; &lt;span class="nt"&gt;-Eeuo&lt;/span&gt; pipefail

&lt;span class="nb"&gt;mkdir&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; artifacts/verification

run_check&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
  &lt;span class="nb"&gt;local &lt;/span&gt;&lt;span class="nv"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
  &lt;span class="nb"&gt;shift

  echo&lt;/span&gt; &lt;span class="s2"&gt;"Running: &lt;/span&gt;&lt;span class="nv"&gt;$name&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;

  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$@&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="s2"&gt;"artifacts/verification/&lt;/span&gt;&lt;span class="nv"&gt;$name&lt;/span&gt;&lt;span class="s2"&gt;.log"&lt;/span&gt; 2&amp;gt;&amp;amp;1&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then
    &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"PASS: &lt;/span&gt;&lt;span class="nv"&gt;$name&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
  &lt;span class="k"&gt;else
    &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"FAIL: &lt;/span&gt;&lt;span class="nv"&gt;$name&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
    &lt;span class="nb"&gt;cat&lt;/span&gt; &lt;span class="s2"&gt;"artifacts/verification/&lt;/span&gt;&lt;span class="nv"&gt;$name&lt;/span&gt;&lt;span class="s2"&gt;.log"&lt;/span&gt;
    &lt;span class="k"&gt;return &lt;/span&gt;1
  &lt;span class="k"&gt;fi&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;

run_check typecheck npm run typecheck
run_check lint npm run lint
run_check unit-tests npm run &lt;span class="nb"&gt;test
&lt;/span&gt;run_check build npm run build
run_check e2e npm run &lt;span class="nb"&gt;test&lt;/span&gt;:e2e

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"All configured checks passed."&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This script stops when a check fails and saves the output for inspection.&lt;/p&gt;

&lt;p&gt;It also gives the agent a consistent command to run after making changes.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;bash scripts/verify.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For a real harness, I would extend this to produce structured results instead of relying only on text logs.&lt;/p&gt;

&lt;p&gt;The harness should know which check failed, which files it affected, and what evidence it produced.&lt;/p&gt;

&lt;h2&gt;
  
  
  A green result needs a code version
&lt;/h2&gt;

&lt;p&gt;Async tool execution introduces another problem.&lt;/p&gt;

&lt;p&gt;Imagine this sequence:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The agent starts a test run.&lt;/li&gt;
&lt;li&gt;The agent changes the code while the test runs.&lt;/li&gt;
&lt;li&gt;The test finishes successfully.&lt;/li&gt;
&lt;li&gt;The agent treats the result as proof that the latest code works.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The test might have started against an older workspace state.&lt;/p&gt;

&lt;p&gt;Even worse, a test process may read some files before the edit and others afterward.&lt;/p&gt;

&lt;p&gt;That means a green result may not represent one consistent version of the code.&lt;/p&gt;

&lt;p&gt;I would solve this by running verification against an immutable workspace snapshot.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;BASE_SHA&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;git rev-parse HEAD&lt;span class="si"&gt;)&lt;/span&gt;

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Starting verification from &lt;/span&gt;&lt;span class="nv"&gt;$BASE_SHA&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A commit SHA identifies committed code, but it does not identify uncommitted changes. For agent workspaces, we also need to account for staged, unstaged, and untracked files.&lt;/p&gt;

&lt;p&gt;The safer approach is to create an isolated snapshot before verification.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;agent workspace
      |
      v
create immutable snapshot
      |
      v
run verification in snapshot
      |
      v
save results + snapshot ID
      |
      v
compare with current workspace
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the agent changes the workspace after the snapshot, the harness should mark the result as outdated for the current state.&lt;/p&gt;

&lt;p&gt;The agent can still use the result for debugging.&lt;/p&gt;

&lt;p&gt;It just cannot use it as final proof.&lt;/p&gt;

&lt;p&gt;This becomes especially important when a harness runs tests, browser checks, and code reviews in parallel.&lt;/p&gt;

&lt;h2&gt;
  
  
  Verify actual application behavior
&lt;/h2&gt;

&lt;p&gt;For web applications, I would include browser tests that exercise real user flows.&lt;/p&gt;

&lt;p&gt;Consider a checkout form.&lt;/p&gt;

&lt;p&gt;A unit test might confirm that the submit function returns the expected result.&lt;/p&gt;

&lt;p&gt;But the real application can still fail because the button is disabled, the page never updates, or the browser sends an incorrect request.&lt;/p&gt;

&lt;p&gt;A Playwright test can check the user-visible behavior.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;test&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;expect&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@playwright/test&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nf"&gt;test&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;checkout completes successfully&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;page&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;goto&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/checkout&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getByLabel&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Email&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;fill&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;test@example.com&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getByRole&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;button&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Complete purchase&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
  &lt;span class="p"&gt;}).&lt;/span&gt;&lt;span class="nf"&gt;click&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getByText&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Order confirmed&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;toBeVisible&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is an example. A production test should also control the backend, payment service, test data, and expected network responses.&lt;/p&gt;

&lt;p&gt;I would also configure Playwright to save traces and screenshots when a test fails.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;defineConfig&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@playwright/test&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nf"&gt;defineConfig&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;use&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;trace&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;retain-on-failure&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;screenshot&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;only-on-failure&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now the harness has evidence it can inspect.&lt;/p&gt;

&lt;p&gt;Instead of telling the agent only that the test failed, the harness can provide the browser trace, screenshot, console errors, and relevant logs.&lt;/p&gt;

&lt;p&gt;That makes recovery much easier.&lt;/p&gt;

&lt;h2&gt;
  
  
  Enforce repository policies outside the prompt
&lt;/h2&gt;

&lt;p&gt;Most coding agents support instruction files such as &lt;code&gt;AGENTS.md&lt;/code&gt; or &lt;code&gt;CLAUDE.md&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;These files are useful for explaining repository conventions.&lt;/p&gt;

&lt;p&gt;But I would not use them as the only enforcement mechanism.&lt;/p&gt;

&lt;p&gt;If a rule is deterministic, software should check it.&lt;/p&gt;

&lt;p&gt;For example, suppose the agent must not modify files under &lt;code&gt;infra/production/&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;We can add a check against the base commit.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/usr/bin/env bash&lt;/span&gt;
&lt;span class="nb"&gt;set&lt;/span&gt; &lt;span class="nt"&gt;-Eeuo&lt;/span&gt; pipefail

&lt;span class="nv"&gt;BASE_REF&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;BASE_REF&lt;/span&gt;:?Set&lt;span class="p"&gt; BASE_REF to the task&lt;/span&gt;&lt;span class="s1"&gt;'s base commit}"

if ! git diff --quiet "$BASE_REF" -- infra/production/; then
  echo "Policy violation: protected files changed"
  exit 1
fi
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This checks the current tracked-file diff against the base reference.&lt;/p&gt;

&lt;p&gt;It does not detect every possible violation. In particular, it does not inspect untracked files or prove that the agent never modified a protected file earlier.&lt;/p&gt;

&lt;p&gt;For stronger enforcement, the harness should also:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Restrict filesystem access where possible.&lt;/li&gt;
&lt;li&gt;Record tool operations.&lt;/li&gt;
&lt;li&gt;Reject writes to protected paths.&lt;/li&gt;
&lt;li&gt;Run the agent with scoped credentials.&lt;/li&gt;
&lt;li&gt;Review changes before merging them.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The important distinction is between detecting a violation after the fact and preventing the operation.&lt;/p&gt;

&lt;p&gt;A sandbox or filesystem permission boundary can prevent a forbidden write.&lt;/p&gt;

&lt;p&gt;A prompt cannot guarantee that.&lt;/p&gt;

&lt;h2&gt;
  
  
  Let the agent return a verified no-op
&lt;/h2&gt;

&lt;p&gt;FixedBench suggests another useful feature.&lt;/p&gt;

&lt;p&gt;A coding agent should be able to finish without changing code.&lt;/p&gt;

&lt;p&gt;I would define an explicit completion result.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"status"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"no_change_required"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"reason"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"The reported behavior already works."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"evidence"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"reproduction"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"passed"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"regression_tests"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"passed"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"code_changes"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The harness should not trust this object by itself.&lt;/p&gt;

&lt;p&gt;It must verify the evidence.&lt;/p&gt;

&lt;p&gt;For example, it should confirm that the agent ran the relevant reproduction steps and that the final workspace contains no changes.&lt;/p&gt;

&lt;p&gt;If the evidence is incomplete, the harness should return the task for further investigation.&lt;/p&gt;

&lt;p&gt;This prevents a model from claiming success simply because it could not reproduce the issue.&lt;/p&gt;

&lt;p&gt;A failed reproduction attempt and a verified no-op are different outcomes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Handle failed verification without endless retries
&lt;/h2&gt;

&lt;p&gt;Another common problem is the repair loop.&lt;/p&gt;

&lt;p&gt;An agent runs a test, gets an error, changes code, and runs the same test again.&lt;/p&gt;

&lt;p&gt;Sometimes it repeats this process without making progress.&lt;/p&gt;

&lt;p&gt;I would track the history of failed attempts.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"task_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"checkout-142"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"attempt"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"check"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"checkout-e2e"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"failure_signature"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"confirmation-page-timeout"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"previous_attempts"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"increased-timeout"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"added-retry"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"changed-selector"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now the harness can detect repeated failures.&lt;/p&gt;

&lt;p&gt;It can ask the agent to inspect the underlying cause instead of applying another similar fix.&lt;/p&gt;

&lt;p&gt;It can also switch models, request a review, or stop the task when the agent reaches a configured budget.&lt;/p&gt;

&lt;p&gt;I would measure:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Attempts per verified solution&lt;/li&gt;
&lt;li&gt;Repeated failure signatures&lt;/li&gt;
&lt;li&gt;Recovery rate after runtime errors&lt;/li&gt;
&lt;li&gt;Time spent in repair loops&lt;/li&gt;
&lt;li&gt;Cost of unsuccessful attempts&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These metrics tell us more about production reliability than a single pass rate.&lt;/p&gt;

&lt;h2&gt;
  
  
  Measure cost per verified solution
&lt;/h2&gt;

&lt;p&gt;A cheap model can become expensive if it fails repeatedly.&lt;/p&gt;

&lt;p&gt;A more expensive model can save money if it completes the task with fewer attempts.&lt;/p&gt;

&lt;p&gt;The same applies to harnesses.&lt;/p&gt;

&lt;p&gt;A harness might use more tokens but improve verification and recovery.&lt;/p&gt;

&lt;p&gt;To compare systems, I would start with:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cost per verified solution = Total inference and tool cost / Independently verified successes&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Harness&lt;/th&gt;
&lt;th&gt;Total cost&lt;/th&gt;
&lt;th&gt;Verified successes&lt;/th&gt;
&lt;th&gt;Cost per success&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;A&lt;/td&gt;
&lt;td&gt;$100&lt;/td&gt;
&lt;td&gt;40&lt;/td&gt;
&lt;td&gt;$2.50&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;B&lt;/td&gt;
&lt;td&gt;$120&lt;/td&gt;
&lt;td&gt;60&lt;/td&gt;
&lt;td&gt;$2.00&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;C&lt;/td&gt;
&lt;td&gt;$80&lt;/td&gt;
&lt;td&gt;20&lt;/td&gt;
&lt;td&gt;$4.00&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;These numbers are illustrative, not benchmark results.&lt;/p&gt;

&lt;p&gt;Harness B costs more overall but produces verified solutions at a lower average cost.&lt;/p&gt;

&lt;p&gt;I would also report latency and failure rates.&lt;/p&gt;

&lt;p&gt;Cost alone does not capture everything that matters.&lt;/p&gt;

&lt;p&gt;A system that finishes cheaply but takes several hours may not fit an interactive development workflow.&lt;/p&gt;

&lt;h2&gt;
  
  
  A practical verification contract
&lt;/h2&gt;

&lt;p&gt;Before an agent starts a task, the harness should know what successful completion requires.&lt;/p&gt;

&lt;p&gt;I would represent that as a verification contract.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;task&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;checkout-142&lt;/span&gt;

&lt;span class="na"&gt;allowed_paths&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;src/checkout/**&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;tests/checkout/**&lt;/span&gt;

&lt;span class="na"&gt;required_checks&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;typecheck&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;lint&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;unit-tests&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;build&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;checkout-e2e&lt;/span&gt;

&lt;span class="na"&gt;evidence&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;test-results&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;browser-trace-on-failure&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;runtime-logs&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;final-diff&lt;/span&gt;

&lt;span class="na"&gt;limits&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;max_repair_attempts&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;5&lt;/span&gt;
  &lt;span class="na"&gt;max_runtime_minutes&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;30&lt;/span&gt;

&lt;span class="na"&gt;completion&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;allow_verified_noop&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
  &lt;span class="na"&gt;require_clean_verification_snapshot&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is a proposed contract format, not a standard that existing coding-agent tools all support.&lt;/p&gt;

&lt;p&gt;The harness can use it to decide which checks to run, which files the agent may change, and when to stop.&lt;/p&gt;

&lt;p&gt;The model can still decide how to solve the problem.&lt;/p&gt;

&lt;p&gt;But it should not decide whether to skip required verification.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I'd build next
&lt;/h2&gt;

&lt;p&gt;If I were improving a coding-agent harness today, I would prioritize these features:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Immutable verification snapshots.&lt;/strong&gt; Tie every test result to the exact code state.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Executable repository policies.&lt;/strong&gt; Enforce rules during execution.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Browser and runtime evidence.&lt;/strong&gt; Test real behavior, not only compilation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verified no-op completion.&lt;/strong&gt; Let the agent prove that no change is necessary.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Failure-history tracking.&lt;/strong&gt; Detect repeated attempts and unproductive repair loops.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Independent final review.&lt;/strong&gt; Check scope, behavior, and evidence before accepting the result.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I would also test these features across multiple models and repositories.&lt;/p&gt;

&lt;p&gt;A harness improvement that works on one benchmark may not help everywhere.&lt;/p&gt;

&lt;p&gt;The goal is to find which controls improve real task completion without adding unnecessary cost.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final thoughts
&lt;/h2&gt;

&lt;p&gt;Coding agents have become good at producing code.&lt;/p&gt;

&lt;p&gt;But producing code is only part of software engineering.&lt;/p&gt;

&lt;p&gt;We still need to confirm that the code solves the requested problem, follows repository rules, and works in the actual runtime environment.&lt;/p&gt;

&lt;p&gt;A green build is useful evidence.&lt;/p&gt;

&lt;p&gt;It isn't proof that the task is complete.&lt;/p&gt;

&lt;p&gt;I think the next major improvement in coding agents will come from better verification systems around the models.&lt;/p&gt;

&lt;p&gt;That means stronger runtime checks, clearer completion rules, and better evidence for every change.&lt;/p&gt;

&lt;p&gt;The agent can write the code.&lt;/p&gt;

&lt;p&gt;The harness should verify what the code actually does.&lt;/p&gt;




&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.sri.inf.ethz.ch/publications/gloaguen2026coding" rel="noopener noreferrer"&gt;FixedBench — Coding Agents Don't Know When to Act&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://arxiv.org/abs/2610.06193" rel="noopener noreferrer"&gt;SWE-CC — Repository Policy Compliance&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developers.googleblog.com/en/the-anatomy-of-harness-engineering-how-to-evaluate-iterate-and-guard-ai-coding-agents/" rel="noopener noreferrer"&gt;Google — The Anatomy of Harness Engineering&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;I write about coding agents, harness engineering, and the systems behind autonomous software development at &lt;a href="https://al3rez.substack.com/" rel="noopener noreferrer"&gt;al3rez.txt&lt;/a&gt;.&lt;/em&gt; &lt;/p&gt;

</description>
      <category>ai</category>
    </item>
  </channel>
</rss>
