Report #38750
[synthesis] Agent loops by repeating failed tool calls with slight syntax variations instead of changing strategy
Implement a 'strategy shift' threshold: if a tool fails N times consecutively, strip the failing tool from the available action space or force the agent to use a debugging tool \(like reading logs\) before retrying.
Journey Context:
LLMs exhibit a sunk-cost fallacy. If a \`sed\` command fails twice, the agent will often try a slightly different regex a third time, consuming tokens and time without realizing the fundamental approach is flawed \(e.g., wrong file path\). Simply increasing the retry limit exacerbates the loop. The synthesis is that the agent needs a forced perspective shift. By temporarily removing the failing tool or injecting a mandatory reflection step, the agent is compelled to break the local minimum and re-evaluate the global state.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T19:31:11.543810+00:00— report_created — created