ClaudeCodeMod

All shelves / Mods / Safety

loop-breaker

By mishgoldenberg

loop-breaker is a Claude Code safety mod by mishgoldenberg.

Notices Claude going in circles, the same command failing 3 times or the same code rewritten 3 times in a turn, tells you, and tells Claude to stop and rethink.

Draws

Install

The marketplace name is claude-mods.

In your shell
claude plugin marketplace add mishgoldenberg/claude-mods
claude plugin install "loop-breaker@claude-mods"
Open the repo

It runs inside the Claude Code process. The side panel is only what the author's README names. Read the repo before you install, or run claude plugin validate on the plugin folder.

Version
0.1.1
License
MIT
Repo stars
11
Last change
2026-10-05

What it can reach

  • Draws in the session
  • Sees tool calls

Needs Claude Code 2.1.286 or newer. Restart Claude Code after installing. The README's main install adds mod-manager and picks mods from its /mods pane; this line is from its loop that installs every mod without the manager. Panels dock beside the chat in the desktop app or a terminal 144 columns wide or more, and open inline in narrower ones. Options appear in /config. Function hooks are early access, and a Claude Code update can break a mod. failLimit and editLimit set the counts, 3 by default. Separate edits to different parts of a file never count.

The marketplace name is claude-mods. The marketplace also holds mod-manager, which installs the others from a pane, and ten more mods. This one installs on its own. The README's loop installs every mod with claude plugin install "$m@claude-mods"; this page puts this mod's name in place of $m. Catching Claude going in circles is why this page files it under safety. loop-detective opens a case when the same Bash command fails the same way again. agent-usage-guard asks before a tool loop runs on, from the plan usage. This one counts both failing commands and rewrites of the same code in one turn, then tells you and Claude once per loop. In the source, the toast stays 9 seconds and the note reaches Claude on its next step. It refuses nothing.

Demo

The Features table of the claude-mods README, one row per mod. The loop-breaker row: it notices Claude going in circles, the same command failing 3 times or the same code rewritten 3 times in a turn, tells you, and tells Claude to stop and rethink.
Screenshot of the author's GitHub page.

What it hooks into

  • turn.startWhen Claude starts a turn
  • tool.callAround a tool call, where it can hold oneBashPowerShellEditWrite

Read from the on() calls in its hook modules. Open its source under Files to check what each one does.

Files

The author's source, 3 files. They load when you open them.

Facts

Author
mishgoldenberg
Category
Safety
Marketplace
claude-mods
Repo
mishgoldenberg/claude-mods
Folder
plugins/loop-breaker
Version
0.1.1
License
MIT
Repo stars
11
Last change
2026-10-05
Language
TypeScript
Files
3

Other mods in Safety

scope-guardtheonly1meHolds a commandAsks before Claude edits, deletes, or moves files outside what you asked for, and flags milder drift above the prompt with keys to pull Claude back.installguardgrichesHolds a commandHolds a package install the registry flags, such as a made-up name, a lookalike, or an hours-old release, and asks you, with a report pane beside the question.flywheel-modHarperZ9Holds a commandHolds a risky shell or file-edit call when the Flywheel monitor flags it, shows held and passed counts above the prompt, and writes a receipt for each turn.push-gateIvanLutsenkoHolds a commandAsks before every git push the model runs, with the repository, branch, upstream, commit count, and a force-push warning, and runs the confirmed push itself.devtoolsNMenzelHolds a commandHolds a tool call at a breakpoint you set for Continue, Step, or Reject, with a dashboard pane of every call and Error Lens on why a call failed.agentic-flowruvnetHolds a commandRefuses an agentic_flow_agent call whose task matches a destructive or exfiltration pattern or passes an API key, and adds a status-line entry for the guard.agentdbruvnetHolds a commandRefuses a write to AgentDB memory that holds a key, token, password, or private key, and refuses its destructive admin tools unless you turn them on.cc-askpassGoneToneOpens a password pane when a command Claude runs asks for sudo, ssh, or git credentials, so the password goes to the program and never reaches the model.secret-envtoy-craneHolds a commandOpens a pane for typing an API key into a .env file, shows [hidden] wherever the value appears in tool results, and denies Write and Edit on that key's line.mod-blast-radiusv-amorimHolds a commandHolds a risky Bash command on a card until you choose Run or Cancel, shows what it would change first, and reads your own rules from a JSON file.mod-collision-guardv-amorimHolds a commandPauses a file edit when another open session just edited that file, and asks you to proceed, move to a worktree, cancel, or type an instruction for Claude.secret-guardvumichienHolds a commandHides secret values from your env files and secret-shaped text in tool results, tells Claude to use $NAME instead, and refuses commands that print them.
All 73 in Safety