Agent will now leave cave if task is hopeless.