Agent stuck in a continuous loop

it just got stuck in an infinite loop again :confused: I’ve turned private mode off to try and help catch these problems happening with auto mode

896a25a2-a08a-4fd0-bea6-ab7a035be14c

Describe the Bug

Since the latest cursor vscode update I’ve noticed fairly often the agents is happy up to a point. At which point, its analysis goes into a repeating loop until I stop it. The analysis is generally vague and useless when it happens.

An example of this continuous garbage…

"The script looks correct now. The issue might be that you’re running a cached version or there’s a shell issue. Let me try a different approach - let me check if there are any other functions that might be installing packages that I missed.
Actually, let me check if there’s a different issue. The error message shows that the script is trying to install libasound2 but it’s not in the package list. This suggests that the script is somehow still using the old logic somewhere.
Let me check if there are any other functions that might be installing packages. The issue might be that the script is calling multiple functions or there’s some leftover logic from before.
Let me check the exact line where the error occurs by looking at the current script state. The problem might be that the script is somehow still running the old version. Let me try to force a refresh by checking the script’s current state.
Actually, let me check if there’s a different issue. The error message shows that the script is trying to install libasound2 but it’s not in the package list. This suggests that the script is somehow still using the old logic somewhere.
Let me check if there are any other functions that might be installing packages. The issue might be that the script is calling multiple functions or there’s some leftover logic from before.
Let me check the exact line where the error occurs by looking at the current script state. The problem might be that the script is somehow still running the old version. Let me try to force a refresh by checking the script’s current state.
Actually, let me check if there’s a different issue. The error message shows that the script is trying to install libasound2 but it’s not in the package list. This suggests that the script is somehow still using the old logic somewhere.
Let me check if there are any other functions that might be installing packages. The issue might be that the script is calling multiple functions or there’s some leftover logic from before.
Let me check the exact line where the error occurs by looking at the current script state. The problem might be that the script is somehow still running the old version. Let me try to force a refresh by checking the script’s current state.
Actually, let me check if there’s a different issue. The error message shows that the script is trying to install libasound2 but it’s not in the package list. This suggests that the script is somehow still using the old logic somewhere.
Let me check if there are any other functions that might be installing packages. The issue might be that the script is calling multiple functions or there’s some leftover logic from before.
Let me check the exact line where the error occurs by looking at the c
"

It seems the agent has lost its mind. There is no warning that I should start a new chat context… and its also not obvious what makes it go into this death spiral.

Stopping it and asking it to “you got stuck in a loop, continue where it was” just returns it into exactly the same death spiral.

Steps to Reproduce

Use agent mode for a bit on one chat session.

Expected Behavior

Not get into a vague useless loop.

Operating System

MacOS
Linux

Current Cursor Version (Menu → About Cursor → Copy)

Version: 1.4.5 (Universal)
VSCode Version: 1.99.3
Commit: af58d92614edb1f72bdd756615d131bf8dfa5290
Date: 2025-08-13T02:08:56.371Z
Electron: 34.5.8
Chromium: 132.0.6834.210
Node.js: 20.19.1
V8: 13.2.152.41-electron.0
OS: Darwin arm64 24.6.0

Additional Information

Generally, the latest cursor vscode updates are junk and severely disrupting my workflow.

Does this stop you from using Cursor

Yes - Cursor is unusable

hi @Michael_Cook which model were you using during this request?

I can’t speak for them but I’m 99% sure it’s Gemini 2.5 Pro, It loops most of the time for me too.

Yes we have similar reports. In some cases its linked to specific MCPs or tools.

I see this with Auto.

I hadnt seen this when I pinned Sonnet 4. But due to sudden price increases Ive had to go to Auto. I have seen this behaviour across 4-5 days maybe twice a day once Ive asked the agent to diagnose a persistent issue.

I dont use any other specific model but Sonnet 4 so can speak to Gemini.

1 Like

yes, i get this with claude-4-sonnet and playwright.

it’ll just keep doing the same playwright actions over and over making it unusable.

Sometimes asking the same request in a brand new chat has fixed it for me.

1 Like

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.