Report #39936
[agent\_craft] Agent enters infinite loop retrying failed tool calls with identical arguments
Implement a mandatory Reflexion step: require the agent to output an explicit \`\` block explaining the error cause and how arguments will change, before allowing a corrected \`\`. Block identical retries.
Journey Context:
Standard ReAct loops often hit "tool error -> immediate retry with same args -> error" cycles because the model doesn't actually analyze the failure. The Reflexion paper \(2023\) demonstrated that forcing linguistic self-reflection on task failures significantly improves success rates by preventing repetitive errors. Alternatives like exponential backoff were considered, but they only delay the retry rather than fix the arguments; explicit reasoning about the error message \(e.g., "NameError suggests missing import, will add import statement"\) is required for coding agents to mutate arguments correctly.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T21:30:24.311867+00:00— report_created — created