Reddit user experiments with failure-learning coding agents to break retry loops

A developer on r/LocalLLaMA has been experimenting with coding agents that learn from failures to break out of repetitive retry loops. The approach focuses on treating failure as reusable information rather than just logging raw errors.
The Problem: Stuck in Failure Loops
The developer observed that coding agents often get stuck in failure patterns: fail → retry → fail again. Initially thought to be a model limitation, the issue appears to be a failure-handling problem where systems don't track why something failed. When retrying, agents typically generate variations of the same attempt, repeating the same mistakes in slightly different ways.
The Experimental Approach
Instead of keeping raw logs, the developer started storing simplified "root causes" and pairing them with fixes that worked previously. Future attempts then match against this stored knowledge rather than guessing again. The developer notes this approach is still rough but shows different behavior: the system doesn't get stuck in the same loops as often and sometimes actually converges on solutions.
Current Challenges
- Matching failures reliably is tricky
- If the system generalizes the wrong thing, it can reinforce bad fixes
- Uncertain how to balance reusing known fixes versus exploring new ones
The developer is seeking community input on this approach and whether others have tried similar methods for improving coding agent failure recovery.
📖 Read the full source: r/LocalLLaMA
👀 See Also

OpenClaw Agent Relay Plugin Fixes Telegram Delivery in Multi-Agent Setups
The openclaw-agent-relay plugin addresses the persistent issue where sessions_send responses go to webchat instead of Telegram by using gateway WebSocket RPC to trigger agent turns with deliver:true, eliminating the need for workarounds like explicit message tools or announce steps.

OpenClaw: Revolutionizing Website Maintenance with Continuous Surveillance
OpenClaw, an innovative AI-driven agency, redefines website maintenance by operating tirelessly around the clock. Harnessing advanced automation, it ensures optimal website functionality and promptly addresses issues.

CC-Canary: Detect Regressions in Claude Code with Local JSONL Analysis
CC-Canary reads Claude Code session logs and produces a forensic report on model drift, including read:edit ratio, reasoning loops, cost trends, and auto-detected inflection dates.

Claude Plugins: Computer Vision, Multi-Agent Council, and Self-Debugging Workflow
Three Claude plugins were released: Computer Vision v1.7.0 for Windows app automation, The Council v3.1.0 for adversarial multi-agent consultation, and Upwork Scraper v0.2.0 for job market analysis. A demonstration showed Claude using these plugins to diagnose and fix its own Solitaire automation bug.