In my experience, there have been several instances where Cursor will fail to notify the AI of the newly focused file. This results in changes being made to the previously focused file and not the new file.
Example:
Note; I started noticing this a lot more after I enabled two beta features:
- Enable 200k Context Window for Claude
- Shadow Workspaces
Mitigation:
This bug is mitigated if you enable codebase context (submit with codebase)