Blog

Field notes

Can you trust code written by AI agents? One change, traced to production

AI agents write code faster than anyone can check it. One real change, traced from request to production, shows the checks that make agent speed safe, and what to ask your own team.

By Canisius Rozario ·

Building with AIAI-built appsWorking with developers

Fast code isn't the hard part

AI made code cheap. Checking it is now the slow, expensive part.

Agents now write most of the code on teams that use them. In Sonar's November 2026 survey of 1,026 developers and engineering managers, AI generated or significantly assisted an average of 65% of the code they commit. The checking hasn't kept up.

Unchecked speed is how apps end up in the patch loop. Slowing the agents down isn't the answer. Checks they can't skip are the answer, as long as those checks are fast too.

One change, traced to production

Three and a half hours to production, three checks that sent work back, then two days in shadow mode.

AI agents write almost all of the code on a production platform I run. Staff there use a work board to pick up items that need billing. The people who use it told me the board kept filling with items years old, most of them already settled some other way. So I set a rule: show an item only when its source document is from the last 12 months, and let older items drop off on their own, with no cleanup job.

It's a small rule, but it touches money on a screen people act on. That puts it on the strictest path we have.

One change, by the clock

  1. 9:07Design writtenThe rule, real before-and-after counts, every part that reads the data
  2. 9:14First build, behind an off switchNothing changes for anyone until it's turned on
  3. 9:25Design check sends it backThe rule ran in the wrong order and would have changed trusted numbers
  4. 9:37Tests that prove they can failEach guard broken on purpose to show a test catches it
  5. 11:29Two outside readers find gapsCases where hiding an item was the wrong answer
  6. 11:32Independent review holds the workFour accepted fixes were missing from the code
  7. 12:00Second review passesThen the automated gate, on the exact version reviewed
  8. 12:14Merged with three receiptsRefused without them
  9. 12:38Deployed in shadow modeRunning on real data beside the old rule, without changing what anyone sees
  10. Day 3Turned on, then checked in a real browserAfter two days of matching results, a browser agent used it on a laptop and a phone, and a person checked it too

Sent work back

Three of the ten steps sent work back. That's the system working.

What the checks caught

Each check looked for something different, and each one found something.

The design check

The first design would have changed numbers people already trusted.

Before any code, the agent wrote the design: the rule stated exactly (an item dated on the cutoff stays, and February 29 becomes February 28), before-and-after counts measured on real data and all 16 places in the system that read these items. A separate check, built to refute rather than agree, compared that design with the code and with real counts. It found the new rule ran before the board's existing rules, which would have shifted items between counts already on screen. Running it last fixed that, and every existing count then matched exactly with the rule on or off.

Two outside readers

Readers who never saw the author's reasoning found where hiding an item was wrong.

Because the change touches money, a script that reads every change required two independent readers: AI models from two different companies, given the design and the problem but not the author's conclusions. Every finding got a written decision. Items waiting on a person's judgment now never leave the board, so a decision doesn't quietly become a number. An old item stays visible when a recent item depends on money it carries. One finding was accepted as a risk on purpose: a person can still act on an old item deliberately, because the rule is about what the board suggests, not what people may do.

The independent review

It checked the code, not the summary, and sent the work back.

A separate agent reviewed from its own copy of the code. It found four fixes that had been accepted on paper but weren't in the code yet, each with a script that showed the gap. The work was held, the fixes were built, and the second round passed with nothing blocking. That's the review I value most.

Landing and switching it on

Nothing merges without receipts, and nothing turns on by itself.

The automated test gate ran on the exact version the reviewer passed. The merge carries a receipt from each check, pinned to what it vouched for, and is refused without them. Most of the change was tests: 74 of them, plus 57 deliberate bugs planted to prove the tests catch real breakage.

The code reached production switched off and ran in shadow mode for two days: the new rule worked on real data beside the old one, and we compared what it would hide with what the board actually showed, without changing anything anyone saw. Only then was it turned on. A browser agent then used the board on a laptop and a phone the way staff would, and because this change touches money, I checked it myself too. A test can't tell you whether people can actually see and use the thing.

Seven habits that make agent speed safe

None of these habits are new. What matters is that the agents can't skip them.

The same habits run the systems we build for clients:

What this means for you

You don't need to read code to ask for these checks.

Pick your situation

I don't write code

Ask for the record, not the reassurance.

Ask your team to show you:

  1. The written rule and the real numbers behind the last change, from before it was built.
  2. Who reviewed it, and whether they read the code or a summary of it.
  3. What their checks sent back in the last month.
  4. How a new feature runs in shadow mode before customers see it, and who decides when it turns on.

I run an engineering team

Start with the habits that pay back fastest.

  1. Keep reviewers blind to the author's conclusions. It costs nothing and changes what they find.
  2. On anything that touches money or data, prove the tests can fail. That's where a test that tests nothing costs most.
  3. Then make every habit impossible to skip, with a merge step that refuses work without its receipts.

I'm hiring a team that uses AI

Ask how they check the work, not how fast they write it.

  1. Ask them to walk you through one recent change, from request to production, with the record of every check.
  2. Ask what their checks caught and sent back recently.
  3. Be wary of anyone who sells speed in lines of code or features a day.

If you'd like senior eyes on how your product is built and checked, that's what a Blueprint is for: a straight verdict, the risks ranked by cost and a phased plan with a fixed quote. See how a Blueprint works.