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

Monitor Your Claude AI Usage with a New Linux Taskbar Widget
A new Linux taskbar widget helps users track their Claude AI subscription usage in real-time, with color-coded feedback and easy installation.

W2A — an open protocol for agent sensors: giving local agents real-time perception
W2A (World2Agent) is an open protocol standardizing the perception layer for AI agents — self-hostable, TS SDK, Apache 2.0. It lets agents receive real-time signals from sensors without one-off scripts.

OpenTidy: Open-Source Background Assistant Using Claude Code for Admin Tasks
OpenTidy is an open-source macOS service that spawns persistent Claude Code sessions to handle admin tasks like invoices, forms, and communication triage. It runs up to 10 parallel jobs with Telegram notifications for sensitive actions.

Hollow Agent OS: Local AI workers call Claude as senior architect when stuck
Hollow Agent OS uses local Qwen models that run 24/7, but when they hit logic errors or need major changes, they trigger a Claude call via MCP. Claude reorganizes file structures, reviews code, and acts as a manager for autonomous local workers.