DEDUPED Hot AI repos, turned into use cases Get 5 a day

How to catch agent retry loops before they burn your session with My Claude Code Mods

Detect repeated Bash failures and edit or retry cycles with evidence and investigation prompts.

Who it is forA developer who notices an agent retrying the same failing command or edit over and over, and wants it flagged with proof.

The problemRetry cycles can run for a long time before anyone notices the agent is stuck.

The outcomeA flagged loop with its evidence, an investigation prompt to break the cycle, and a bounded history of past cases.

What you need first

  • A Claude Code CLI with Mods support (mods are enabled by default from 2.1.287)
  • git on your PATH for Time Machine
  • A terminal running macOS, Linux, or a Bash or Zsh shell for the install block
  • Node 22.19.0 or later only if you plan to run the repo's development tests

Steps

  1. Add the marketplace with claude plugin marketplace add YeonwooSung/my-claude-code-mods if you have not already.
  2. Install with claude plugin install loop-detective@my-claude-code-mods --scope user.
  3. Start a new Claude Code session, or run /reload-plugins, then run /plugin to confirm loop-detective is loaded.
  4. Watch the live case pane during a session and open the evidence for any flagged case.
  5. Use the investigation prompt for a flagged case to redirect the agent, then check the case history if the loop returns.

Prompt for your agent

Using the repo YeonwooSung/my-claude-code-mods, install loop-detective at user scope and run a session on <task description>. Report every flagged repeated Bash failure or edit/retry cycle with its evidence and the investigation prompt shown. Verify that each flagged case cites at least two matching attempts from the session before you report it.

Caveat. The README verifies the Loop Detective engine suite on Claude Code 2.1.280 and live UI rendering is not separately established, so check the case pane in your own terminal.

Share: X LinkedIn Hacker News Email Copy link

Disclaimer

Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked "Seen in the wild", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email [email protected] and we will look at it promptly. Full disclaimer page