Hey, thanks for the report. This looks like a known issue. The team recently fixed a few bugs related to automatic rollbacks when closing agent chats (in December 2025).
Since you’re on a nightly build (2.4.0-pre.14.patch.0), this could be a regression or an edge case. A similar issue was discussed here: Cursor randomly reverts code without consent... recurring
Can you try to reproduce it and share:
- Exact steps to reproduce reliably
- A screenshot of the Source Control panel before and after closing the chat
- Whether the agent had any active checkpoints at the moment you closed the chat
This will help the engineers understand what’s going on.