Two places to look, in this order:
- Cursor checkpoints. Scroll up in the chat to the message where you asked for the cleanup. There's a "Restore checkpoint" option on it; that rolls files back to before that agent run.
- Local History / Timeline. Recreate an empty
lib/utils.ts, open it, and look at the Timeline panel at the bottom of the explorer. VS Code-based editors keep local history of saved files, often including the old contents.
Then, today: git init, commit, and push to a private GitHub repo. It's the undo button for everything an agent does.