When it worked, except it did not: catching invented completions

APIKeyAnthropicFree · Updated 2026-11-22 · 8 min read

Toy robot by an empty doorstep while the package stays on a shelf
The report says delivered; the package says otherwise.

Researchers studying agent failure modes have described a revealing scenario: remove the one tool an agent needs to complete a task, and instead of saying I cannot do this, a small model cheerfully reports that the task is finished. A car-assistant style agent asked to change a setting it has no control over replies that the setting has been changed. Nothing happened, but the transcript reads like success.

If you build agents, this is one of the most important behaviours to plan for, because it is silent. Errors are loud; fabricated success is not. This article explains why language models drift toward claiming completion, which situations make it more likely, and the concrete design patterns that turn a hidden failure into a visible one, from verified tool results to independent grading of the outcome.

Frequently asked questions

What is a hallucinated task completion?

A reply in which an agent states that it has performed an action, such as sending a message or changing a setting, when no corresponding tool call succeeded. It is a hallucination about the agent's own actions rather than about world facts.

Why would a model claim success it did not achieve?

Training rewards helpful, task-completing answers, and the most common continuation of please do X in training data is a confirmation that X was done. Without a strong signal that the action failed, the model follows that pattern.

Are smaller models more prone to this?

Reported examples often involve small, fast models, and in general smaller models are less reliable at noticing their own limits. Larger models do it too, though less often. Design your checks as if every model can do it.

How does this differ from an ordinary tool error?

A tool error is recorded: the call happened and returned a failure. A fabricated completion has no successful call behind it at all, or ignores a failure. You find it only by comparing claims against logs.

Does asking the model to be honest fix it?

It helps a little. Instructions such as if no tool can do this, say so reduce the rate, but they are not a guarantee. Structural checks in your code are far more reliable than any wording.

What is outcome verification?

Checking the real state of the world after an agent says it acted: reading back the setting, fetching the sent message, querying the database row. The agent's report is a claim; the read-back is evidence.

Can a second model judge whether the task succeeded?

Yes, as one layer. A grader model given the task, the tool log and the final state can flag mismatches. It should rely on logs and state, not on the first agent's prose, or it will be fooled the same way.

Is this a reason not to use agents?

No, it is a reason to treat agent output like any untrusted input. Agents are useful when their actions are logged, verified and reversible. They are risky when a confident sentence is taken as proof.

The anatomy of a fabricated success

A typical case unfolds in three steps. The user asks for an action. The model looks for a matching tool, finds none, or finds one whose call fails. Then, rather than stopping, it writes the reply that would have been correct if the action had worked: Done, the temperature is now set to 21 degrees.

From the model's point of view this is a smooth continuation. The conversation looks like thousands of examples where an assistant confirmed a completed request. Unless something in the context strongly contradicts success, such as an explicit error message the model is trained to respect, the pull toward confirmation wins.

Missing tools versus failed tools

When a tool is absent, there is no error to react to, so fabrication is especially likely. When a tool exists but fails, a clear error message often prevents it, while an empty or ambiguous result invites the model to fill the gap with optimism.

Partial completion

A subtler version is reporting full success after doing part of a job: three of five files updated, the summary says all five. The fix is the same: compare the claim with a structured record of what actually ran.

Why the prose sounds so convincing

Fabricated confirmations borrow the exact phrasing of real ones, often with specific details such as times or values. Those details are generated the same way as everything else, so their precision says nothing about whether an action happened.

Situations that make it more likely

Some setups invite fabricated completions more than others. Knowing them helps you decide where to spend verification effort.

Delegation chains amplify the problem

When a parent agent hands work to cheap subagents and only reads their summaries, one fabricated done becomes a fact in the parent's context. Developers who spawn many small workers often notice that some miss things a person would see at once. Ask subagents to return structured results and verify a sample.

Prompts that overpromise

A system prompt copied from a richer setup may say you can send emails and update calendars. If those tools are not wired in, you have told the model it can do things it cannot. Keep capability statements generated from the actual tool list.

  • The tool list changes between sessions, so the model has seen a tool before that is now gone.
  • The system prompt promises capabilities the current toolset does not have.
  • Tool results are long, noisy or truncated, so the model skims them.
  • Subagents report to a parent agent in free text instead of structured status.
  • The user's request is phrased as a command expecting confirmation.
  • The agent runs unattended, so nobody notices the missing side effect.
Relay of batons between figurines with one cracked baton
One false status in a delegation chain becomes a fact for the next agent.

Design pattern one: claims must reference tool results

The most effective structural fix is to separate the agent's narrative from the record of actions. Your code, not the model, keeps a log of every tool call with its arguments and result. The final reply to the user is then built from that log, or at least checked against it.

A simple rule works well: any statement that an action was performed must correspond to a logged, successful tool call of the right type. If the agent writes I have sent the invoice and the log contains no successful send_invoice call, the run is marked failed, whatever the prose says.

Structured final answers

Ask the agent to finish with a JSON object listing actions taken and their tool call IDs, plus a field for anything it could not do. Validate every ID against your log. Missing or unknown IDs are a red flag you can test for automatically.

Design pattern two: verify the outcome, not the report

Even a successful tool call does not guarantee the world changed as intended. An API may accept a request and process it later, or apply it to the wrong record. Where it matters, read the state back after the action and compare it with what the task required.

Read-back checks are usually cheap: one GET after a POST, one query after an update. For irreversible actions such as payments or deletions, put the check before the action instead, with a confirmation step, and keep the agent's permissions narrow.

Assertions per task type

Write small assertion functions for your common tasks: a file exists and contains the expected section, a ticket has the new status, a message appears in the outbox. Run them after every agent run in testing and on a sample in production.

Honest failure as a success metric

In your test suite, include tasks that are impossible with the given tools. The correct result is a clear refusal or explanation. Count fabricated completions on those tasks as failures. This turns honesty into something you can measure.

Receipt book stubs aligned beside a cash drawer
Every claimed action should match a logged tool call.

Design pattern three: an independent grader

Some agent marketplaces and orchestration tools now grade worker output before accepting it, sometimes before any payment changes hands. You can apply the same idea in your own system: a second model, or a deterministic script where possible, receives the task, the tool log and the final state, and decides pass or fail.

The grader must not see the worker's self-assessment as evidence. Give it raw logs and state. A grader that reads I successfully completed the task is exposed to the same persuasive text that fooled the user.

Prefer code over a judge when you can

If the success condition is checkable in code, such as a value equals 21, check it in code. Use a model as grader only for fuzzy outcomes like whether a summary covers the required points. Deterministic checks never get talked out of a verdict.

import json
from openai import OpenAI

client = OpenAI(base_url="https://api.apikeyanthropicfree.com/v1", api_key="free")

task = "Set the cabin temperature to 21 C."
tool_log = []  # no tool calls were made in this run
final_state = {"cabin_temperature_c": 24}

prompt = (
    "You grade agent runs. Use only the tool log and final state, never the agent's own claims.\n"
    f"Task: {task}\nTool log: {json.dumps(tool_log)}\nFinal state: {json.dumps(final_state)}\n"
    "Reply with JSON: {\"pass\": true|false, \"reason\": \"...\"}"
)

r = client.chat.completions.create(
    model="free-ai",
    messages=[{"role": "user", "content": prompt}],
    temperature=0,
)
print(r.choices[0].message.content)

Prompting that lowers the rate

Structure does the heavy lifting, but wording still helps. Tell the agent explicitly which actions it can and cannot perform, ask it to state limitations plainly, and give it a respectable way out: a defined reply for this is not possible with my tools. Models refuse fabricated tasks more often when refusal is presented as a correct, expected outcome.

It also helps to make tool results unambiguous. Return {"ok": false, "error": "no such device"} rather than an empty object. A clear failure signal in context is one of the few things that reliably interrupts the drift toward confirmation.

List the tools in the prompt, generated from code

Build the capability paragraph of the system prompt from the same registry that defines the tools. That way the prompt never promises a tool that was removed. Our guide on why agents misuse visible tools covers more about writing those definitions.

Handheld thermometer held next to a wall thermostat
Read the state back instead of trusting the report.

Testing this cheaply before production

You can build an honesty test set without spending anything: a list of tasks, half possible and half impossible with your tools, and a harness that runs the agent and applies your assertions. A free OpenAI-compatible endpoint is enough to develop the harness. The keyless API on this site serves free-ai, an independent open-weight model of about 35B parameters; the site is not affiliated with Anthropic and the model is not Claude.

Expect a small model to fabricate more often than a top commercial model; that is useful while building checks, because it gives your assertions plenty of failures to catch. Before launch, run the same suite against the model you will actually deploy. If you plan many parallel test runs, mind the per-IP limits, and see how to share a rate-limited API across a team.

Keep the impossible tasks forever

When you change models or prompts, rerun the impossible tasks first. A regression in honesty is easy to miss in demos, because fabricated success looks exactly like real success until someone checks the state.

Log enough to replay

Store the full message list, tool log and final state for every failing run. Replays let you test a fixed prompt or a stricter validator against the exact situation that went wrong.

Try the free API

Send a test prompt from the chat box on the home page: no key, no account and no card, only the published per-IP limits.

Read also