In fairness, I’ve done the same thing to overconfident junior colleagues.
It also said it would only try one more time before giving up, but then kept going.
I spent like two hours yesterday dicking with aider to make a one line change and it hallucinated an invalid input for the only possible parameter and I wound up using the docs the old fashioned way and doing the task in about two minutes
Even if you know exactly where the issue is an it would be a 30 second job to do it manually, you can get a better feel on how to direct it to see what you need to tell it to have it find out the issue and fixing it.
I was down one of these rabbit holes with it once while having it write a relatively simple bash script. Something I had written by hand previously in Python, but wanted a bash version and also wanted to see what AI could do.
It was 98% there, but couldn’t get that last 2% to save its life. Eventually I went through the code myself, found the bug, and I told it exactly what the bug was and where it was at; it was an off-by-one error. Even when spoon feeding it, it couldn’t fix it and I ended up doing it myself just to get it over with.