Report #84077
[synthesis] Agent enters infinite self-repair loops when tool errors are ambiguous or lack actionable context
Enforce structured, machine-parseable error messages from tools \(including exit code, stderr, and a diff of state change if applicable\), and implement a hard retry limit with an 'escalate to user' fallback rather than allowing the agent to retry the same tool.
Journey Context:
When a tool returns a vague error \(e.g., 'Operation failed'\), the LLM attempts to guess the cause and applies a generic fix \(e.g., adding \`sudo\`\), which fails again with the same vague error. The agent lacks the signal to update its hypothesis, resulting in an infinite loop of failed repairs. By forcing tools to return rich, structured errors, the agent gets the specific signal needed to adjust its reasoning. The hard retry limit prevents unbounded resource consumption when the error is fundamentally unresolvable by the model.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T23:42:56.678047+00:00— report_created — created