Agent Workflow in a Minute · intermediate
Workflow in a Minute: Retries
Retries are bounded re-attempts after a failed verification—each attempt should use new evidence, not blind repetition.
Last verified: 2026-09-06
In one sentence
A retry is another implementation attempt that consumes the failure signal from the last verification gate.
Why it matters
Agents often need more than one pass. Unbounded retries waste money and pollute context. Blind retries without reading errors repeat the same mistake.
How it works
Set a retry budget (for example, three attempts). Each retry must:
- read the failing output;
- state the hypothesized cause;
- change something specific;
- re-run the same gate.
Escalate to a human when the budget is exhausted or when failures look environmental (flaky CI, missing secrets, wrong branch).
Example
If npm test fails, fix based on the failure.
Maximum 3 attempts.
After 3 failures, stop and summarize what you tried.
Agentic coding use
Retries are a control-theory loop for agentic engineering. Pair them with clean context: summarize prior attempts instead of pasting every failed transcript forever.
Watch out
Retrying by weakening tests is not a retry—it is cheating the gate. Review test diffs on every attempt.