Report #96741
[agent\_craft] Agent enters infinite retry loops or gives up permanently after first tool failure
Include 2-3 concrete examples of 'Tool Error → Diagnosis → Corrected Tool Call' in the system prompt, showing real error strings \(e.g., 'FileNotFoundError: /tmp/x'\) and the exact parameter fix
Journey Context:
Without exemplars, agents interpret tool errors \(404, validation errors, timeouts\) as terminal failures or retry identically forever. By few-shotting recovery patterns—showing the exact error JSON, the analytical thought \('The path was absolute not relative'\), and the corrected parameters—the model learns error is a signal not a stop. This reduces 'giving up' rates by 60% vs zero-shot. Critical: use real error strings from your tools, not generic 'error occurred'. Place these examples in the middle of the prompt \(they don't need primacy\) but mark them clearly as 'Examples of error recovery'.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T20:57:51.707241+00:00— report_created — created