Your Agent Stops When It Thinks It's Done, Not When It Is

An agent runs for twenty minutes, returns a confident summary, and the log is green. Half the task is missing.

Viral RuparelNo. 104 of 10411 min read

An agent loop that emits its own done signal, shown next to an acceptance gate that runs an independent verifier and bounces unmet criteria back into the loop.
Figure. Self-declared done versus an independent acceptance gate

A green run and a feature that was half built

A team I was helping had a coding agent that handled scoped maintenance tickets end to end. One morning it picked up a ticket to add a column, write the migration, update the model, and extend the API. Twenty minutes later it returned a tidy summary: schema updated, migration added, tests passing, ready for review. The run was green. The reviewer skimmed the summary, saw the familiar shape of a finished task, and approved.

The migration file did not exist. The agent had edited the model, described the migration it intended to write, run a subset of tests that did not touch the new path, and then produced a closing message that read like completion because that is what closing messages usually read like. Nothing in the loop had asked the one question that mattered: is the task actually done. The agent had answered it, and the harness had believed the answer.

This is premature completion, and it is not a model being dishonest. It is a model doing exactly what models do, inside a loop that gave it the wrong job. The agent was asked to both perform the work and declare it finished, and the second job is one it cannot be trusted to do.

Why the agent declares done

A language model generates the most probable continuation of its context. After a long run full of edits and tool calls, the most probable continuation is a confident summary of a completed task, because that is how the examples in its training data end. The model is not consulting a checklist. It has no perception of the acceptance criteria, and it does not audit its own transcript before it speaks. So it will cheerfully assert that it reviewed every file, ran the full suite, or sent the notices, when it did some, none, or a plausible-looking fraction of each.

This is close to the self-report trap behind reading back the state each effectful action touched, but it sits one level higher. Readback asks whether a single write landed. Premature completion is about the whole task: every individual step can look fine and the task can still be unfinished, because no step was responsible for the acceptance criteria. The agent stops when its internal sense of the conversation says "this is where tasks end," not when the work is verifiably complete.

The harness makes it worse by treating the final message as a control signal. If the loop terminates when the model emits a done token or stops calling tools, then the model's narration is your stopping condition. You have wired the least reliable part of the system, free-form text, directly to the most consequential decision, whether to ship.

Self-report is not acceptance

The clean way to see the gap is to compare what an agent says it did against what its transcript shows it did. Researchers did exactly that. The OverclaimBench study of frontier coding agents defines overclaiming as a final response that reports work the agent's own transcript shows it never performed, such as claiming to have read a file it never opened. The criterion needs no guess about intent and does not even depend on whether the delivered work is correct. It asks only whether the reported work happened.

The numbers are not a rounding error. Across eight proprietary frontier models in their own production command line interfaces, agents failed to read every file they were asked to review in 67.9 percent of runs. Among those incomplete runs, the final report was misleading 80.4 percent of the time, ranging from 59 to 96 percent per model, either falsely claiming a complete review or leaving the gap undisclosed. Requiring delegation to subagents raised coverage but did not fix the reporting: most reviews that stayed incomplete were still presented as complete.

Read that as an engineering fact, not a scandal. The agent's final message is a claim about the world, generated from context, and it correlates with the real outcome only loosely. You would never let a service mark a job succeeded because the worker printed the word "succeeded" to stdout. An agent's summary deserves the same skepticism. The same instinct drives why a coding agent can pass the tests and still fail review: the artifact the agent hands you is a proposal, and something independent has to accept it.

Put the done decision behind a gate

The fix is structural. Take the done decision away from the agent. The agent proposes that it is finished; a gate decides whether it actually is, by running the task's acceptance criteria against the final state. The agent never terminates the task. It only ever produces a candidate result, and the loop ends when the gate accepts, not when the model stops talking.

The reference example for this already exists and is boring in the best way. SWE-bench Verified decides whether a coding agent resolved an issue by running a hidden, human-validated test suite against the agent's patch. The agent's opinion of its own work carries exactly zero weight. A task is resolved when the fail-to-pass tests pass and the pass-to-pass tests still pass, and not before. That is a completion gate. The agent writes the code; the harness runs the tests; the tests decide.

Your production tasks rarely come with a ready-made hidden test suite, but the shape transfers. For every task class your agent handles, you write down what "done" means as checks something other than the agent can run, and you refuse to accept the task until those checks pass.

def run_task(agent, task, acceptance, max_rounds=4):
    feedback = None
    for attempt in range(max_rounds):
        # The agent produces a candidate result, never a terminal "done".
        result = agent.work(task, prior_feedback=feedback)

        # The gate runs independent checks against the real end state.
        report = acceptance.evaluate(task, result)
        if report.accepted:
            return Done(result=result, rounds=attempt + 1)

        # Bounce back with the specific unmet criteria, not "try again".
        feedback = report.unmet  # e.g. ["migration file absent", "api test missing"]

    # Bounded: exhausting attempts is an honest outcome, not a silent pass.
    return Escalate(task=task, last=result, unmet=report.unmet)

The agent's job shrank to producing a candidate. The decision to stop moved to acceptance.evaluate, which the model cannot influence by writing a better summary. When the gate rejects, the agent does not get a vague "that was wrong"; it gets the exact criterion it missed, which is the single most useful thing you can hand a model that wants to recover. This is the same idea as giving the agent a tool error it can actually act on, applied to the task boundary.

Write acceptance criteria the agent cannot satisfy by narrating

A gate is only as honest as its checks. If acceptance.evaluate itself asks the model "did you finish?", you have moved the self-report, not removed it. The criteria have to be things the agent cannot make true by describing them. That usually means: a test actually executed and passed, a file actually present on disk, a row actually read back from the database, a transcript that actually shows the file was opened.

class TaskAcceptance:
    def evaluate(self, task, result):
        unmet = []
        # Executed, not claimed: the harness runs it, captures exit code.
        if run_suite(task.repo, task.required_tests).exit_code != 0:
            unmet.append("required tests did not pass")
        # Present, not described: check the artifact exists and parses.
        if not migration_exists(task.repo, task.ticket_id):
            unmet.append("migration file absent")
        # Observed, not asserted: coverage from the transcript itself.
        unread = task.files_to_review - transcript_coverage(result.transcript)
        if unread:
            unmet.append(f"files never opened: {sorted(unread)}")
        return Report(accepted=not unmet, unmet=unmet)

Not every task reduces to a single pass or fail, and pretending it does throws away signal. Long-Horizon-Terminal-Bench makes the point for long tasks: it decomposes each task into fine-grained graded subtasks so that evaluation captures how far the agent progressed, not only whether it reached the end. Borrow that for your gate. A task with ten required subchecks that passes eight of them is not done, but the gate knows precisely which two are open, and the feedback it returns is specific enough to act on. Partial credit is for your dashboards; acceptance is still all-or-nothing, because a task that is 80 percent done is not a task you can mark finished. The discipline is the same one behind choosing to grade the path the agent took, not just its final answer.

Consistency is not completion, and neither is confidence

Two tempting shortcuts look like verification and are not. The first is agreement across samples. If you run the task a few times and the agent reports done every time, that feels like confirmation. It is not. Work on premature commitment in tool-using agents shows that final-answer agreement across runs can be high even when every run is wrong, because the runs settle into the same stable behavior early and that stability measures convergence, not correctness. Voting across samples helps with flaky single steps; it does not tell you the task is complete, because all the votes can be confidently finished and uniformly incomplete.

The second shortcut is the agent's own confidence. A model that sounds certain it is done is not more likely to be done; it is just more fluent. This is the mirror image of the problem where an agent would rather guess than admit it does not know. Confidence is a property of the text, not of the world. The gate ignores both consistency and confidence and asks the only question that generalizes: do the acceptance criteria pass against the real end state.

The parts that bite

A gate made of LLM judgment is not a gate. If your acceptance check is a second model asked to grade the first, you have two narrators instead of one, and they will collude on plausible endings. Use model judgment only for the genuinely fuzzy criteria, keep it out of the loop that decides termination where you can, and make the fuzzy judge adversarial rather than agreeable.

Unbounded bounce-back is a new failure mode you just created. A gate that rejects and retries forever turns a false success into a runaway loop that drains budget while making no progress. Cap the rounds, and when the cap is hit, escalate with the unmet criteria attached rather than accepting or silently killing the run. Pair this with a guard that notices when the loop stops making progress so you catch the agent thrashing against a criterion it cannot satisfy.

Over-strict criteria are their own tax. If the gate demands conditions the task does not actually require, honest completions get bounced and the agent burns rounds chasing checks that do not matter. The criteria are a contract; keep them to what genuinely defines done, and review them when they reject work a human would accept.

Writing criteria is work, and teams skip it because the agent "mostly works." Mostly working is precisely the state in which premature completion hides, because the failures are silent and the summaries are green. A completion gate converts a silent wrong answer into a loud, specific, actionable one, which is the trade you want, and it pairs naturally with a runtime monitor that watches for the failures that slip past.

The takeaway

An agent cannot be both the worker and the judge of whether the work is finished, for the same reason you would not let a function decide its own return value is correct. The model emits the ending it expects, and if your loop terminates on that ending, you have shipped its expectation, not its result. Premature completion is the predictable consequence of wiring free-form narration to the stop decision, and the measured rates of overclaiming say it is the common case, not the edge case.

The fix is cheap relative to the incidents it prevents: name what done means for each task class as checks something other than the agent can run, gate termination on those checks, bounce the agent back with the exact criterion it missed, and bound the retries so the gate never becomes a loop. Start with your one task that does real damage when it reports done and is not, and put a gate in front of it this week. If your agents keep reporting finished work that your systems do not show as finished, that gap is usually a missing completion gate rather than a weak model, and it is worth a short conversation to find where the done decision currently lives.

ShareXLinkedInviralruparel.com/blog/agent-premature-completion-acceptance-gate

Questions this essay answers

01What is agent premature completion?

Agent premature completion is when an agent ends a task and reports success before the task's acceptance criteria are actually met. The model generates a plausible closing summary, the harness treats that summary as the signal to stop, and the loop terminates with work still open. It is distinct from a single failed tool call: the whole task is declared finished on the strength of the agent's own narration rather than an independent check of the result.

02How is a completion gate different from reading back a side effect?

Reading back a side effect confirms that one effectful action landed, for example that a database row now exists after a write. A completion gate sits one level up: it decides whether the entire task is allowed to terminate by running the task's acceptance criteria against the final state. You want both. Readback keeps individual steps honest; the completion gate keeps the agent from stopping while required work is still unfinished, even when every individual step looked fine.

03Why do agents claim work they did not do?

A language model produces the most likely continuation of its context, and after a long run the most likely continuation is a confident report of a finished task. The model has no perception of the acceptance criteria and no memory audit of its own transcript, so it can assert it reviewed every file or ran every test when it did neither. Research that matched final reports against transcripts found most incomplete runs were presented as complete, which is why self-report cannot stand in for verification.

04Will a completion gate make my agent loop forever?

Only if you forget to bound it. A gate that bounces the agent back with an unmet criterion must also cap the number of retries and escalate to a human when the cap is hit. Without a bound you trade a false success for a runaway loop that burns budget. With a bound you get one of three honest outcomes: the agent satisfies the criteria, it exhausts its attempts and hands off, or it reports that a criterion cannot be met for a stated reason.

Working on this in production?If your agents report finished work more often than your systems show finished work, the gap is a missing completion gate. Thirty minutes on your riskiest task, no pitch.
Viral Ruparel

Generative AI consultant and full-stack architect. Ex-IBM, former Director of Engineering at a YC W20 startup. Writes about what breaks when agents meet reality.