When using Cursor with an explicitly set workspace context (e.g., /Users/username/source/code/owner-name/repo-name/qa
), file creation and editing operations by the AI are incorrectly routed to another directory completely outside the repo’s root or even the specified tree (in this case - ~/source/_resources
is used as the working directory, instead of the specified context).
This occurs even after repeatedly setting and confirming the correct context, and even after the AI acknowledges it intends to use the correct working directory.
Not sure if it’s somehow related, but that ~/source/_resources
directory is the first item in my Cursor (VSCode) workspace, and exactly due to that issue - I explicitly configured Cursor to be restricted from that directory (the result is that it attempts to perform file operations there - but fails, which is good, otherwise it would have modified stuff there).
Steps to Reproduce:
-
Set the working directory in Cursor to a specific project folder (e.g.,
/Users/username/source/code/owner-name/repo-name/qa
). -
Instruct the AI to create or edit a file within this directory.
-
Observe that the AI attempts to perform file operations in
~/source/_resources/
instead of the specified directory.
Expected Behavior:
All file operations should be performed strictly within the explicitly set workspace context.
Actual Behavior:
File operations are misrouted to the _resources directory, causing permission errors and workflow disruption.
Impact:
Prevents users from creating or editing files in their intended workspace, disrupts development workflow, and may cause confusion or data loss.
Screenshots: