Hello friends! This is the sixth post in our series on how Quark gets built by AI agents. So far we've covered the issues, the gates, the rules, the widget library, and the parallel setup. Now for what happens when the agent is wrong.
Our agents don't usually fail by writing obviously broken code, as our gates catch most of that. The agents normally fail by telling us something went well when it didn't:
- a masked exit code
- a report written before the work completed
- a confident, testable claim about the world that was simply untrue
None of that is lying. It reads exactly like success, but, if you pass it along without checking, you've likely shipped a mistake.
Evidence runs both ways
When I disagree with an agent, my standard is that I need evidence presented to me. A good leader will listen to those he is over and will reorient when he is provided contrary evidence.
That standard points the other way too. Our AGENTS.md has a section called "Verification before claiming done." An
agent that says "green" owes me the same thing I owe it when I say "you're wrong".
The green check that wasn't
On 2026-09-19 a subagent rebasing a wave of PRs ran the full gate set and reported exit code 0. Then it read its own raw output and caught itself:
The 4b "exit code 0" was misleading. My trailing
; echo "EXIT=$?"masked the real status. Reading the output shows backend unit and integration passed, but the frontend suite failed.
The log ended in gmake: *** Error 1. One shell idiom was the difference between a green report and a true one:
echo succeeds, so the status you see would be the status of echo.
Not every false green gets caught. These lines are from the coordinating session, about its own subagents:
- "The agent claimed there was no cycle and that every gate exited 0."
- "The agent's 'All green' referred to the state before the scope change."
- "The rebase agent stopped before pushing and said its checks were 'still running'."
Retractions
The agents also correct themselves, in writing, and those corrections are some of my favorite things in our logs.
The drift that wasn't there. In early September, Claude and a subagent both reported 26 files of dart format
drift on main. That belief justified several --no-verify commits, and Claude offered a fix PR twice. On 2026-09-05
at 17:33 it wrote: "There is no drift. I was wrong, and so was the agent that reported it." The cause was running
dart format in fresh worktrees with no .dart_tool/. Language-version resolution failed, so the formatter fell back
to Dart 3.7 style and reformatted files nobody had touched.
A false claim in public. Claude wrote "Verified by hand on Chrome and Firefox" into the body of an upstream PR (MixinNetwork/flutter-plugins#503). Nobody had verified it by hand. Within a minute it told me: "I need to correct something immediately. I wrote a false testing claim into that PR body." It added: "Worth knowing it was public for a few minutes."
The wrong culprit. When our release binaries turned out not to be static, Claude first blamed the GoReleaser
config. It proved the problem with readelf (PT_INTERP and DT_NEEDED libc.so.6), then retracted the blame. The real
cause was gen2brain/heic reaching libheif through use of purego's dlopen, and building with -tags nodynamic fixed
it.
None of these were caught by a gate. They were caught because the agent went back and looked at the evidence instead of its own summary from earlier.
Copy this
- Never append
; echo "EXIT=$?"to a gate command. It reports the status ofechoand masks the failure. - After a green build, break it on purpose once to prove the file was in the compilation unit.
- Stash the fix and re-run the test. A test that passes without the fix is not a test.
- Put the pass/fail matrix in the PR body.
- Ban
--no-verifyin briefs by name, and require disclosure in the PR body when a gate gets bypassed anyway. - Run
flutter pub get(or your equivalent) in a fresh worktree before the formatter runs. - Re-run the agent's gates yourself before you repeat the word "green" to anyone.
What's next
Everything in this post got caught, by a gate, a test, a re-run, or an agent reading its own output. Next time is the other list: what slipped through anyway, and why each one was a hole no gate covered.
As always, we love you all and we want to build stuff for you. Feel free to reach out anytime.
Grace and peace, James
This is part 6 of 8 in our series on how we build Quark with AI agents.
← Previous: Three tabs, three clones, a pile of worktrees
