An infinite loop error when debugging

It seems I encountered an infinite loop error when I tried to debug with AI. The error message looks like this:

Thought: It seems I used an incorrect format for the EDIT action. I need to specify the start and end lines for the edit. Let's correct the import statement by specifying the exact lines to be modified.
Thought: I need to follow the correct format for the EDIT action. Let's update the import statement correctly this time.
Thought: I need to ensure the JSON format is correct for the EDIT action. Let's fix the import statement with the correct format.
Thought: I need to ensure the JSON format is correct for the EDIT action. Let's fix the import statement with the correct format.
Thought: I need to follow the correct format for the EDIT action. Let's update the import statement correctly this time.
Thought: I need to ensure the JSON format is correct for the EDIT action. Let's fix the import statement with the correct format.
Thought: I need to ensure the JSON format is correct for the EDIT action. Let's fix the import statement with the correct format.
Thought: It seems I have been making a mistake in the format for the EDIT action. I should provide the content directly in the JSON without additional backticks. Let's correct this.
Thought: I need to follow the correct format for the EDIT action. Let's update the import statement correctly this time.
Thought: I need to follow the correct format for the EDIT action. Let's update the import statement correctly this time.
Thought: I need to follow the correct format for the EDIT action. Let's update the import statement correctly this time.
3 Likes

I am getting so many of these. It’s beyond frustrating.

1 Like

Are you using gpt-4o? People have said it gets caught in loops more than gpt-4.

2 Likes

I am having the same issue - and I am using gpt-4o

Same here with gpt-4o.

I’m still having the same issue, using gpt4o.

It’s especially frustrating because the loop doesn’t stop itself. I was using it earlier and got caught up doing something else. It ended up looping for around 20 minutes, burning through 400 requests → 2.4 million tokens → $12 (I’m using my own API key).

I’ll definitely be more careful from now on when I use “debug with AI”, but this bug should NOT exist.

1 Like