This really depends on the prompting. I experienced it multiple times that claude code couldn't figure out how to fix a bug and just gave up. Instead of getting stuck in an infinite loop.
Usually I get the loop, which runs me out of compute, and have to wait till tmrw. Glad there is actually a way to stop it from confidently “fixing” the same issue.