After each tool call
Get a stuck agent moving again
Loop Guard tells the agent, once, when it is going in circles. Five identical calls with no code change in between, like the same failing command or the same file read again, means it is stuck. The agent changes approach.
What it counts
The same call, five times, nothing changed
It counts identical tool calls since the last edit. An edit resets the count, so rerunning tests after a fix is fine. It only counts; it never blocks.
- Run 1upload.test.ts fails
- Run 2Same failure
- Run 3Same failure
- Run 4Same failure
- Run 5Loop Guard steps in
Your settings
Change the limit or turn it off
Set LINTSURE_LOOP_SAME to change how many repeats count as stuck, or LINTSURE_LOOP=off to turn it off.
$ export LINTSURE_LOOP_SAME=8 $ export LINTSURE_LOOP=off # or turn it off
What it can't do
- It only sees repeated calls. An agent that is wrong in a new way each time won't trip it.
Turn it off with LINTSURE_LOOP=off.
Lintsure is a readiness tool, not an audit, a certification or legal advice.
Add the plugin to Claude Code
/plugin marketplace add lintsure/plugin/plugin install lintsure@lintsureThat's all. It runs on your machine, needs no account and sends nothing to lintsure.com. A hosted workspace is optional. The same guards run in Cursor, Gemini CLI and Codex through adapters in the plugin's repo.