Your AI Agent Says Done. What Evidence Should You Check?

An assistant says it created a warehouse ticket. The tool response contains a job ID and a success-class HTTP status, but no ticket number. A few seconds later, the background worker fails.

At the moment it replied, the assistant had evidence of a queued request. It needed evidence of a created ticket. That gap is small enough to disappear in a friendly confirmation, but large enough to leave the user waiting for work that never entered the queue.

We'll use a local Python simulation of ticket creation. It needs no accounts or network access, and all identifiers are fictional. It demonstrates system states and retry behavior; it doesn't run an AI model or reproduce a fault in a live service.

Start with the result the user actually requested

The sample request is to create one ticket in the warehouse queue for account SAMPLE-01, with the subject "Check missing carton." Success means the ticket exists and its account, subject and queue match that request.

It doesn't mean a warehouse employee has read the ticket. It certainly doesn't mean the missing carton has been found. Those are later outcomes that would need separate evidence.

The business-agent information guide explains how to ground answers in product and policy sources. An agent that changes a system needs another kind of evidence: a result tied to the specific operation it was authorized to perform.

Keep the operation ID beside the ticket ID so a reviewer can connect the request to the record it produced. Record which fields matched and when you checked them. If the user also asked for a notification, that needs its own result; finding a ticket doesn't tell you whether an email reached anyone.

Accepted work can still fail

The mock service returns 202 and a queued job ID when it accepts a creation request. It hasn't created a ticket yet. HTTP 202 Accepted allows this distinction: processing is not complete and the eventual action may fail. MDN's status reference explains the semantics.

Our first two cases stop at different points in that workflow. In the first, the job is queued and the ticket count is zero. In the second, the worker runs and fails, still with no ticket. Saying "Ticket created" would be wrong in both cases.

Evidence available Supported statement What to do next
Request accepted; job queued Creation is pending Track the job within a bounded waiting policy
Worker reports terminal failure Creation failed Explain the failure and review the cause
Matching ticket retrieved Ticket created, with its identifier Report the verified result
No reliable result after a timeout Outcome is unknown Reconcile the operation before trying again

A connector can make this easier by returning a clear state and the relevant identifier. "Request successful" leaves the assistant guessing whether the service accepted the request or finished it. If sending is all the connector can verify, the final reply should say that sending is all it verified.

A timeout can hide a successful write

The next case deliberately loses the response after the mock service creates ticket T1. The client sees a timeout. The service has already committed the record in memory.

A timeout describes what the client observed. It doesn't establish that the remote action failed. Retrying immediately as a new operation can create a second ticket.

The simulation looks up the original intent key, retrieves its job, and checks the resulting ticket. Only then does it mark the result confirmed. It can report T1 without creating another ticket.

This is a deliberately constructed failure sequence, not a measured network outage. The point is that the service state and the client's first observation can disagree. Your real connector needs a supported way to reconcile them, such as an operation-status endpoint or an authoritative lookup using a request identifier.

If the lookup is unavailable or inconclusive, keep the outcome marked unknown and give it a named owner for follow-up. Don't leave an unattended retry loop running. A missing record in a search index might reflect delayed indexing, limited permissions or a genuinely absent record. Decide which source can establish the result for the operation you're checking.

Retry the same intent under a documented contract

The mock server recognizes a retained intent key. Within this mock, sending the same key with the same fields returns the original job; it doesn't create another ticket. Sending a new key creates a new operation, even if the fields look identical. Reusing a key with changed fields raises an error.

That gives the exercise a visible contrast. After the same-key retry, there is one ticket. After the new-key retry, there are two. Each record can pass a field check while the overall request, create one ticket, has still been mishandled.

Real APIs define their own retry rules. For example, Stripe documents idempotent requests, including matching parameters and key retention behavior. That is an example of a provider contract, not a guarantee that another ticket or order API works the same way.

Before relying on retries, check the actual endpoint's key scope, lifetime and behavior during concurrent requests or failures. Keep the key tied to the authorized intent. A changed request needs an explicit decision about whether it is a new operation; inventing a new key merely to bypass an error can duplicate work.

Our small dictionary-based mock runs sequentially and keeps keys only in memory. It doesn't implement persistence, concurrent writers, permissions or production recovery. Use it to understand the failure, not as a service to deploy.

Check the business fields after finding a record

Another case creates a ticket and then changes its queue to sales. The ticket exists, and the job says it succeeded. The verifier still returns needs_review, because the requested warehouse result is not present.

This check catches a class of errors that status-only reporting misses. For a file export, verify the expected file and its content. For a scheduled message, check the destination and scheduled time. For a ticket, match the account and queue as well as the identifier. Choose checks that establish the user's intended result without reading unrelated private data.

Don't silently repair a mismatch if that would require a new unauthorized action. Report what exists, what doesn't match, and what correction needs review. Likewise, discovering a duplicate ticket doesn't authorize deleting either copy.

Run the exercise and inspect the evidence

Download the agent completion evidence kit

Run python completion_demo.py with Python 3.10 or later. It writes demo-results.json beside the script. The included output was generated from the local simulation; no live service was called.

The eight cases cover queued work, worker failure, a lost response after commit, both retry-key choices, changed parameters, a wrong queue and an unknown lookup. The companion CSV connects each case to a supported statement and next step.

Try the same exercise with one action your agent performs. Write the completion rule, then make a test connector return pending, failed and ambiguous results. Read what the assistant tells the user at each point. If it says "done" while the record is still missing, you've found a concrete behavior to fix before adding more actions.