When agent works in a worktree and writes to a file, the changes are not actually saved on the disk.
In the screenshot below agent created new files: Organization and CurrencyConverter and modified User file. On disk both organization and currencyconverter files are empty and user file does not contain the changes agent made.
I must go through all the changed files, save them manually and then the files are modified on the disk.
The problem is when agent tries to run a test in the worktree, it fails because no changes are actually there, unless I manually save them.
I believe this should not be the case.
I have also experienced this problem today when first trying agents with worktrees. The agent modified an existing file alright, but it created 5 new files (as planned), but no matter how much I pushed Apply All, Reapply, Create PR (went through github merge pull request) - the files stayed empty. I had to manually copy the contents from Cursor to physical files to apply edits.
when clicking “apply all”, not all of the modified files are moved over (there is a selection between “pending changes” and “all changes” to be moved from the worktree and in my experience both of these fail to move over all the changes)
when agent modifies a file within the worktree, it is not actually written to the file on disk and only visible within cursor ide → this is a problem because i might task the agent to create tests in the worktree, it writes them and when it tries to run the tests within the worktree to verify they are correct → they do not work because they are empty files
on top of that, if im not mistaken, once i accept the changes from the worktree to be moved over, i have the option to revert but after reverting no option to apply again and also once i apply changes, the “review changes” button disappears from the chat so unless i kept the review tab open, i have no option to revert or review changes that were made