Back to Notes

AI engineering · Evidence

Why AI agents need fixed steps and fixed checks

AI agents are useful and unpredictable. The evidence says the fix is around the agent: a written workflow, checks that give the same answer every time, and a person who decides.

Nils Widal · · 7 min read

An AI agent is a program that uses an AI model to do a task in several steps. It decides what to do next on its own. That is what makes it useful. It is also why two runs of the same task can go two different ways. This note looks at what the published evidence says about making agents dependable.

Workflows and agents are not the same thing

Anthropic, the company that makes the Claude models, published a guide to building agents. It separates two designs. In a workflow, code sets the path and the model fills in steps along it. In an agent, the model picks the path itself. The guide recommends starting simple, and using fixed workflows where a task is well defined, because they are easier to predict.

Most work in a company is well defined in its outline. A code change always needs a branch, tests and a review. A deviation report always needs certain fields and an approval. The outline can be fixed. Only some steps inside it need judgment.

Stripe has written about its internal coding agents, which it calls Minions. Each week, over 1,300 pull requests are merged at Stripe that people reviewed but that contain no code written by a person. Stripe runs them with "blueprints". A blueprint mixes fixed steps with no AI, such as running the linters and pushing the changes, with agent steps, such as doing the task and fixing failed tests. The fixed steps happen the same way every time. If the tests still fail after at most two rounds, the work goes back to a person.

AI output looks right more often than it is right

Veracode, a company that sells security testing, tested code from over 100 AI models in 2025. 45% of the code samples failed its security tests. Newer models wrote code that worked more often, but was not more secure. Its 2026 report found an average security pass rate of 56%. These are vendor studies, built around known kinds of weakness. They still make a simple point: a person reading AI code quickly will miss things that a fixed test would catch.

Spotify wrote about its background coding agent, which makes large code changes across many repositories. Before the agent may open a pull request, Spotify runs checks on the change. These checks are not exposed to the agent, and if one fails, no pull request is opened. An AI judge then compares the change with the original request. Spotify reports that the judge stops about a quarter of the agent's sessions, and that the agent then corrects itself about half the time. Spotify's point is that strong feedback, given automatically, is what makes the results predictable.

What a check is

A check is a small program that tests one result and gives the same answer every time. It does not use AI. For code, checks are the tests, the type checker, the linter and the security scanner. For a document, a check can test that every required field is filled, that every reference points to an approved document, or that a deadline is met.

Each time it runs, a check gives one of three answers:

  1. Pass. The result meets the rule. The work moves to the next step.
  2. Not yet. The result does not meet the rule. The work goes back to the agent with the reason. The agent tries again, up to a set number of tries. After the last try, a person takes over.
  3. Could not check. The check could not run, for example because a system it needs did not answer. This does not count as a failed try, and it does not count as a pass. Nothing passes without a real answer.
The agent drafts. Fixed checks decide whether the draft meets the rules. A person decides whether it is right.

People are poor judges of their own speed with AI

METR, a research group, ran a randomized trial in 2025. Sixteen experienced developers did 246 real tasks in projects they knew well. Each task was randomly allowed or not allowed to use AI tools. With AI, tasks took 19% longer. The developers believed AI had made them about 20% faster.

In February 2026 METR published a follow-up with 57 developers and over 800 tasks. This time the estimates pointed to a speedup: about 18% for developers from the first study and about 4% for new ones. METR says both results are uncertain and could be zero.

The lesson is not that AI is slow or fast. Studies disagree, and the answer depends on the people, the code and the setup. A feeling is not a measurement. A setup that records time, cost and rework for every run lets a team see what is true for it.

AI makes a process stronger or weaker

Google's DORA 2025 report surveyed about 5,000 people in software. Its main finding is that AI works as an amplifier. Teams with good review, testing and standards got better with AI. Teams without them saw their problems grow. The report treats these foundations as things AI depends on, not things it replaces.

What a person still decides

Checks only test what can be measured. A person still decides:

  • which work goes to an agent at all;
  • what the agent should do when the task is unclear;
  • whether a change that passes every check is the right change;
  • whether to merge, approve or sign.

How we apply this

In Widal.Factory today, the steps from ticket to merge are fixed. Your CI runs on every change, an AI reviewer reads it, and a person merges. The hub records the time, the cost and the review rounds of each change. We are now testing workflows written as files, where any step can have its own check script and a limit on tries. A check script must live outside the agent's working folder, so the agent cannot change the rule it is tested against.

Read next: how it works, and why this matters for regulated work.

Sources

  1. Anthropic, Building effective agents
  2. Stripe, Minions: Stripe's one-shot, end-to-end coding agents
  3. Stripe, Minions, part 2
  4. Veracode, 2025 GenAI Code Security Report (vendor study)
  5. Veracode, 2026 GenAI Code Security Report (vendor study)
  6. Spotify Engineering, Background coding agents: predictable results through strong feedback loops
  7. METR, randomized trial of AI tools and experienced developers (arXiv 2507.09089)
  8. METR, uplift update (February 2026)
  9. DORA, 2025 State of AI-assisted Software Development

Tell us which work you want to hand off first.

Book a call