When should an agent stop?
A failed run can still produce useful work.
Two kinds of limit
Stripe lets Minions run continuous integration (CI) checks twice. After the second run, the branch returns to its human operator for scrutiny. Dropbox’s Deflaker instead allows up to five attempts, carrying test logs and notes from the previous attempt into the next. These limits count repair attempts. [1] [2]
DoorDash encountered a different failure: a repeated model request consumed time without advancing the turn counter.
“A turn counter is not a progress detector.”
DoorDash's account of the stalled review. [3]
DoorDash added per-agent deadlines. The soft deadline asks the reviewer to return findings it has already verified and discard speculation. The hard deadline stops it. An elapsed-time limit can catch a stalled attempt that never reaches a retry counter. [3]
Returning useful work
Stopping and handing off are separate decisions. Stripe returns a branch; DoorDash’s soft deadline requests verified findings. Dropbox preserves logs and notes for another attempt. The sources describe different outputs and recipients.
The diagram is our proposed repair loop. It makes the retry branch and the remaining work explicit; it does not describe one implementation shared by these companies.
- Checks passReturn the result to the workflow's next review or publication step.
- Checks fail; budget remainsCarry the failure evidence into a repair, then check again.
- Budget exhaustedStop and return the current work, failed checks, and reason for stopping.
Sources
- Stripe: Minions, part 2CI checks and the return to a human operator.
- Dropbox: Introducing NovaDeflaker and its capped fix attempts.
- DoorDash: How we built an AI code reviewerRepeated requests and per-agent deadlines.