Looping behaviour

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

I have a plan in .md and am trying to get it audited and edited by claude opus 4.6 - however despite it knowing what to do and trying to write the file, it seems to drop the final part when finishing and simply return back to the start and begin to do it all over again. It then keeps looping over and over. I’ve tried stopping ti and even altering the prompt but it still happens. I’m now trying to copy over messages and start a new agent chat (although it was only the second prompt anyway).

What is causing this? I simply got it to write out a plan and look at it, nothing difficult. What do I do when things like this happen, as it costs a lot to let opus keep running like that as a thinking model.

Steps to Reproduce

Ask it to implement plan

Expected Behavior

It should write it’s plan into the current .md file and edit it.

Operating System

Windows 10/11

Version Information

Version: 2.5.17 (system setup)
VSCode Version: 1.105.1
Commit: 7b98dcb824ea96c9c62362a5e80dbf0d1aae4770
Date: 2026-02-17T05:58:33.110Z
Build Type: Stable
Release Track: Default
Electron: 39.3.0
Chromium: 142.0.7444.265
Node.js: 22.21.1
V8: 14.2.231.22-electron.0
OS: Windows_NT x64 10.0.26200

For AI issues: which model did you use?

Opus 4.6

For AI issues: add Request ID with privacy disabled

1486c8fb-98cb-46ef-8b31-41916739d464

Additional Information

works as new agent chat, but can’t perform on current.

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the report.

This is a known issue where the agent can get stuck in a loop, especially with long context or when editing large files. The team is aware of it and is tracking it, but there’s no specific ETA for a fix yet.

What you’re already doing, starting a new chat with the agent, is the best workaround right now. A few other things that can help:

  • Try to keep the .md file focused and not too large, with big files the agent can sometimes lose the thread.
  • If you notice it starting to loop, stop it earlier and don’t let it run for too long to keep costs down.
  • Try breaking the task into smaller, more specific requests, like “edit section X” instead of “review and edit the whole plan.”

Let me know if this keeps happening consistently even in new chats.

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