Suggestion - improve handling of 'abbreviated' file paths

One of the biggest issues I’ve been having with agent mode is that the LLM often gets in the habit of “shorthanding” file paths, to catastrophic effect.

If I’m trying to fix a bug in my-project/engine/src/foo.src, i’ll invite the agent to iterate on it. Several minutes (and a fat stack of credits) later I’ll come back to find the agent going round and round in circles repeatedly trying to fix the same bug. Sometimes it will blame the “apply model”, other times it will just say “I see the issue now. Let me try a different approach to blah” and try the same null edit over and over again.

It seems the root cause is that somewhere along the way, the LLM started referring to the file as src/foo.src. All of the edits are going to the wrong place, and when it runs the tests, nothing has changed in the active source, so it does the same again.

Would it be feasible for Cursor to use some combination of:

  • Enhancing the system prompt (where it describes the format of putting the filename in the response if an edit is intended) to insist on full project-relative paths and no abbreviation?
  • Adding a mechanism where if the path in the edit looks like an abbreviated version of the path to an existing file, and the new file doesn’t exist, automatically throwing it back and saying “did you intend to create a new file or is this supposed to be an edit to ?” or similar?

I realise the latter case has some wrinkles with common filenames (like an __init__.py or a mod.rs or whatever) but I would imagine the LLM is capable of answering “that’s something different, we need to create the new file” if necessary.