I don't think it's inevitable often the AI will just keep looping again and again. It can happily without frustration loop forever.