Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
Applying from a worktree does not write context of file, it just creates the file
Steps to Reproduce
- Create a fresh directory
- Run git init
- Open this directory in cursor
- Ask any model to write the text “Hello world” in hello.txt using a worktree
- Click apply
- Open hello.txt from the IDE, the text fails to save. It works fine if you don’t use a worktree
Expected Behavior
When clicking apply, the contents of the file are also written instead of the file just being created.
Screenshots / Screen Recordings
Operating System
Windows 10/11
Current Cursor Version (Menu → About Cursor → Copy)
Version: 2.2.20 (user setup)
VSCode Version: 1.105.1
Commit: b3573281c4775bfc6bba466bf6563d3d498d1070
Date: 2025-12-12T06:29:26.017Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Windows_NT x64 10.0.22631
For AI issues: which model did you use?
composer-1 and grok-code-fast-1
Additional Information
this is the 6th breaking bug that has affected me in the past two months
Does this stop you from using Cursor
No - Cursor works, but with this issue
