Skip to lesson
Exit
Building AI-Native Workflows1 / 2

1 min lesson

Stop conditions and budgets

Name the key items in "Stop conditions and budgets", then explain why each one matters.

Step 1 of 2

Stop conditions and budgetsthe part interviewers probe hardest

  • Max steps caps the worst case so a stuck loop can’t run forever.
  • Cost ceiling is a dollar/token budget checked before each model call, not after the bill arrives.
  • Progress detection watches whether the diff or test state is actually moving; if it stalls for N steps, the loop is stuck even though steps remain.
  • Success check is the only happy stop - tests pass and the type-checker is clean, verified by a tool, not asserted by the model.
Watch out

“The model says it’s done” is not a stop condition. The model is the least reliable judge of its own output.

Tie the success stop to a tool result a customer would trust: a green suite, a clean type-check, a passing lint gate.