Ask HN: How do you get AI loops to converge?
For any arbitrary coding task, how can a Ralph loop break out of a local minima and converge, such that, even if the loop runs again, there are no tasks left to complete? These tasks are somewhat non-deterministic due to cross-interactions which make their stop conditions hard to define ahead of time (e.g a complex GUI)
I want to learn more resources for loop engineering, deterministic tooling etc.
What I am noticing is the agents/subagents oscillate between repeatedly patching the same bits of code over and over, or introducing new bugs.
Thank you!
We're doing something similar in DeepXplore, where a composer spins up agents as needed, checks their results and decides what to do next. We also cap the iterations so things don't run forever. Wrote a bit about how it works here: https://deepxplore.io/blog-entries/blog-deepxplore-code-agen...
for GUI work the stop condition that worked for me is interaction + visual tests.
make sure all component interactions are automatically tested. screenshot the screens the task touches, and let your agent see what changes it made
wrote some learnings here: https://uberblick.ai/blog/2026/built-on-its-own-pages