Knob
Try cap
You might say: retry budget, max attempts, max turns, loop stop
The maximum number of attempts a task may make in one automated loop before it stops and asks for human attention.
- What it does
- Converts repeated failure into a visible handoff instead of an endless chain of runs.
- Ask
- What counts as an attempt, what evidence is carried forward, and where does a person re-enter after the cap?
- Typical
- A few attempts for a code or review loop, with a separate policy for transient infrastructure failures.
- Trouble
- Each failure starts another run forever, retries hide a deterministic defect, or the cap is reached with no useful diagnosis.
What to look for
- An attempt counter on a run or ticket
- A retry button with a remaining budget
- A stopped loop and a human-review label
Pattern
Connections
- See also: Review and rework loop
- See also: Run state
Sources
- Anthropic, Building effective AI agents, Agents
It’s also common to include stopping conditions (such as a maximum number of iterations) to maintain control.
- OpenAI, Agents SDK running agents, Running agents
If we exceed the `max_turns` passed, we raise a `MaxTurnsExceeded` exception.
- Matt Pocock, 11 Tips For AI Coding With Ralph Wiggum, 2. Start With HITL, Then Go AFK
For AFK Ralph, always cap your iterations. Infinite loops are dangerous with stochastic systems.
Use it on your project
teardown-apply: hold "Try cap" (try-cap) from the teardown at https://teardownatlas.com/software-factory/ against my project
Paste it into a coding agent that has the teardown skills.
An AI agent wrote this map with the teardown skill. It can contain errors: check the sources before you rely on a part. About and legal