Imagine asking an AI agent to fix a bug. It reads the code, makes a change, runs the tests and reports success. That sounds reasonable. But suppose the tests never covered the bug. They passed before the change and still pass afterwards. The agent has evidence that the tests pass. It has no evidence that the bug is fixed.
This is the question I keep coming back to as I read about agents. I’m less interested in what they can do than in how they decide they’ve done it. There’s a gap between finishing a sequence of actions and knowing those actions worked, and I suspect a lot of what makes an agent trustworthy lives in that gap.
I’m thinking about this from the outside rather than as someone who has built one, so what follows is a working answer, not a recommendation.
What would count as done?
For the bug, a better check starts before the fix: reproduce the reported failure first. Then make the change and run the same check again. If the failure has gone, the agent has evidence tied to the task itself. It hasn’t proved the whole application works, but it has shown that the specific thing asked for happened. Developers will recognise this as the habit of writing a failing test before fixing anything.
The same idea applies beyond code. If an agent creates a document, saving the file shows that a file exists. Opening it, checking that it contains what was asked for and checking that it reads well each answer a different question. Which questions matter depends on what the person wanted.
So my working answer is that “done” should be defined before the work starts. “Fix the bug” leaves room for interpretation. “This input currently produces this error, and afterwards it should produce this result” gives the agent something to check against, and gives the person something to check too.
Who checks the checker?
That raises a harder question. If the agent decides what success looks like and then checks its own work, any blind spot it had while doing the task is likely to carry into the check. It’s the same reason people ask someone else to proofread: you tend to read what you meant to write.
I can imagine a few ways around this. The person and the agent could agree on the success check at the start. A separate process could review the result without seeing how it was produced. Or the check could be written before the work, so it can’t be shaped to fit the outcome. I don’t know which works best in practice, but I’d be wary of any setup where the agent is the only one marking its own homework.
When to stop
Completion is only one reason to stop. An agent might need information it can’t find, permission it doesn’t have, or a decision that belongs to the person. Or it might keep trying variations of the same approach without getting any closer.
That last case seems the trickiest. My instinct is that another attempt is worth making while each try teaches something new, and stops being worth it once attempts start repeating. At that point the useful thing is a clear handover, not more effort.
What a good report looks like
Consider two ways the bug-fix task could end:
Fixed the bug. All tests pass.
I reproduced the error using the input from the report, changed how dates are parsed, and the same input now works. The existing tests pass, but none of them covered this case, so I added one. I haven’t checked other date formats.
The first sounds more confident. The second is more useful, because it shows what was actually established and where the edges are. A partial result is still valuable when its limits are visible. The problem is a report that sounds more certain than the evidence allows.
So when an agent says a task is done, that’s what I want to know: what has it actually established?
If you work with agents and have seen good (or bad) answers to this, I’d like to hear about it. Get in touch.