Skip to main content

How an AI agent ends a run

Learn the built-in ways an AI agent ends a step run — conclude, ask the user, or report an error — and when the workflow can advance versus stay open

When an AI agent works on a workflow step, it does not simply stop when it thinks the work is done. It must explicitly tell the Thunk.AI runtime that this run should end.

That handoff uses a small set of built-in control actions. They are not business tools you enable or configure like email or web search. They are how the agent ends the current run and returns control to the platform.

Control actions in the agent loop

Each step run is an AI agent execution inside the AI Guardian. The guardian invokes the model in a loop: the agent chooses a tool, the platform validates and runs it, and the result is fed back for the next decision.

That loop continues until the agent uses one of these control actions:

Control action

What it means

What you typically see in step chat

Conclude

This run is finished (successfully or as a deliberate wait/pause)

Conclusion: plus a short summary

Ask the user (ask_user)

The agent needs a person to answer before it can continue

Question: plus the question text

Error

The agent hit a problem it cannot recover from

Error: plus a short description

Until one of those happens, the runtime treats the run as still in progress.

Even a short successful step often ends with a conclude call after the agent has recorded results or taken actions. That extra round-trip is part of why LLM cost and latency scale with the number of steps and work items.

Conclude

Conclude is the usual successful end of a run. The agent hands control back and indicates why this run is ending. Common outcomes:

Finish the step

The agent has completed the work for this step on this work item. The platform may then mark the step done and advance the workflow to the next step — if automation settings allow it (for example, when a human is not required to review and finish the step).

Wait for a conversation reply

The agent has done what it can for now and needs an inbound message — for example after sending an email and waiting for a reply on a conversation property. The step stays open. When the reply arrives, a new agent run continues the work.

Wait for the next scheduled run

For scheduled or recurring work, the agent may finish the current pass and wait for the next timer rather than closing the step. The step remains active until a later run decides the work is truly finished.

Pause for a person

The agent stops this run and leaves the step waiting for a person — for example when the instructions say not to finish yet, or to wait for a teammate. Someone can continue in the step chat or use Finish step when ready.

How instructions steer conclude

The agent chooses among these conclude outcomes based on the step's AI instructions and the current data. Wording matters.

  • If a step should stay open until a reply or document arrives, say so explicitly (for example: "Do not finish this step until a response with the required documents is received.").

  • If the step should close after one outbound action, say that finishing is allowed once that action is done.

  • Vague instructions that describe an email send but never say to wait often cause the agent to conclude as finished too early.

These concluding conditions in the AI instructions guide the agent's judgment. They are different from a platform proceed rule under Workflow Options (covered below).

For patterns and examples in email workflows, see Conversation properties for email.

Platform checks when the agent tries to finish

Calling conclude intending to finish the step does not always advance the workflow by itself. The platform still applies the step's automation and gating rules:

  • Human-in-the-loop / require human to finish — If the thunk or step requires a person to review and finish the step, the agent's conclude summary is recorded, but a person must complete the handoff.

  • Step Finish Condition — A proceed condition under Workflow Options is evaluated when the agent tries to finish. If the work item does not match, the step stays open even though the agent concluded. The platform may append a note to the conclusion message — for example Finished step because finish conditions were met, Did not finish step because finish conditions were not met, or Finish conditions were met, but a human must finish the step — with a link to Workflow Options. See Control when a step runs and proceeds.

Other conclude outcomes (wait for a reply, wait for a schedule, pause for a person) do not try to auto-advance the workflow and do not evaluate that proceed condition.

Ask the user

Ask the user (ask_user) ends the run because the agent needs information or guidance from a person before it can continue.

Typical reasons:

  • Required input is missing and cannot be found with available tools

  • Instructions tell the agent to ask for confirmation or a choice

  • The next action depends on a human decision

The step stays open waiting for a person. In step chat you see a Question: message. After someone answers in the chat, a new agent run can continue.

Use this when the agent should pause for a direct answer in the step chat. Prefer conclude with wait-for-conversation when the work is waiting on an external reply (for example an email thread on a conversation property), not a chat answer from the assignee.

Error

Error ends the run because the agent hit a problem it cannot recover from — for example invalid inputs, a blocked tool after retries, or instructions that conflict with what the data allows.

The step does not auto-advance. In step chat you see an Error: message with the agent's description. A person can inspect the step, fix data or instructions, and continue or finish the step manually.

An error end is different from a successful conclude that pauses or waits. Error means "I could not complete this run"; wait/pause conclude means "I stopped on purpose until the next event."

Choosing the right end

Situation

Prefer

Work for this step is done (or done until a reply / timer / teammate)

Conclude with the matching outcome

Need a person to answer in step chat before continuing

Ask the user

Cannot recover; need a person to intervene

Error

Your AI instructions should make the intended path obvious: when to finish, when to wait, when to ask, and when to stop with an error instead of guessing.

Tips

  • Treat conclude, ask the user, and error as the agent's end-of-run signals — not as optional business tools.

  • Write clear finish-versus-wait guidance; do not rely on the model to infer when to hold a step open.

  • Use Workflow Options proceed conditions when a finish rule should be enforced by the platform, not left to the agent's judgment.

  • A person can still use Finish step when the agent has paused, asked a question, reported an error, or when a proceed condition kept the step open.

  • If instructions say "ask if unsure," the agent may use ask the user instead of concluding — that is expected, not a failed conclude.

Did this answer your question?