Agent uses workspace folder name instead of the path as a base for file path

When using the Cursor agent with a mono repo project having a .code-workspace -file defining different folders as projects, the Cursor will use the folder’s name when forming paths instead of the path itself. This is constantly causing files to be created in the wrong places and the referred files to be unlooked.

For example, if you create a folder to workspace configuration with the name Web and that path to the folder is apps/web, the agent will start to look for files from the root of the mono repo with Web/path to something instead of apps/web/path.

{
  "folders": [
    {
      "name": "Web",   // <- Uses this
      "path": "apps/web", // <- Should use this
    },
 // ..
}

When using the latest Cursor version (0.48.7), one can fix this by just naming the folder with the same name as the path, but this way, we will lose the benefits of having the folder naming in the IDE. In our example:

{
  "folders": [
    {
      "name": "apps/web",   // <- This will work correctly
      "path": "apps/web", 
    },
 // ..
}

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