WorkflowAppears in · Band / Toast / Status lineAdded

Stuck Detector

Spots Claude's retry loops, nudges it to change approach, and stops runaway repeats.

Stuck Detector · Effect preview · IllustrationIllustrative
> Add pagination to the order list
⏺ I’ll look at the list component first.
✗ npm test ✗ npm test ✗ npm test ✗ npm test ✗ npm test
🔁 Stuck Detector: npm test failed 5× · Claude was nudged to change approach
[Stuck Detector] Do not run it again unchanged; find the root cause.
(illustrative) after 8 failures 🛑 the call is denied until a new prompt
❯

Illustration. Actual results depend on the mod, terminal and environment.

Install

/plugin marketplace add choaticpixels/HauntedClaudeMod
/plugin install stuck-detector@claude-mods
/reload-plugins

Run these commands one at a time in a Claude Code session.

What it accesses

Based on the author’s documentation, checked when listed; use claude plugin validate to check for yourself.

Reads

Yes

Reads tool-call arguments (commands, file paths, edits) and results/error text.

Writes files

Yes

Stores the on/off flag and nudge count in plugin storage; appends nudges to the session.

Runs commands

Unspecified

Network

Unspecified

Introduction

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.