# Loop Breaker

> Catches your AI agent repeating the same failing step or tool call. Call check_step after each step; when the same call fails the same way 3 times, or runs 5 times in a row, Pro halts the run before it burns more time and money. Free watch-only mode never halts: it flags loops and drafts a weekly report. Pro is $9 a month.

## Connect
- MCP (streamable HTTP): https://loop.cloudforbots.com/mcp
- Claude Code: `claude mcp add --transport http loop-breaker https://loop.cloudforbots.com/mcp`
- REST: `POST https://loop.cloudforbots.com/api/run/<tool>` with JSON args. OpenAPI: https://loop.cloudforbots.com/openapi.json
- Auth: optional `Authorization: Bearer <key>`. Free key: `POST https://loop.cloudforbots.com/api/key`

## Pricing
- Free: 500 calls/day (daily, not a trial). No signup.
- Pro: $9/month, 50000 calls/day: https://pay.instaloops.com/b/eVqaEXbtS8QTgdxdgX83C3y
- Bring your own model. Works with Claude, Codex, ChatGPT, Grok Bot.

## Tools
### check_step
Call AFTER each tool call or agent step with what you just did and whether it failed. Loop Breaker fingerprints the call (tool + normalized args + error) and returns verdict ok, loop_detected or halted. Pro: on a loop, halt=true; stop the run, do not retry, and tell your user what repeated. Free watch-only: never halts, returns would_halt and logs it for the weekly report.
Inputs: `run_id` (string, required), `tool` (string, required), `args` (undefined), `error` (string), `max_failures` (integer), `max_repeats` (integer)

### loop_status
Show a run's loops so far, whether it is halted, and its last 10 steps.
Inputs: `run_id` (string, required)

### weekly_report
Draft a plain-English report of the last 7 days for your key (or IP): runs, loops caught, wasted repeat steps, and the worst offenders. Read-only; sends nothing. Show it to your user.
Inputs: none

### usage_and_upgrade
Usage today + upgrade link (not metered).

## FAQ
### What problem does this solve?
Agents get stuck: a button moved, a login expired, an API keeps returning 429, and the agent retries the same step for hours. Loop Breaker spots the repeat and stops the run so it fails fast and cheap.

### How does my agent use it?
After each tool call, call check_step with a run_id, the tool name, the args and the error if it failed. If the verdict is halted (halt=true), stop, do not retry, and tell your user what repeated.

### What counts as a loop?
By default the same call failing with the same error 3 times, or the same call 5 times in a row even if it succeeds. Timestamps, ids and long numbers are normalized away. Both thresholds are adjustable per call.

### What is watch-only mode?
The free plan never halts. check_step returns loop_detected with would_halt=true, logs it, and weekly_report drafts a summary of loops and wasted steps. Your agent keeps running as usual.

### Is there a model inside?
No. Bring your own model. Loop Breaker only compares fingerprints of the steps your agent reports; it never runs or retries anything.

### What does it cost?
Free: watch-only, 500 step checks a day, weekly report. Pro is $9 a month: hard halts and 50,000 checks a day. It is also included in the Cloud for Bots All Access bundle.

Publisher: Supa Humans (https://supahumans.ai). Marketplace: https://botrecipe.com/tools/
