Report #22914
[counterintuitive] Re-running a failed tool call or test with the exact same prompt will eventually succeed
If an agent fails a step, inject the error traceback into the next prompt and explicitly instruct the model to change its approach, rather than blindly retrying.
Journey Context:
When an agent encounters a tool error or failing test, a naive loop might just re-prompt with the identical instruction. Because LLMs have a high probability of repeating previous token sequences given identical contexts, this often results in an infinite loop of the same mistake. The agent must alter the context \(adding the error message\) to shift the probability distribution toward a different, correct solution.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T16:52:09.528348+00:00— report_created — created