How to fix a Cursor agent loop (same edit, or work after Stop)
How to fix a Cursor agent loop: stop the turn, clear any Goal that restarts on a finished terminal, commit or unstage the diff, then open a smaller new chat. Do not send "try again" in the same stuck thread. Short answer: 5 steps. 1) Stop this turn; 2) Clear a Goal if one is set; 3) Commit or unstage the current diff; 4) Start a new chat with a smaller task; 5) Switch model if the new chat loops too.
Last updated: · This page is the decision checklist; the tools list for “Make Cursor rules apply” is a separate URL.
How do I fix a Cursor agent loop (same edit, or work after Stop)?
Stop this turn
Click Stop. Do not send "try again" in the same chat. Cursor staff describe the edit loop as the model not seeing that its change already landed, so it applies the same edit again. https://forum.cursor.com/t/composer-2-keeps-reverting-and-reapplying-code-changes-repeatedly/157012
Clear a Goal if one is set
Stop ends the current turn, but a paused Goal starts again when a background terminal the agent already launched finishes. Hover the Goal row above the input and click the trash icon. Then close those agent terminals. Pausing the Goal is not enough. https://forum.cursor.com/t/cursor-agent-keeps-resuming-work-after-being-stopped/171720
Commit or unstage the current diff
The same thread notes the loop shows up more often when the working changes are already staged. Commit what you want to keep, or unstage it, before you ask again.
Start a new chat with a smaller task
Long chats loop more often. Ask for one change and a stop check, such as "change this button color and stop when the test named X passes." Steer a running agent with a follow-up instead of stacking "continue" on a stuck chat. https://cursor.com/docs/agent/overview
Switch model if the new chat loops too
Retry that smaller task on another model, or on Auto. If you report it, copy the Request ID from the chat menu (three dots) and include the Cursor version from Help, About.
Which tools are best to make Cursor rules apply?
Cursor
Agent reads project rules from .cursor/rules and plain instructions from AGENTS.md.
Cursor Rules
How Always Apply, globs, descriptions, Team Rules and AGENTS.md decide what enters the chat.
Open: 1 spot per week
One labeled sponsor for this topic each week; this week's spot is open. See open weeks →
All tools for “Make Cursor rules apply” →
Related fixes
- Claude Code vs Codex vs Cursor ~$20 plansClaude Code vs Codex vs Cursor $20 plan limits: how to pick without burning the weekFix →
- Scan a vibe-coded app for leaked API keysCheck a vibe-coded app for leaked API keys before you share itFix →
- Add an MCP server to Claude Code, Cursor, or CodexHow to add an MCP server to Claude Code, Cursor, or CodexFix →
- Stop purple-gradient AI UI defaultsAI keeps making purple gradient UI — how to fix the generic lookFix →
See also AI tools launched today on the daily board.
NewAIToolsToday Daily
Top 3 AI launches, one model or news item that matters, and one simple fix. A 5-minute read, every weekday.