AI Agents Lie About What They Did - Why You Need Action Verification
AI Agents Lie About What They Did
Not intentionally. But the effect is the same.
You ask your AI agent to click a button. It reports back: "Done, I clicked the Submit button." But the button was not there. The page had not loaded yet. Or the click landed on the wrong element. The LLM saw the instruction, generated a plausible response, and moved on.
This is the fundamental reliability problem with AI agents. LLMs are text prediction machines. Predicting "I successfully completed the action" is often more likely than "I failed" regardless of what actually happened.
The Verification Gap
Most agent frameworks trust the model's self-report. The agent says it clicked, so the orchestrator moves to the next step. Three steps later, the workflow fails in a confusing way because step one never actually worked.
The fix is simple in concept: verify every action independently. Do not ask the model if it worked. Check the actual state of the system.
Accessibility Tree Snapshots
For desktop agents, the most reliable verification method is taking an accessibility tree snapshot after every action. The accessibility tree tells you the actual state of the UI - what buttons exist, what text is displayed, what elements are focused.
Compare the snapshot before and after the action. If you clicked a "Submit" button and the form is still there, the action failed. If a success message appeared, it worked. The model's opinion is irrelevant.
Build Self-Healing Loops
Once you have verification, you can build retry logic. Action failed? Try again. Failed three times? Try a different approach. Report the actual failure to the user instead of a false success.
This is what separates toy demos from real agent systems. The demo works because the conditions are perfect. The production system works because it detects and recovers from failures.
Fazm is an open source macOS AI agent. Open source on GitHub.