I asked Composer 2 to group the UI, styles and table related changes to make a PR, it did it alright, but ended up deleting the rest of the changes, lost 3/4 of the progress of that thread.
Steps to Reproduce
No idea, have a mix of 20 changed files with part of it being UI changes to target, then ask it to make a PR with only the UI changes.
Expected Behavior
Stash the changes or make a backup branch, then cherry pick the changes we want to commit.
Hey, thanks for the report. To answer your question right away: no, this isn’t on you. Asking for make a PR with UI/styles only is totally valid. What should’ve happened is the model would’ve stashed the rest or created a backup branch before doing a selective commit, like you described in expected behavior. What happened is the git workflow didn’t preserve the non-targeted uncommitted work. I get how frustrating it is to lose 3/4 of your thread progress.
First, let’s try to recover it, there’s a good chance:
Run git reflog in the repo root. It shows recent HEAD states. Find the entry before the commit, then run git checkout <hash> -- . or create a branch from that state.
Run git stash list. If the agent did stash instead of resetting, your changes might be there.
Run git fsck --lost-found. It can show dangling commits and blobs. Sometimes your work is there even after a reset.
In Cursor, run Cmd/Ctrl+Shift+P then Local History. VS Code keeps local file snapshots, this can help recover specific files.
For next time, to avoid this:
Before asking the agent to do anything with git, especially selective commits, run git stash yourself or git checkout -b backup-<date>. It takes 5 seconds and saves you.
Say it clearly in the prompt: stash everything else before committing, restore after. The model follows better when the instruction is direct.
Don’t auto-run destructive git commands. Review them before approving.
On the behavior itself: models are iterating on handling git more safely and not deleting non-targeted work, and the team is working on it. I added your case with the Request ID to the existing tracker for this issue, but I can’t give an exact ETA.
Let me know if you manage to recover anything via reflog or Local History.