ccdwyer/loop-breaker

ccdwyer/loop-breaker

에이전트가 같은 곳을 빙빙 도는 일을 막는 Claude Code 모드입니다. 동일한 도구 실패가 반복되면 거부하고, 파일 편집이 앞뒤로 진동하면 차단하며, 프롬프트 위에 멈춤 미터와 /unstick을 표시합니다. 네트워크나 텔레메트리를 사용하지 않고 로컬에서 실행됩니다.
먼저 작성자의 README에서 marketplace와 플러그인 이름을 확인하세요. 저장소 구조에 따라 명령어가 달라질 수 있습니다.
claude plugin marketplace add ccdwyer/loop-breaker claude plugin install loop-breaker

The second identical failure raises the stuck band; the third identical run is refused. MP4 · screenshots: warning, refused
A Claude Code mod that stops the agent from going round in circles.
Repeat failures. If the same tool call, with exactly the same arguments, fails twice in a row with the same error (timings, temp paths and saved-output paths are ignored when comparing), and nothing in the code has changed since, the third try is refused. The model is told to fix the cause first. Failures from runs that started before the code changed are ignored. These all reset the count, so normal fix-and-retest work is never blocked:
Interrupted calls and commands moved to the background are not counted.
Oscillation. An Edit or Write can put a file back to exactly the version it had before the last change. If the whole file keeps flipping between two versions three times in a row, the fourth flip is refused, and the model has to pick a version based on evidence. Small, similar swaps at different places in a file don't count, and a change by anyone else breaks the chain.
Stuck meter. A line above the prompt shows the current streak, starting from the second failure, with an unstick button. It only shows the program name and a word or two, never tokens. It is drawn above any other mod's band, without hiding it.
/unstick clears all history and runs immediately, even mid-turn. A new prompt from you, /clear or a resume also clears it. Background notifications and scheduled prompts do not.
Known limits:
History is kept per agent, and a subagent's history is dropped when it finishes. It lives in memory only (short hashes, never file contents) and starts over on a hot reload.
/plugin marketplace add ccdwyer/claude-mods
/plugin install loop-breaker@ccdwyer-mods
/reload-plugins
claude plugin validate .
claude plugin test .
Events this mod hooks, as claude plugin validate reads the module:
session.startcommand.run{command=unstick}prompt.submitsession.endturn.completetool.callui.render{component=AbovePrompt}Engine calls it makes: $.command.register, $.fs.read (via undoesAgain), $.state.get, $.state.set, $.ui.resolve.
A tool.call hook sits in the middle of every tool call: it can see the call, refuse it, or add context to its result. This mod uses that only for the behaviour described above.
It runs entirely on your machine. It sends nothing over the network.
The mod collects no analytics or telemetry, and its author receives no data from it.
Full policy: PRIVACY.md.
MIT