When an AI agent says done and it is not: how to verify agent work
AI agents report tasks as complete when they are not. Here is why it happens and a verification routine that catches it for code, content and operations.
AI agents sometimes report a task as complete when it is not: tests that were never run, a file that was never written, an email that was never sent. It happens because the agent's report is generated text, not a readout of what happened. The fix is to stop accepting the report as evidence. For every kind of work, define what proof of completion looks like, and have something other than the agent that did the work check it.
What it looks like in practice
The pattern is the same across very different tools.
- A founder running several agents found that a task marked complete had not been done, and only noticed three days later (dev.to).
- Users of an agent framework reported an agent describing a tool call that it never actually made (CrewAI issue 3154).
- Public reviews of hands-off, company-running products include owners who received progress updates that did not match what had been done.
None of this requires bad intent in the software. A model asked "did you finish?" produces the most plausible answer, and "yes, all done" is very plausible.
Why it happens
| Cause | What is going on |
|---|---|
| The report is not a measurement | The summary is written by the model, separately from the actions it took |
| Lost context | In a long task the agent forgets a step it skipped earlier |
| A silent tool failure | A command failed, the error was not read, and the plan continued |
| Pressure to finish | The instruction said "complete this", so the output says complete |
| No definition of done | Nothing stated what finished means, so anything can count |
The last cause is the one you control most easily.
Rule 1: define done as something checkable
"Add rate limiting" cannot be verified. This can:
- Requests over the limit return HTTP 429
- The response includes a Retry-After header in seconds
npm test -- rate-limitpasses
Write acceptance criteria as observable facts before the work starts. If you cannot state how you would check it, the agent cannot either.
Rule 2: evidence, not statements
Ask for the output, not the claim.
| Instead of | Ask for |
|---|---|
| "Tests pass" | The test command and its full output |
| "I updated the page" | The diff, and the URL returning the new content |
| "Email sent" | The message ID from the mail system |
| "File created" | The path and a directory listing showing it |
| "Deployed" | The deployment ID and the live version check |
An agent can still invent output, but invented output is much easier to catch than an invented summary, because you can re-run the command yourself.
Rule 3: the checker is not the doer
The most reliable check is run by something that did not do the work.
- A script. The best checker is deterministic: a test suite, a link checker, a query that counts rows.
- A second agent. A different model with a fresh context, told to verify and not to edit. We describe that setup in Claude Code and Codex on the same repo.
- You. For anything a script cannot judge, such as whether the copy is any good.
Use them in that order. Your time is the scarce one.
Verification by kind of work
Code. Run the tests yourself or have continuous integration run them against the exact commit. Read the diff for tests that were deleted, skipped or weakened to pass. Check that new tests would fail without the change.
Content. Check that the page exists at its URL and returns the new text. Check every factual claim has a source and every link resolves. An agent will cite a source that does not say what it claims.
Outreach and email. Check the sent folder or the provider's log, not the agent's report. Count messages against the list.
Operations. Check the system of record: the ticket, the database row, the dashboard. If the agent "updated the CRM", open the CRM.
A five-minute routine
Do this once a day for everything agents closed.
- List what was marked done since yesterday
- For each item, find the evidence. No evidence means it is not done
- Spot-check two items fully by re-running the check yourself
- Reopen anything that fails, with the reason in writing
- If the same kind of task fails twice, tighten its acceptance criteria
The spot-check matters more than its size suggests. It tells you how far to trust the rest.
Rule 4: make false completion costly to the process, not to you
When something was marked done and was not, do not just fix it. Change the instruction that allowed it. Add the evidence requirement to your rules file so the next task of that kind cannot close without proof. A correction that lives only in one conversation is forgotten with it.
How CPLai handles verification
For engineering work CPLai builds verification into the flow. The build workflow separates plan, implement, verify and review. Verification is an executed check tied to the commit that was reviewed, and review works hunk by hunk with its own result (Workflows, Development Workspaces). Each run keeps its tool activity, so you can open a run and see what the agent did as well as what it said.
CPLai also checks after the fact. A ticket that is closed against a commit is verified to have actually landed on the branch, and a ticket whose commit never arrived is caught instead of sitting in the done column. We call the rule done means landed. A separate watchdog closes any run that goes silent, so "still working" cannot hide a stuck agent.
One edge to know. For non-code work, such as content, research and outreach, a ticket is closed on review, and your review is the check. The routine above is how to make that review fast.
Sources
- 4 months of running my business with AI agents, dev.to
- CrewAI issue 3154, agent simulating a tool call
- State of Agent Engineering, LangChain, survey of more than 1,300 professionals: quality named as the top barrier to production