ClaudeCodeMod

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.

In your shell
claude plugin marketplace add arasovic/claude-code-mods
claude plugin install loop-guard@claude-code-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.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

loop-guard's toast after a repeated failure
From the author's repo.

What it hooks into

  • tool.callAround a tool call, where it can hold one
  • turn.completeWhen a turn ends
  • session.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
Repo
arasovic/claude-code-mods
Folder
loop-guard
Version
0.1.0
License
MIT
Repo stars
7
Last change
2026-10-03
Language
TypeScript
Files
6

Other mods in Workflow

compact-keeperarasovicSaves a handoff file at each compaction: tokens before and after, your /compact instructions, the files edited since the last one, and Claude Code's summary.switchboardhamzaferPicks the model for each subagent that names none, draws each pick above the prompt, and shows what every subagent cost in /route.terminal-browserzenbu-labsOpens a real browser in a pane inside Claude Code, to preview sites and HTML, and lets the agent drive it.flightdeckscasellaDraws a live agent dashboard: the main model's context and cost, every permission check, subagents as cards or swimlanes, and a receipt for each turn.reflect-modBayramAnnakovSpots reusable corrections in your short prompts and shows each one in a band above the prompt, where one press saves it to CLAUDE.md.mobile-mcpmobile-nextAdds the mobile-mcp server for driving phones and simulators, and /mobile-mirror, a live device screen in a pane that you tap and type into.done-dingSingh-APPings you with a desktop notification and a chime when a long turn finishes or Claude is waiting on you, with optional pushes to your phone.decision-treeray-amjadWhen Claude ends a reply with a question, explains the choice in a side pane and lets you explore any option, or your own, in a forked session.savvy-progressJohnnyVizzDraws a progress bar above the prompt for /savvy-flow, and an agents panel with each subagent's model, task progress, context, cost, and time.prompt-railoikon48Draws a rail of your session's prompts above the input or beside the transcript; hover a tick to read one, click to jump to it.prompt-bouncerray-amjadSends a vague prompt back before Claude sees it, with a toast that suggests the project's own term.human-in-the-looptzafrirLets Claude assign you the tasks only you can do. They wait in a My tasks pane, counted under the prompt, until you answer or reject them.
All 396 in Workflow