Settings

Theme

Ask HN: How do you get AI loops to converge?

2 points by outlore · 9 comments · 1 min read


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!

3 threads
Stephan3555

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...

igrlk

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

bk-one

wrote some learnings here: https://uberblick.ai/blog/2026/built-on-its-own-pages

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection