Add a written goal, regular goal checks, a step limit and a stop-for-review checkpoint to long agent runs, so drift shows up mid-run instead of at the end.
Who it is for
Owners running agents on long tasks, such as cleaning a list, building a report or updating many records, who find the final result is not what they meant.
Tools
Your agent's task instructions
A 3-line goal
A step or time limit
Steps
Before the run, write the goal, what done looks like, and what must not change, in 3 lines.
Add the checkpoint rules from the prompt below to the task.
Set a stopping condition, such as a maximum number of steps. Anthropic's guide to building agents describes checking progress against real results at each step, pausing for human feedback at checkpoints, and using stopping conditions like iteration limits.
At each checkpoint, read the agent's goal check. If it has drifted, stop and restate the goal.
When a tool or setting changed recently, run a small test task first and compare with a past result.
Keep the 3-line goal with the output so you can check the end result against it.
The prompt
Add these rules to this task:
Goal: [ONE LINE]
Done looks like: [ONE LINE]
Must not change: [ONE LINE]
1. Every [5] steps, stop and report: the goal in your own words, what you changed since the last check, and whether each change serves the goal (yes or no, with a reason).
2. If any answer is no, or you are unsure, pause and ask me before continuing.
3. Stop after [30] steps in total and report, even if not finished.
4. Before anything that cannot be undone, stop and ask.
Tips
The 'must not change' line catches the most drift.
Short checkpoints early, longer gaps once it is on track.
A tool update can change behavior with no error; test small first.