Source: https://internal-agents.com/lessons/stop-a-run

[← Lessons](https://internal-agents.com/lessons)

01 / Run limits

# When should an agent stop?

A failed run can still produce useful work.

11 September 2026 · Updated 16 September 2026 · 2 min read

## 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]](https://internal-agents.com/lessons/stop-a-run#source-stripe) [[2]](https://internal-agents.com/lessons/stop-a-run#source-dropbox)

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]](https://internal-agents.com/lessons/stop-a-run#source-doordash)

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]](https://internal-agents.com/lessons/stop-a-run#source-doordash)

## 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.

**Inspect the result of an attempt** Check the output and the remaining attempt or time budget.

**Checks pass** Return the result to the workflow's next review or publication step.

**Checks fail; budget remains** Carry the failure evidence into a repair, then check again.

**Budget exhausted** Stop and return the current work, failed checks, and reason for stopping.

Our proposed control flow. A passing check still leaves any required human approval in place.

## Sources

1. [Stripe: Minions, part 2](https://stripe.dev/blog/minions-stripes-one-shot-end-to-end-coding-agents-part-2) CI checks and the return to a human operator.
2. [Dropbox: Introducing Nova](https://dropbox.tech/machine-learning/introducing-nova-our-internal-platform-for-coding-agents) Deflaker and its capped fix attempts.
3. [DoorDash: How we built an AI code reviewer](https://careersatdoordash.com/blog/doordash-built-an-ai-code-reviewer-engineers-actually-listen-to/) Repeated requests and per-agent deadlines.

### Related items

[Stripe in the catalog](https://internal-agents.com/agents/stripe-minions) [Dropbox in the catalog](https://internal-agents.com/agents/dropbox-nova) [DoorDash in the catalog](https://internal-agents.com/agents/doordash-code-review)

[All lessons](https://internal-agents.com/lessons) [Next: More comments can mean more work →](https://internal-agents.com/lessons/review-noise)
