session_rewind
Restore a task's worktree to a previous checkpoint by specifying task ID and step index. Discards uncommitted changes and later commits.
Instructions
Rewind the task's worktree to the commit captured at step_index.
Performs a hard reset of the worktree to the checkpoint's commit SHA. Any uncommitted changes and commits after the checkpoint are discarded.
task_id is the ID of the task to rewind. step_index identifies which checkpoint to restore.
Returns dict with: task_id, session_id, step_index, commit_sha.
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": {
"task_id": "<task_id>",
"step_index": "<step_index>"
},
"name": "session_rewind"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task_id | Yes | ||
| step_index | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||