← Table of Contents · Page 791 of 868
APPENDIX C: PATTERNS CATALOG
Part 2 of 6
EXECUTION PATTERNS
ReAct pattern: the agent alternates between a short reasoning step, an action such as a tool call, and an observation of the result, repeating until it can answer.
Use this when: the next step depends on what the last step found, so you cannot plan everything in advance.
Plan-and-execute pattern: the agent writes a complete plan first, then carries out each step in order, and revises the plan only if something goes wrong.
Use this when: the task can be broken into clear steps up front and the steps are fairly independent of surprises.
Step limit pattern: the harness caps the number of steps in a run and forces a clean stop with a partial report when the cap is reached.
Use this when: always, because any loop can run away if nothing stops it.
Checkpoint and resume pattern: the harness saves the agent's state at chosen points so it can restart from the latest save instead of the beginning.
Use this when: a task is long enough that a crash would waste meaningful work.
Human approval gate pattern: the harness pauses before a risky action and waits for a person to approve it.
Use this when: the action is hard to undo, costly, or touches other people.
Retry with backoff pattern: after a failure the harness waits and tries again, waiting longer each time, and gives up after a fixed number of tries.
Use this when: failures are often temporary, such as a busy server.
Repeated-identical-call guard pattern: the harness notices when the same call with the same inputs keeps repeating and forces a change of approach or a stop.
Use this when: an agent could get stuck asking the same question over and over without learning anything new.
Advertisement
Read Aloud:
0:00 / 0:00