Don't Let Cursor Guess the Context
What it is
The common Cursor failure of leaving the model to guess which files matter — instead of explicitly pointing it at the relevant ones — and then getting a confident edit in the wrong place.
Why it works
Cursor's answers are downstream of the context it has. When you don't name the files, it guesses from what's open or indexed, and a wrong guess produces a plausible edit to the wrong target. Naming the context is the cheapest way to fix quality problems that look like 'the model is dumb'.
When to use it
Recognise it whenever Cursor edits something unexpected, invents a pattern the repo doesn't use, or confidently changes the wrong file — that's almost always a context problem, not an intelligence one.
When not to use it
Truly local, single-file work where the context is unambiguous and there's nothing to point at.
Prompt
Only consider these files for this change: <@-mention the exact files>. Don't touch or assume anything outside them. If you think another file is involved, name it and ask before editing.Example
A change that kept hitting the wrong config.ts gets fixed instantly by @-mentioning the specific one — Cursor stops guessing and edits the file you meant.
Advanced version
Build the habit of scoping context deliberately — mention only what matters — and encode recurring context in a rules file so you're not re-pointing every session.
Common mistakes
- Assuming Cursor knows which file you mean when several share a name.
- Leaving twenty irrelevant tabs open and calling that 'context'.
- Blaming the model for a wrong edit that was really a missing @-mention.