Agent stuck in editing loop

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Agent fails to recognize own edits

Steps to Reproduce

Ask any model to perform an edit. At least recently, the agent performs the change but assumes the edit failed and gets stuck in an endless loop, repeatedly trying to perform the edit, creating duplicates in the file. Unless I stop it, it just continues like that. Asking to remove the duplicate edits also results in this loop

Expected Behavior

When editing succeeds, the agent recognizes the change and proceeds.

Operating System

MacOS

Version Information

IDE:
Version: 2.6.19
VSCode Version: 1.105.1
Commit: 224838f96445be37e3db643a163a817c15b36060
Date: 2026-03-12T04:07:27.435Z (4 days ago)
Build Type: Stable
Release Track: Default
Electron: 39.4.0
Chromium: 142.0.7444.265
Node.js: 22.22.0
V8: 14.2.231.22-electron.0
OS: Darwin x64 23.6.0

For AI issues: which model did you use?

Sonnet 4.6, composer 1.5.

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the report. This is a known issue. The agent sometimes doesn’t realize its edits were already applied and tries to apply them again. It affects a few models, including Composer 1.5 and Sonnet 4.6.

Similar thread here: Composer 1.5 double-edit attempt

The team is aware, but we don’t have a specific ETA yet.

For debugging, can you share the Request ID from the chat where this happens? Chat menu in the top right, then Copy Request ID. This helps us figure out why loop detection isn’t triggering.

As a workaround, if the looping is really getting in the way, try switching models and see which one hits this less often.

1 Like

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