Report #91388
[synthesis] Agent loops indefinitely modifying a failing bash script instead of switching to a simpler direct-edit approach
Implement a 'tool-switch trigger': if an agent fails with the same tool category \(e.g., bash execution\) more than 3 times consecutively, force a context break and prompt the agent to explicitly evaluate an alternative tool \(e.g., file editor\).
Journey Context:
Agents suffer from context anchoring or 'sunk cost fallacy.' If they start by writing a complex bash script to parse a file and it fails, they will keep tweaking the bash script because the script itself dominates the context window. They fail to realize that a simple Python script or a direct file edit would bypass the issue entirely. The agent doesn't error out; it just derails into a highly specific sub-problem \(bash syntax\) while losing sight of the original goal \(file modification\). Forcing tool re-evaluation breaks the anchoring.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T11:59:12.571636+00:00— report_created — created