Report #11897
[architecture] Agent loops or repeats mistakes because it cannot remember which actions failed previously in the current session
Maintain an explicit failure scratchpad in the context window that logs failed tool calls and their error messages, clearing it only upon successful task completion.
Journey Context:
Without a working memory of recent failures, an LLM will often retry the exact same flawed code or API call in an infinite loop. Standard long-term memory stores don't help because the failure is ephemeral and specific to the current execution path. By forcing the agent to write its mistakes into a designated section of the prompt, it is forced to read its past failures and alter its strategy, breaking the loop.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T14:39:14.728193+00:00— report_created — created