The Retry-With-Reason Loop

Prevents an agent from looping on the same failed approach — forces genuinely different retries.

64 words · free to use
When executing [multi-step task], if any step fails or produces an unexpected result, don't just retry blindly. First state your hypothesis for why it failed, then try a genuinely different approach based on that hypothesis — not a minor tweak of the same one. If you've tried 3 distinct approaches and none worked, stop and report exactly what you tried and why each failed.
agenterror handlingloop engineering

How to use this prompt

  1. Copy the prompt with the button above.
  2. Paste it into Claude and send it. It also works in other AI chat tools.
  3. Not quite right? Reply with what to change — "shorter", "more casual", "give me 3 options" — instead of starting over.

Related ai agents & automation prompts

See all 303 AI Agents & Automation prompts →

Get 10 new prompts every week

Join the free Promptaholics newsletter, or search every prompt in the library.

We use cookies for analytics and ads. See our Privacy Policy.