Stuck Detector
Spots Claude's retry loops, nudges it to change approach, and stops runaway repeats.
Illustration. Actual results depend on the mod, terminal and environment.
Install
/plugin marketplace add choaticpixels/HauntedClaudeMod
/plugin install stuck-detector@claude-mods
/reload-pluginsRun these commands one at a time in a Claude Code session.
claude plugin marketplace add choaticpixels/HauntedClaudeMod
claude plugin install stuck-detector@claude-modsThen run /reload-plugins in your session, or start a new session.
Please install the Claude Code mod "Stuck Detector" (https://github.com/choaticpixels/HauntedClaudeMod). Before installing, read the Security and Requirements sections of its README and tell me what it reads and writes, which commands it runs, whether it uses the network, and which Claude Code version, OS and terminal it needs. If everything looks fine, run claude plugin marketplace add choaticpixels/HauntedClaudeMod and claude plugin install stuck-detector@claude-mods, then remind me to run /reload-plugins in my session.Send this to Claude Code so it reads the author’s instructions before installing.
git clone https://github.com/choaticpixels/HauntedClaudeMod
cd HauntedClaudeMod
claude --plugin-dir ./plugins/stuck-detectorClone the repository and try it in a local session with --plugin-dir.
What it accesses
Based on the author’s documentation, checked when listed; use claude plugin validate to check for yourself.
Reads
YesReads tool-call arguments (commands, file paths, edits) and results/error text.
Writes files
YesStores the on/off flag and nudge count in plugin storage; appends nudges to the session.
Runs commands
UnspecifiedNetwork
UnspecifiedIntroduction
Stuck Detector is a Claude Code function-hooks mod from the HauntedClaudeMod collection. It watches tool calls so Claude stops burning tokens on the same failing command. It reacts in three steps:
- Same call fails 3×: toast plus a status-line warning.
- Fails 5×, or the same error appears 4× across different commands: appends a nudge to the session telling Claude to stop, diagnose and try something different.
- Fails 8×: the call is denied until you send a new prompt.
It also flags a call repeated 6× even when succeeding (spinning) and 6+ edits to one file in a short span (churn). A new prompt resets everything; subagents are tracked separately; alerts show in a band above the prompt. Commands: /stuck status and recent calls, /stuck reset / off / on.
No minimum Claude Code version is stated; the site baseline is 2.1.287+. Note it injects nudges as user messages. Scores are document-calibrated, not run-tested.
Who it is for
- People running long autonomous Claude sessions who worry about retry loops
Requirements
- No numeric Claude Code minimum stated; site baseline is 2.1.287+ function hooks.
- The 8th identical failing call is denied until you send a new prompt.