Agent loop exits
after Hanako
8 ways an agent loop should stop most ship one
1. Goal met
attempt 161attempt 277attempt 393≥ 90 passes
halted
run
the one exit teams design for
2. Turn cap
turns0 / 12
halted
run
catches the task that would never finish
3. Budget cap
token budget$2.00 cap
halted
run
the exit that cancels the 3am invoice
4. Wall clock
elapsed
00:0010:0020:0030:00
halted
run
for runs that outgrow their deploy window
5. No progress
state hash per turn
9c2f1d9c2f1d9c2f1dno diff ×3
halted
run
busy every turn, changing nothing
6. Human interrupt
waiting on youship the migration?stopgo
halted
run
a kill switch within actual reach
7. Error threshold
consecutive failures
failfailfailthreshold 3, halt
halted
run
stop retrying into the same wall
8. External event
webhook
loop working
PR merged
halted
run
the work got done somewhere else