← Agents Behaving Badly
Engineering the Build Loop
This diagram expands the build loop within the inner loop shown in the process map. Prepare context and act, with possible unaided recovery. Optional checks can lead to an intervention decision and a repair attempt whose result is verified. Skip intervention when unwarranted; revisit a failed repair, stop or escalate when blocked, or continue work and submit to the independent evaluator outside the build loop. Across runs, the learning loop records outcomes and costs, compares recovery and intervention, then informs human-approved decisions to retain, revise or retire checks and repeat as conditions change.
BUILD LOOP
LEARNING LOOP · ACROSS RUNS
Without custom checks
No intervention
Optional check
Repair failed
Uncertain / blocked
Continue work
PREPARE
Prepare the context
and tools the agent
needs to work on the
task.
SET THE STAGE
ACT
Ask the agent to act
on the task and
attempt recovery when
it encounters an
error.
CHECK
Check intermediate
work for observable
errors associated
with known failure
modes.
OBSERVE
DECIDE
Decide whether the
evidence warrants a
correction, further
investigation or
continued work.
INTERVENE
CORRECT + VERIFY
Attempt a correction
and check whether it
repaired the error or
introduced another.
INTERVENE
SUBMIT
Continue work or
submit the candidate
for external
evaluation.
Stop or escalate
RECORD
Record outcomes, recovery attempts
and costs.
COMPARE
Compare recovery reliability, costs
and consequences with and without
intervention.
RETAIN, REVISE OR RETIRE
Retain, revise or retire checks
using the evidence, with human approval.
Core work
Optional check and correction
Hand off to the evaluator
Stop or escalate
Activity the step belongs to
Repeat as agents and conditions change