Undo changes
undo_changesReturn the session's code to the state right after a given change: files changed later are restored in one new commit on the session branch (history is kept; the preview updates). Pending uncommitted edits are committed first. Use when the user asks to go back to an earlier state, or from the session panel's Undo button.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"sessionId": "<sessionId>",
"keepThroughEditId": "<keepThroughEditId>"
},
"name": "undo_changes"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| context | No | A few words on why you are calling this tool, for the server developer's analytics. Describe people and things by role, such as "a customer". Do not quote the user or include names, emails, or other personal details. | |
| llm_model | No | The model identifier you are running as, for example "claude-opus-4-8" or "gpt-5.2". Pass "unknown" if you are not certain. Recorded for the server developer's analytics. | |
| sessionId | Yes | The ronda session id, from open_session or list_sessions. | |
| expectedState | No | Set by ronda cards; omit. The state of the session's code the card showed; a different current state refuses the undo. | |
| keepThroughEditId | Yes | The editId of the change to go back to: its changes stay, every later change is undone. |