← Table of Contents · Page 267 of 868
ENDING A RUN
Part 1 of 10
LEARNING GOALS
By the end of this chapter you will be able to define success criteria and detect completion, write a structured failure report, hand results to a user or another agent, and clean up temporary resources.
KNOWING WHEN YOU ARE DONE
A student who says "I finished the exam" has not necessarily passed it.
Likewise, an agent that says "Done!" has not necessarily completed its task.
Models can sound confident while being wrong.
So the harness needs an objective way to decide whether a run truly succeeded.
SUCCESS CRITERIA AND COMPLETION DETECTION
Success criteria are the specific, checkable conditions that must be true for a run to count as complete.
Good criteria are checked by code or by an independent check, not by the agent's own claim.
For example, a code-fixing agent is finished only when the test suite that failed before now passes.
A report-writing agent is finished only when the report file exists, has the required sections, and passes a format check.
Completion detection is the harness logic that runs those checks and decides.
There are three typical outcomes.
Success means the criteria were met.
Failure means the run stopped without meeting them, because of an error or an exhausted budget.
Partial success means some goals were met and others were not.
Naming these outcomes explicitly lets later software react correctly, for example by retrying only failures.
Advertisement
Read Aloud:
0:00 / 0:00