Skip to content

Loop Guard

Lintsure Loop Guard notices when your AI coding agent repeats the same call with nothing changing in between, and tells it once to change approach. It runs on your machine and needs no account.

An agent that keeps making the same call with nothing changing in between is stuck: the same failing command, or the same file read again and again. Loop Guard counts those calls. After the fifth identical call since the last edit, it tells the agent, once, to stop and try another way.

It runs on your machine through the Lintsure plugin and needs no account. For a shorter overview, see what Loop Guard is for.

How it counts

  • It runs after each tool call and compares it with the calls before it.
  • An edit resets the count, so rerunning tests after a fix is fine.
  • Bookkeeping calls, like updating a task list, don’t count.
  • It only counts. It never blocks a call.

What the agent sees

On the fifth identical call, the agent gets one short message: it has made the same call five times with no change in between, and should change approach. It isn’t repeated for the same loop.

Settings

Change how many repeats count as stuck (the default is 5):

export LINTSURE_LOOP_SAME=8

Turn it off:

export LINTSURE_LOOP=off

What it can’t do

  • It only sees repeated calls. An agent that’s wrong in a new way each time won’t trip it.

The plugin has three more guards: Drift Guard, Danger Guard and Threat Guard.

Lintsure is a readiness tool, not an audit or legal advice. Results cover code only; a qualified person should review them. Disclaimer