Undo an Agent Turn
- Desktop, mobile and web
- All plans
What it does
"Undo this turn" puts back the files an agent changed during its last turn (its work in answer to your last message), as they were before that turn. You see the list first and untick what you want to keep. Files the turn created are deleted. The conversation itself is not rewritten: a note is added to your message box so you can tell the agent what was undone.
Where to find it
In the conversation view of an agent, under its last answer, next to "Fork from here": the "Undo this turn" button (curved arrow icon). It only shows when the agent is idle and its last turn changed files that can come back.
How to use it
- Wait until the agent has finished its turn.
- Click "Undo this turn" under its last answer.
- In the dialog, untick any file you want to keep as it is now.
- Click "Restore N files". The files go back, and a note for the agent is added to the message box. Send it, edit it or clear it.
Greyed files are left as they are, with the reason: changed or committed since the end of the turn, committed during the turn, changed by another agent, another agent working in the same folder at the same time (for a provider without file attribution), larger than 5 MB, symbolic link, or already back.
Settings
None in the app. On a machine where the cost matters, starting AgentsRoom with
the environment variable AGENTSROOM_TURN_SNAPSHOTS=0 turns the feature off:
no snapshot is taken and the button never shows.
Agent tools (MCP)
None.
Providers
All providers. Claude, Codex, OpenCode, Antigravity and the other providers with file attribution: only the files the Changes tab gives to this agent can come back. Providers without attribution: a turn during which another agent of the same repository was working is refused, so nothing of the other agent's work is overwritten.
Mobile
Same button under the last answer, same list, in a sheet. The desktop puts the files back; the note goes into the phone's message box.
Limits
- Last turn only. To go further back, use "Fork from here" on an older answer.
- Git repositories on this computer only: no button for an agent on a remote (SSH) machine or in a folder outside git.
- A turn that changed more than 2,000 files is not recorded.
- A file deleted by the turn comes back without its executable bit.
- Files written in the very first instant of a turn can be missed.
Common questions
- Does it undo the conversation too? No. The agent's answer stays in the thread; the note in your message box tells the agent what you undid.
- Can it overwrite my own changes? No. A file changed since the end of the turn, or committed, is refused and left as it is.
- Why is a file greyed "Changed by another agent"? The Changes tab gives it to another agent, or has not caught up yet: try again a few seconds later.
- Does it touch my git history? No. Snapshots live in a separate hidden store; your repository is only read.
Related
- Agent Fork: go back further by forking from an older answer.
- Conversation View: where the button lives.