loop-guard
Reviewed
at commit 50c740d
Holds back a shell command once when the exact same command already failed twice in a row, and tells Claude to change approach; retrying it still goes through.
0 upvotes
Log in to upvote or save- Made by
- Vedant Andhale
- Pinned commit
-
50c740de95530819a151ad693a09df48d556a0f7 - What we checked
-
When the exact same Bash or PowerShell command has failed twice in a row, it holds the next attempt back once and tells Claude to change approach. Running the same command again right after goes through. It reads only the command text and failure status, keeps counts in memory, and shows a status line.
Review details
Static review of the source at the pinned commit; not run. Registers tool.call (only for Bash and PowerShell), session.compact and session.end. It counts failures per command string and per agent in memory (at most 200 entries), returns a one-time deny with a short message after two consecutive failures, and lets the next identical call through; a success clears the count. Counters are cleared on compaction and session end. Uses $.ui.status for a short 'retries held back' line. No files, programs, network, model calls or persistent storage. Failure behaviour: none special; it only wraps next(e).
- What it uses
-
- Reads your prompts: no
- Sees tool calls: yes
- Blocks or changes tool calls: yes
- Reads or writes files: no
- Runs programs on your machine: no
- Calls the model (uses tokens): no
- Sends data over the network: no
- Stores data: no
- Shows something on screen: yes
Made this mod? Add a badge to your README
Paste this into your README. The badge says reviewed once the current version has been reviewed, and links readers to this page.
[](https://modsforclaude.com/mods/loop-guard/)