guard_loop_check
Checks the current session's failing-command streak and tells you whether rerunning the same normalized command will be blocked, so you can avoid repeating a command that just failed.
Instructions
Report failing-command streaks for this session and whether the next rerun blocks.
Use it before repeating a command that just failed. The same normalized
command, including a trailing ; or a trailing || true mask, shares one
streak. It takes no parameters. It returns PC loops, up to five
command × count lines, and a Nudge. When a streak is at
loop_block_after (default 3), the text says the next identical run will
be blocked. Streaks come from bash tool results and from guard_verify
rows for PC_SESSION_ID (or default). An unproven exit 0 does not reset
a streak. Side effects: if .agent-guard/ is missing it is created, and
config.json is seeded when that file is absent. It does not run the
command and does not append the journal or the evidence ledger.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "guard_loop_check"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |