The Reliability Gap: When AI Agents Can Act, How Do We Know They Did It Correctly?
Part 3 of 3 — Exploring the new era of AI-native software automation. There's something I've noticed about the way we talk about AI agents. We spend a lot of time discussing what they can do. They can browse websites,
Part 3 of 3 — Exploring the new era of AI-native software automation.
There's something I've noticed about the way we talk about AI agents.
We spend a lot of time discussing what they can do. They can browse websites, execute code, interact with applications, access databases, and coordinate multiple tools to complete complex tasks.
And the capabilities are genuinely impressive.
But I think we're overlooking a much harder engineering problem: how do we know an agent actually completed a task correctly?
Imagine asking an AI agent to update a Jira ticket, attach the relevant GitHub pull request and notify the development team on Slack. The agent executes all three actions, receives successful responses from the tools and comes back with a confident message:
"Everything has been updated successfully."
Sounds good. But what if the Jira update went through while the pull request was linked to the wrong issue? What if the Slack notification was sent to the wrong channel? Or what if the tool returned a successful response even though the application hadn't persisted the intended change?
The agent may have completed every step it was asked to perform, at least from its perspective. That doesn't necessarily mean the final outcome is correct.
And that's where I think agent engineering gets considerably more interesting.
A successful tool call doesn't always mean a successful task
In traditional software, we generally have fairly explicit expectations. An API returns a status code, a database operation returns a result, and our application can apply predefined validation rules.
Of course, traditional systems aren't immune to failures either. A successful HTTP response doesn't guarantee that a business process is correct. But with AI agents, there's another layer of uncertainty: the agent itself decides which actions to take, how to interpret their results and whether it believes the task is complete.
Consider a simple example. An agent is asked to update a customer record with a new billing address. It finds the correct customer, calls the update tool and receives a successful response. It then tells the user that the address has been changed.
But did it update the correct address field? Was the record actually saved? Did another process overwrite the change immediately afterwards?
A tool response alone may not answer those questions.
This is why I think we need to distinguish between execution success and outcome verification. One tells us that an operation was accepted or executed. The other tells us whether the intended state was actually achieved.
That distinction becomes increasingly important as agents move from answering questions to performing actions that affect real systems.
The problem gets worse when tasks involve multiple tools
Single-action tasks are relatively easy to reason about. Multi-step workflows are a different challenge.
Let's return to our developer assistant from Part 2. It searches Slack for a bug report, finds the relevant GitHub pull request, locates the Jira issue, updates the ticket, and notifies the team.
What happens if the first four operations succeed but the Slack notification fails?
Should the entire workflow be considered unsuccessful? Should the agent retry everything? What if retrying the Jira update creates duplicate comments or notifications?
This is where ordinary retry logic becomes insufficient.
A reliable agent needs to understand which steps have already succeeded, which ones failed, and whether repeating an operation is safe. It also needs to distinguish between a temporary failure and an operation that should never be repeated without human intervention.
For example, reading a GitHub issue can usually be retried safely. Sending a payment or submitting an order is a different matter.
This brings us to concepts that software engineers have dealt with for years, including idempotency, transaction boundaries, state management, and recovery mechanisms. Agentic systems don't eliminate these problems; they make them more dynamic because the execution path can change depending on the agent's decisions.
Verification needs to become part of the workflow
So what should we actually do about it?
I'd argue that verification shouldn't be treated as an optional final check. It should be designed into the agent's execution process.
For every important action, the system should have a way to establish what happened and compare the result against the intended outcome.
For instance, after updating a Jira ticket, the agent could retrieve the ticket again and check whether the expected fields and links are present. After creating a pull request, it could fetch the PR details and verify the repository, branch and target issue. For a financial transaction, the system might require a separate authoritative confirmation before reporting completion.
Notice that this doesn't necessarily mean asking the language model to judge its own work. In fact, relying on the same model to act and then simply asking it whether it succeeded can create a false sense of confidence.
Whenever possible, verification should use independent evidence: querying the updated record, checking the resulting system state, validating a structured response or comparing the outcome against explicit acceptance criteria.
The more consequential the action, the stronger that verification should be.
A Practical Architecture I'd Consider
If I were putting these ideas together into a production-oriented agent, I'd separate execution from verification rather than allowing the agent to decide entirely on its own whether everything is complete.
Here's a simplified architecture:
- Task definition: Convert the user's request into explicit objectives and acceptance criteria.
- Execution: Allow the agent to select tools and perform the required operations within defined permissions.
- State verification: Independently retrieve or inspect the resulting application state.
- Evaluation: Compare the actual result against the original acceptance criteria.
- Recovery: Retry safe operations, handle partial failures and escalate uncertain or consequential actions.
- Observability: Record the execution trace, tool calls, failures, latency and verification results. The verification layer is particularly important. It shouldn't simply ask the same agent, "Did you complete the task?" It should gather evidence from the systems that were changed.
For example, if an agent is asked to create a GitHub issue, the verification layer could retrieve the newly created issue and check its repository, title, labels and assigned owner. If any required field is missing, the workflow can decide whether a correction is safe or whether a human should intervene.
This also creates a useful distinction between an agent that reports success and a system that can demonstrate success.
Of course, verification has costs of its own. Additional reads, evaluations and model calls increase latency and resource consumption. Not every operation needs the same level of scrutiny. Checking whether a document was opened doesn't require the same verification process as approving a payment or deleting production data.
The right approach is proportional verification: match the strength of the checks to the consequences of getting something wrong.
So, Where Does This Leave Agent Engineering?
Looking back at all three parts of this series, I think there's a common thread connecting them.
In Part 1, we explored how agents interact with applications through APIs, browser automation and computer use. In Part 2, we looked at the growing number of tools available to agents and why discovery and selection matter more than simply exposing everything.
Now, in Part 3, we've reached the question that ties everything together: how do we trust an agent with actions when its execution isn't always predictable?
I don't think the answer is to make agents completely autonomous as quickly as possible. Autonomy without observability, verification and recovery mechanisms is just a bigger surface area for failure.
What interests me more is building systems where an agent has enough freedom to adapt, but the surrounding architecture provides clear boundaries and independently checks important outcomes.
Perhaps that's the real engineering challenge ahead. Not just building agents that can interact with everything, but building agents whose actions we can understand, evaluate and trust.
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.