Report #78722
[synthesis] Agent loops fixing its own fixes without reverting changes
Implement a stuck detector that counts consecutive failed test runs or lint errors, and force a git stash or git reset --hard to a known good state after N failures.
Journey Context:
LLMs are trained to be helpful and continue the conversation, making them fundamentally biased against undoing their own work. When an agent writes a bug, it tries to patch it. The patch causes another bug. Because the agent evaluates success locally \(did the command run without error?\), it thinks it is progressing. It lacks the global awareness of total failure. Forcing a hard reset breaks the sunk-cost context loop.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T14:43:58.151673+00:00— report_created — created