Mistakes
Find out why Agent edits the wrong file, duplicates your code or goes in circles, and how to fix each one.
Context mistakes
Stop wrong-file edits and duplicated code, know when to start a new chat, and cut rules and MCP servers that crowd the context.
4 techniques →-
Why Does Cursor's Agent Duplicate Code You Already Have? Usually you asked for a change before anyone looked at what's already there. Level 2: Context
- 1Ask how it works now
- 2Check the answer
- 3Ask for the change
- 4Review the diff
-
When Should You Start a New Chat in Cursor? Start a new chat when you switch tasks, when you finish a feature, or when Agent keeps going in circles, even if you're mid-feature. Level 2: ContextKeep goingsame chat
- Same feature
- Useful earlier context
- Agent is on track
Start freshnew chat- New task
- Agent making mistakes
- Going in circles
-
Why Does Cursor Edit the Wrong File, and How Do You Stop It? Agent takes your request literally, and where you give no intent, it uses its best judgment. Level 2: ContextLeft to guessno scope given
- Picks a similar file
- Invents a pattern
- Edits more than asked
Directedscope in the prompt- Right file
- Your pattern
- A small diff
-
Are Too Many Rules and MCP Servers Hurting Cursor? They can be. Level 3: WorkflowsTop: needed always. Bottom: needed sometimes.Always Apply rulea few lines, every chatReference a filean @ file is read only when neededGlob ruleloads with matching filesSkillfull text loads when relevantLeft: short. Right: long.
Are you making these Cursor mistakes?
Three common habits that send Agent the wrong way. See how you'd handle each one. Answers are instant, and no sign-up is needed.
Most bad results start before the edit
Cursor's course says agents take requests literally and use their best judgment where you give no intent. So the wrong file, a duplicate helper or an oversized diff usually traces back to the request or the setup. Check those before changing to a costlier model, which will often repeat the same error at a higher price.
The same few causes repeat
The agent had to guess the target. It changed code before reading how things already work. The chat ran too long and lost the details. Or so much was loaded by default that your instructions got lost among it. Each of these has a specific fix, and each fix takes minutes rather than hours.
Why does Cursor make bad edits?
Often the request left the target open, so Agent chose the most plausible match. Name files with @, point to one example to copy, say what not to touch, and use Plan mode for wide tasks.
Why does Cursor get worse in long chats?
All messages and tool results fill a fixed context window, and older parts get compressed into summaries that can lose detail. Start a new chat when you change tasks or the agent starts going in circles.
Should I review everything Cursor's agent does?
Yes. Cursor's course says your standard for merging should be the same whether code was written by a person or an agent, because generated code can pass tests and still be subtly wrong.
How do I fix inconsistent code from Cursor?
Add a short project rule with your conventions and a pointer to a good example file, and use a linter for formatting. Add rules when you see the same mistake twice.