loop
Track file edits and test results to detect and prevent death spirals in AI coding sessions. Check safety before editing.
Instructions
Loop detection to prevent death spirals. Operations:
record_edit: Log file edit (file_path, description)
record_test: Log test result (passed, error_message)
check: Check if safe to edit (file_path)
status: Get edit counts and warnings
reset: Clear all loop tracking for a fresh start
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": {
"operation": "<operation>"
},
"name": "loop"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| operation | Yes | Operation | |
| file_path | No | File being edited | |
| description | No | For record_edit: what changed | |
| passed | No | For record_test: did tests pass | |
| error_message | No | For record_test: error if failed |