This website uses cookies

Read our Privacy policy and Terms of use for more information.

When we design a workflow around a coding agent, we have to decide which parts of the job actually need reasoning. A model can investigate unfamiliar code, choose a repair, and explain the tradeoffs. Once we've settled on a rule that should apply to every change, though, asking a model to interpret that rule on every run gives the developer another decision to check.

I've written about how moving a calculation out of a model changes the cost of a workflow. The question I want to take further is what happens when we remove the agent responsible for a step altogether. Can a developer run that step directly, see what failed, and trust the rest of the workflow to stop when the evidence runs out? Here's how I'd make that decision for a pull request.

Find the part of the instruction you can run

A pull request review can include both “check the patch for trailing whitespace” and “decide whether this retry can charge a customer twice.” The second request takes investigation. A reviewer may need to follow a call into the payment service and find out who owns retries. For the first request, the team can agree in advance on the files, the rule, and what a failure looks like. I'd take that job away from the reviewer.

Suppose the whitespace rule lives in a Markdown file that tells an agent how to review a change. Move the check into a script that takes two commit IDs. Git already knows how to inspect the lines a patch introduces. Here's a shell script a developer or a CI job can run against the same revisions. Git's diff documentation

#!/bin/sh
set -eu
git -c core.whitespace=blank-at-eol diff --check "$1" "$2" --

Save it as check-patch.sh and run sh check-patch.sh BASE HEAD, substituting the two commit IDs. Git also reports newly introduced conflict markers. Your team should decide whether both checks belong in its review policy.

In a small test repository, a commit added two spaces at the end of line two in release.txt. Running the script against the base and that commit reported the file, line number, and trailing whitespace. Comparing the same base with the corrected commit produced no findings and exited successfully. Passing an unknown revision also failed, this time with a diagnostic from Git. That last case deserves a test of its own. A pipeline that only counts findings can mistake an unreadable revision for a clean change. Capture the exit status as well as the diagnostic.

The Markdown can still explain why the team cares about this rule and what to do when it fails. CI can invoke the script directly. Now a developer can reproduce a report locally without reconstructing the agent's conversation.

Give the workflow the next decision

Once a check runs outside the model, there's a second job you can take off its hands. Who decides whether the result still applies after someone edits the code?

ThreadLoop, my open-source tool for tracking a software change through verification and review, records which commit a check ran against. Its tests exercise a case worth trying in your own workflow. A check passes. Another commit lands on the branch. A developer who opens the earlier report can still learn what passed. The workflow now has to decide whether the new commit can enter review before a pull request opens.

A check passes on commit A. Commit B needs its own passing check before review becomes available.

ThreadLoop reads the receipt for the current commit before it offers a review. The earlier receipt stays available to explain the run on A.

In the ThreadLoop integration test, the command that reports the next available action returns no candidate after the commit changes. It identifies the old result as stale. Rerunning the check produces a second receipt. Once that passes, review becomes available again. A neighboring test alters the saved check output. ThreadLoop reports corrupt evidence and offers no next step there either. An agent can investigate either interruption. The developer can inspect the same record to find out why work stopped.

Measure what you get back

Before retiring an agent from a real workflow, I'd run both paths against changes whose expected outcomes the team already knows. Include a clean change, a known violation, a missing input, and a change made after a passing check. Give both paths the same revisions and permissions. Count false passes separately from false alarms. One quietly advances broken work. The other costs a developer time investigating a good change.

Then measure the full cost and elapsed time through a verified result, including retries. In David Parry's benchmark, moving fixed rules into a tool added a model call. On Claude Opus 4.8, the tool-backed path used more total tokens and still cost less because it generated fewer expensive output tokens. That's a good reason to look at your own bill and the time a developer actually waits.

Pick one instruction your agent repeats on every pull request. Describe a pass, a condition that should stop the workflow, and a question you'd still need an engineer to investigate. If a command can handle the first two, let the workflow call it directly. The next time the agent opens the payment code, it can spend its reasoning on whether a retry charges someone twice.

© 2026 Nnenna Ndukwe.

Reply

Avatar

or to participate