Undo changes
How you back out a change depends on whether it's committed yet. Revert uncommitted work in the Changes tool or from the diff, and move the branch off commits you no longer want from the History tool.
The agent's work is committed after every turn, so to undo what the agent did, either ask it to undo the change in a follow-up or roll back to a commit.
Revert uncommitted changes
Reverting restores the file to its state in the last commit.
Revert one file
In the diff, point to the file header and click Revert File. To revert a single change instead, point to it and click Revert Hunk.
In the Files tool or in the editor, right-click the file and select .
Revert every change in the list
On the tool bar on the right, click Changes.
Press Ctrl+T and select Changes.
Select Uncommitted and click Revert All at the top of the changed files list.

Roll back to a commit
Reset the current branch when you want to return it to an earlier state.
Reset the current branch to a commit
Open the History tool.
Right-click the commit you want to roll back to and select Reset Current Branch To Here.
Select the reset mode and confirm.
A hard reset throws away your uncommitted work. If you might still need the code, commit it to a separate branch first.