insideout Get Pro

08 · Knowing when to stop

Pro

Agents, lesson 8

Knowing when to stop

Step limits, budgets and done conditions.

You know the agent loop from "Observe, decide, act": it ends when the model replies without asking for a tool.

Part 1. The model says it's done

The normal ending is the model's own choice: it stops asking for tools and writes an answer. That works most of the time. It fails in two opposite ways. Some runs stop too early, announcing success that didn't happen. Others never stop, trying the same thing again and again.

Here's the early stop. A coding agent edits a function and replies: "Fixed the bug. All tests pass now." The trace shows it edited the file and never ran the tests.

Your turn

What's the real problem in that run?

The edit might be fine. The problem is that "done" rested on the model's word alone. A model writes what a finished run usually sounds like, whether or not it is finished. Endings that matter need evidence, which is the last section of this lesson.

Part 2. Hard caps

Keep going with Pro

You've done the first part. Pro opens the rest of this lesson, and every other one.

Still to come
  1. Hard caps
  2. Spotting a stuck agent early
  3. Check before you accept done
  4. Why the check has to come from outside

Agents overviewSpotted a mistake? Tell us.