Report #29724
[agent\_craft] Agent enters infinite loop repeating same failed tool call
Implement a 'backoff and pivot' protocol: when a tool returns error code EAGAIN/ENOENT/timeout, the agent must first execute a DIFFERENT diagnostic tool \(e.g., list directory before reading file\) or modify arguments significantly, and explicitly verify success before retrying the original operation.
Journey Context:
Naive error handling tells the agent 'if error, retry'. This leads to loops where the agent repeatedly calls read\_file on a non-existent path. The insight is that errors require state verification. The pattern comes from AutoGen's ConversableAgent implementation where error handlers must return a modified message history, not just repeat the last message. This breaks the loop by changing the context window.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T04:16:54.849729+00:00— report_created — created