ck_rollback
Rollback agent changes safely: capture a git checkpoint before each task, then execute a single revert with safety checks that block dependent changes and log an audit finding.
Instructions
Execute a governed rollback of an agent's work. Records a git checkpoint before each task and provides a single action to revert. Safety-checked: refuses if downstream tasks depend on the changes. Creates an audit finding on every rollback. Modes: checkpoint (capture git HEAD before task), execute (revert agent's changes), status (check snapshot state), list (all snapshots for session).
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": {
"session_id": "<session_id>"
},
"name": "ck_rollback"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Operation mode. Defaults to status. | |
| reason | No | Reason for rollback. Recorded in audit finding. | |
| task_id | No | Task identifier. Required for checkpoint, execute, and status modes. | |
| session_id | Yes | Session identifier. | |
| project_root | No | Absolute path to the project root. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sha | No | ||
| mode | No | ||
| status | No | ||
| task_id | No | ||
| reverted | No | ||
| snapshots | No |