loop-detector

by Kaustubh Tripathi · ★ 0 · updated 2 days ago

PanesBandsStatus lineGuardsCommandsvalidates

0

Warns when Claude Code seems stuck repeating the same edits, commands or failures

install loop-detector

Install

/plugin marketplace add ktripathi2281/LoopDetector
/plugin install loop-detector@loop-detector

Then run /reload-plugins or start a new session. Requires Claude Code 2.1.287+.

View source on GitHub

What it hooks into

From an automated scan with claude plugin validate, not a security review. Mods run with your permissions; read the code before installing.

Events
session.startsession.endturn.startturn.completetool.callcommand.runui.render
API calls
$.clock.after$.command.register$.prompt.fill$.prompt.read$.prompt.submit$.prompt.suggest$.session.surfaces$.state.get$.state.set$.turn.abort$.ui.close$.ui.copy$.ui.log$.ui.open$.ui.resolve$.ui.status$.ui.toast
Draws
AbovePromptPane
Can see
every tool call
Reach
level 2 of 3 other: $.prompt.readother: $.state.getother: $.state.setdrives Claudewrites the prompt boxdraws

Origin

How it got here
Automated scan of public GitHub repos, via the CC0 dataset awesome-claude-code-mods (scan of ).
Repository
github.com/ktripathi2281/LoopDetector
Path in repo
loop-detector
Author
Kaustubh Tripathi @ktripathi2281
License
MIT
First published
Last pushed
First listed here
On X
Mentioned in 1 post on X

Name and description come from the mod's own manifest. We link to the code; we don't host it, and it stays under its author's license.

Posts about this repo

Kaustubh Tripathi@kauswhynot

Claude Code kept retrying the same failing fix, so I built a mod that catches it 🔁 It flags the loop, explains why, and Rethink makes Claude change approach. Runs locally. No extra model calls. (Loop staged for the demo.) https://github.com/ktripathi2281/LoopDetector