All shelves / Mods / Workflow
loop-guard
By arasovic
loop-guard is a Claude Code workflow mod by arasovic.
Adds a note to the second identical failure of a tool call, telling the model not to try a third time, and shows a toast when it does.
Draws
Install
The marketplace name is claude-code-mods.
claude plugin marketplace add arasovic/claude-code-mods claude plugin install loop-guard@claude-code-mods
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.0
- License
- MIT
- Repo stars
- 7
- Last change
- 2026-10-03
What it can reach
- Draws in the session
- Sees tool calls
Tested on Claude Code 2.1.296. Restart after installing. The marketplace name is claude-code-mods, the same string hamzafer uses. Add arasovic/claude-code-mods. When a tool call fails twice with the same arguments and the same error, it adds a note to the second error that only the model reads: do not try a third time, re-read the error, and change approach or ask you. A toast tells you the note went out. The call must match in tool, arguments, and agent, leaving out the tool's description, and a subagent's failures count apart from the main thread's. The note goes out once per call, a success of the same call clears its record, and /clear or an interrupted turn clears them all.
The marketplace, arasovic's claude-code-mods, also holds guardrails, secret-guard, compact-keeper, and other mods by the same author. This one installs on its own; to update, run claude plugin marketplace update claude-code-mods, then claude plugin update loop-guard@claude-code-mods. Breaking a retry loop is why this page files it under workflow. loop-detective, by YeonwooSung, opens a case when the same Bash command fails the same way again, ties it to the edits that followed, and shows the live cases in a pane and a status line. optimaizr, by blendbunjaku, draws this turn's cost, the 5-hour window, and cache time above the prompt, and holds a command that failed twice unchanged. This one holds nothing: it adds one note for the model and a toast for you. The author says an error that carries a time or a random id is never flagged, refused calls are not counted, and only the last error of a call is kept, so failing with A, then B, then A again sends no note. Its plugin.json names Mehmet Aras as its author.
Demo

What it hooks into
tool.callAround a tool call, where it can hold oneturn.completeWhen a turn endssession.endWhen a session ends
Read from the on() calls in its hook modules. Open its source under Files to check what each one does.
Files
The author's README and source, 4 files. They load when you open them.
Facts
- Author
- arasovic
- Category
- Workflow
- Marketplace
- claude-code-mods
- Folder
- loop-guard
- Version
- 0.1.0
- License
- MIT
- Repo stars
- 7
- Last change
- 2026-10-03
- Language
- TypeScript
- Files
- 6