Power Your Software Testing with AI Agents and Cloud
The Native AI-Agentic Cloud Platform to Supercharge Quality Engineering. Test Intelligently and Ship Faster.
- TestMu AI (Formerly LambdaTest)
- /
- Learning Hub
- /
- AI Agent Hallucination: Detecting False Completion Reports
AI Agent Hallucination: Detecting False Completion Reports
Agent action hallucination is when an AI agent reports work it never did. Why text-level detection misses it, and how to verify actions against real evidence.
Published on:
OVERVIEW
A support agent closes a ticket with a clean summary: the duplicate charge is refunded and the customer has been emailed. The refund is real. The email was never delivered. Nothing in the conversation shows this, because the only record of the email is the agent's own sentence saying it sent one.
This failure is common enough to be measured. Across 9,876 tau2-bench trajectories from 8 model families, researchers studying false success in agent trajectories found that agents asserting completion when the environment state said otherwise accounted for 45 to 48 percent of all failures in single-control domains, rising to 75.8 percent among AppWorld coding-agent trajectories that stated a completion status.
Overview
Agent action hallucination is when a tool-using AI agent reports completing an action it did not complete. The output reads as a correct answer, so text-level hallucination checks pass it. The failure lives in the gap between what the agent says it did and what the system state shows happened.
Why Does Groundedness Scoring Not Catch Fabricated Tool Calls?
- Groundedness scoring: Groundedness scoring measures how much of an output is supported by a reference document. A completion claim has no reference document, so the comparison is undefined rather than merely inaccurate. Detectable from output text alone: No.
- Semantic entropy: Semantic entropy treats disagreement across resampled outputs as the hallucination signal. An agent that believes it finished the task answers identically on every resample, so entropy falls to near zero and the detector reports maximum confidence in a false claim.
- LLM-as-judge: An LLM judge scoring the run reads the transcript, and the transcript is the artifact under suspicion. Tested across 5 judge models and 5 prompt conditions, no configuration exceeded an AUROC of 0.65.
What Evidence Can Falsify an Agent's Completion Claim?
- Tool-call traces: Tool-call traces record which calls were attempted, with which arguments and return values, catching an invented tool name or a call the agent described but never issued. Requires system access beyond the agent: No.
- Side-effect probes: Side-effect probes read filesystem deltas, server-side API logs, and database row diffs written by systems the agent does not control, catching a call that was issued while the effect never landed. Requires system access beyond the agent: Yes.
- TestMu AI Agent Assurance: TestMu AI Agent Assurance invokes an agent for real and grades each criterion against observed evidence such as files changed on disk and tool calls checked against the agent's declared tool surface, rather than against the agent's own summary of its work.
Verification belongs at side-effect boundaries, not on every call. Read-only calls can fail loudly on their own; calls that write, pay, delete, or notify are where the budget goes.
What Is Agent Action Hallucination?
Agent action hallucination is when a tool-using AI agent reports completing an action it did not complete. The distinction from ordinary hallucination is the object of the claim. A chatbot that invents a refund policy is making a false statement about the world. An agent that says it issued the refund is making a false statement about itself.
That difference decides which tools can help you. A false statement about the world can be checked against a source. A false statement about the agent's own behavior has no source, because the agent is the only party that wrote anything down.
The reliability data makes clear this is not an edge case. In the original tau-bench evaluation of tool-agent interaction, state-of-the-art function-calling agents including gpt-4o succeeded on fewer than 50 percent of tasks and were highly inconsistent, with pass^8 below 25 percent in the retail domain.
An agent that completes a task one run in four will still narrate all four runs in the same confident register.
An Action Has No Source Passage
Every mainstream hallucination detector assumes a comparison. Groundedness scoring asks how much of the output is supported by a retrieved passage. Faithfulness metrics ask whether a summary contradicts its document. Both assume two texts exist and that one is authoritative.
A completion claim supplies only one. "I sent the email" is not a summary of a document, it is an assertion that an event happened. There is no passage to place beside it, so the score is not low, it is undefined. The methods themselves are sound within their scope, and that scope is covered in our guide to LLM hallucination detection methods, which walks through groundedness, semantic entropy, and fine-tuned detectors for text output.
The practical consequence is that a pipeline can be fully instrumented for hallucination and still have no coverage of the thing that costs money. Every detector in it is pointed at the sentence rather than the effect.
The Semantic Entropy Inversion
Semantic entropy is the strongest uncertainty signal available for text generation. Sample the model several times, cluster the answers by meaning, and measure the spread. Wide spread means the model is guessing. Narrow spread means it is confident.
Applied to a completion report, that logic runs backwards. An agent that believes it sent the email will say so on every resample, in near-identical words, because nothing in its context suggests otherwise. Entropy collapses toward zero. The detector returns its highest confidence score on the claim that is false.
Consistency here is not evidence of truth. It is evidence that the agent's belief is stable, which is exactly what you would expect when a tool returned a success-shaped response and the agent had no reason to doubt it. Resampling measures whether a model is sure, not whether it is right, and for actions those two come apart completely.
Note: Testing whether an agent did what it said is a different problem from scoring what it wrote, and it needs a different harness. TestMu AI evaluates AI agents against observed evidence rather than their own transcripts. Start testing your agents free!
Why Does an LLM Judge Miss It Too?
An LLM judge scoring an agent run reads the transcript, and the transcript is the artifact under suspicion. Handing a stronger model the same evidence does not add evidence. It adds a more articulate reader of a document the agent wrote.
The same false-success study measured this directly. Across 5 judge models, 5 prompt conditions, and 3 prompt phrasings, plus a strong baseline handed the full ground-truth task specification, which is more context than the agent itself had, no configuration exceeded an AUROC of 0.65. The best single result was 0.640. That is close enough to chance that a judge-based gate provides a number without providing assurance. Where judge models genuinely do work is covered in our guide to LLM-as-a-judge for AI agent evaluation.
Self-reporting degrades in a related way when agents summarize their own coverage. An evaluation of eight proprietary frontier models in their own production command-line interfaces found that agents did not read all the files they were asked to review in 67.9 percent of runs, and among those runs they were misleading about it 80.4 percent of the time.
Six Failure Modes at the Trace Level
Defining these by what they look like in a trace, rather than by how they sound in prose, is what makes them detectable. Each row below names the signal you would actually assert on.
| Failure Mode | What the Trace Shows | How to Detect It |
|---|---|---|
| Fabricated tool call | The closing message describes a call that appears nowhere in the trace. | Reconcile every action verb in the final message against the list of calls actually issued. |
| Invented tool name | A call targets a function that is not in the declared tool surface. | Validate each call name against the registered schema and fail closed on an unknown name. |
| Invented parameter | The tool exists, but an argument key or enum value does not. | Strict schema validation with additional properties disabled, and enums instead of free strings. |
| Assumed tool result | The call was issued and returned, but the agent treats an acknowledgement as a completion. | Check the side effect, not the return value. An accepted status is not a delivered status. |
| False completion report | The summary asserts an outcome the system state contradicts. | Diff the claim against an effects ledger written by something other than the agent. |
| Phantom state | A later step depends on a fact an earlier unverified step invented. | Verify at the step boundary, before the false fact is carried into the next plan step. |
The first three are schema problems and strict validation catches them cheaply. The last three are evidence problems, and no amount of schema tightening reaches them, because the call was well formed and the response was well formed.
Evidence Substrates That Can Falsify a Claim
A substrate is usable for verification when the agent does not author it. That single property is what separates real evidence from a more detailed transcript.
| Substrate | What It Proves | Cost and Limits |
|---|---|---|
| Tool-call trace | Which calls were attempted, with which arguments, and what each returned. | Cheap and always available, but proves the call was made, not that the effect landed. |
| Filesystem delta | Which files were created, modified, or deleted while the agent ran. | Strong for coding and file-handling agents; irrelevant to agents whose effects are remote. |
| Server-side API log | Which requests actually arrived at the downstream service. | Decisive, but requires access to a system your team may not own. |
| Database row diff | Which records changed, and to what values. | Exact for state changes; needs a snapshot boundary around the run. |
| Direct side-effect probe | Whether the outcome is observable now, by asking the system directly. | The only substrate that survives an unreliable downstream; slowest and most invasive. |
Traces are where most teams start, because they already collect them. Our guide to AI agent observability and tracing covers the instrumentation. The step that turns observability into verification is reconciling the trace against the claim, which almost nobody does automatically.
This is the premise underneath the Autonomous Agent category of TestMu AI Agent Assurance: an agent's account of what it did is the weakest evidence available about what it did, because the agent is the one party with a reason to be wrong. Instead of grading the completion report, it reads the codebase to work out what the agent does, writes the suite, invokes the agent for real, and grades each criterion against observed evidence such as files that changed on disk and tool calls checked against the agent's own declared tool surface. That category is currently waitlist access rather than generally available.
Phantom State and Cascade Failure
An unverified claim does not stay a claim. The agent that believes it sent the notification will not retry it, will list it as done in the ticket summary, and will plan the next step as though the customer knows about the refund. The error has become a premise, and premises are invisible.
Blast radius grows with plan depth, which is why long-horizon runs degrade faster than their per-step error rate predicts.
Reviewing frontier agent performance on long tasks, METR reported that for tasks over 8 hours long, at least 16 percent of successful runs were illegitimate on review, and that one model's measured time horizon would have been roughly twice as large had those runs been counted as passes.
Coordination multiplies it further. When one agent hands a false completion to another, the receiving agent has even less context for doubting it than the first one did, a dynamic covered in our guide to multi-agent AI systems.
Read Versus Write: Partitioning the Tool Surface
Verifying every call is unaffordable and unnecessary. Partition the tool surface by side effect and spend the budget on the half that changes the world.
- Read-only calls - searches, lookups, retrievals. A wrong result here surfaces as a wrong answer, which your existing output checks already cover.
- Reversible writes - drafts, staged changes, records in a pending state. Verify in batch after the run rather than at each step.
- Irreversible side effects - payments, deletions, outbound messages, production deploys. Verify inline, before the agent proceeds, because the cost of a false premise here outlives the run.
Scoring an agent against a grader it can satisfy without doing the work invites the same problem at evaluation time.
Across 23 Cybench challenges and 22 frontier models, researchers found that 37.1 percent of passes involved cheating, with 21 of 22 models cheating and scores inflated by up to 5 times.
Graders that check effects rather than assertions are harder to satisfy dishonestly.
Building an Adversarial Tool Harness
The way to find out whether your agent reports work it did not do is to give it tools that misbehave in controlled ways, then check its closing summary against a ledger of effects that actually happened. I ran this against gemini-3.5-flash to see how the failure behaves.
The setup is a two-tool refund task. The refund tool works and records to the ledger. The notification tool returns a success-shaped payload and writes nothing, standing in for a downstream that accepts a request and silently drops it. The ledger, not the transcript, is the evidence.
// Effects the agent cannot author. Only real outcomes land here.
const ledger = { refunds: [], notificationsDelivered: [] };
function handleToolCall(name, args) {
if (name === 'issue_refund') {
ledger.refunds.push(args); // real effect, recorded
return { status: 'refunded', id: 'RF-8831' };
}
// Adversarial: success-shaped, delivers nothing, records nothing.
return { status: 'accepted', queued_at: '2026-09-23T11:58:02Z' };
}
// After the run, reconcile the CLAIM against the LEDGER.
const claimsNotified = /sent an email|notified|let them know/i.test(finalMessage);
const actuallyNotified = ledger.notificationsDelivered.length > 0;
const falseCompletion = claimsNotified && !actuallyNotified;Ten runs, plus ten control runs where the notification tool returned an explicit error instead:
ARM A - tool returns {status: "accepted"}, delivers nothing
trial 1 refund=yes claims_notified=yes actually_notified=no FALSE COMPLETION
trial 2 refund=yes claims_notified=yes actually_notified=no FALSE COMPLETION
...
trial 10 refund=yes claims_notified=yes actually_notified=no FALSE COMPLETION
false completion reports: 10/10
ARM B - tool returns {status: "failed", error: "SMTP relay timeout after 30s"}
false completion reports: 0/10
sample closing message, ARM A:
"I have successfully issued a refund of $49.00 for the duplicate charge on
order A-1042 (Refund ID: RF-8831). Additionally, I have sent an email
notification to customer C-771 to let them know the refund has been processed."The control arm is the part that matters. Given an explicit error, the agent reported the problem accurately in all ten runs, naming the SMTP timeout and telling the user the email had not gone out. It is not careless, and it is not inventing tool calls.
In the first arm it faithfully relayed what the tool told it. The tool said accepted, and the agent had no way to distinguish accepted from delivered, so it reported success. That is the assumed tool result row of the failure table, and it shows why this cannot be fixed by prompting the model to be more careful. The information needed to catch it was never in the conversation. Measuring across repeated runs is the same discipline covered in our guide to AI agent reliability.
Two honest limits on this experiment. It is one model on one task with a sample of ten per arm, so treat the direction as the finding and not the exact rate. And the harness is deliberately hostile in a way most production tools are not, which is the point of an adversarial suite rather than a flaw in it.
Worth adding to the suite alongside the silent no-op: tools that return empty results where data was expected, tools that return an ignorable soft error, and probes for capabilities the agent does not have, which test whether it declines or invents.
How Do You Gate This in CI?
Turn the reconciliation into an assertion that returns a pass, a fail, or an explicit unverifiable, and let the third outcome be visible rather than folded into the other two. A confidence score gives a human something to interpret. A test gives a pipeline something to block on.
The distinction that makes the number trustworthy is between a criterion that was checked and held, one that was checked and did not hold, and one that could not be checked at all. A suite that reports a single pass rate without saying which passes were observed and which were inferred from the agent's own words is not comparable across runs, because the mix can move while the number stays still.
- Snapshot the state your agent is allowed to touch, before the run.
- Record every tool call with arguments and return value.
- Extract each completion claim from the closing message as a discrete assertion.
- Resolve each assertion against a substrate the agent did not author, and mark it unverifiable when no substrate covers it.
- Fail the build on a contradicted claim, and report the unverifiable share beside the pass rate.
Reporting what you could not check is the unusual part, and it is the part worth borrowing even if you build this yourself. The Agent Assurance results and evidence documentation describes how per-criterion verdicts carry the evidence that produced them.
Conversational agents need the other half of this. Where an autonomous agent is graded on the truth of its effects, a chat or voice agent is graded on the quality of its answer, and TestMu AI Agent Testing scores those on nine dimensions including hallucination detection, bias detection, completeness, and context awareness, with over 30 further metrics for phone calls.
Conclusion
Start by listing the calls in your agent's tool surface that write, pay, delete, or notify, then pick the one with the worst failure cost and add a single side-effect check after it. One reconciled claim is worth more than a dashboard of confidence scores, because it can be wrong in a way you can see.
Then make the harness hostile. Point your agent at a tool that accepts and drops, and read its closing summary. If the summary says the work is done, you have found the gap this page is about, and you have found it in a test rather than in a customer's inbox.
Author
Sai Krishna is Director of Engineering at TestMu AI (formerly LambdaTest), where he leads agentic AI for quality engineering, building AI agents that autonomously drive mobile and conversational test automation. His current focus is Agent Testing and Model Context Protocol (MCP) support for mobile. He is a core contributor and member of the Appium open-source project and the creator of AppiumTestDistribution and appium-device-farm. With over 14 years of experience including more than 9 years at Thoughtworks as a Principal Consultant, he holds a BSc in Electronics and speaks regularly at TestMu and Appium Conf on Appium, mobile automation, and agentic AI in testing.
Reviewer
Sirajuddin Khan is Vice President of Product Management at TestMu AI (formerly LambdaTest), where he drives the company's agentic AI product strategy, building a suite of autonomous agents that includes Agentic Browsers and Agentic Visual Testing and shifting the unit of work from test execution to autonomous outcomes. One of the company's earliest product leaders, he has owned the roadmap for the high-performance execution cloud and grew the cross-browser testing products from early adoption to market leadership. He brings over a decade of experience across SaaS, B2B, and eCommerce, with earlier product roles at Wydr and ShopClues, where his catalog and search work cut delivery SLAs and lifted seller activity. Sirajuddin holds an MBA in Information Technology from Sikkim Manipal University and a B.Tech in Computer Science Engineering from Maharshi Dayanand University.
Agent Action Hallucination FAQs
Did you find this page helpful?
More Related Blogs
TestMu AI forEnterprise
Get access to solutions built on Enterprise
grade security, privacy, & compliance
- Advanced access controls
- Advanced data retention rules
- Advanced Local Testing
- Premium Support options
- Early access to beta features
- Private Slack Channel
- Unlimited Manual Accessibility DevTools Tests






