claude-code - 💡(How to fix) Fix Misleading 'Stop hook blocking error' message should say 'Stop blocked' instead [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#52975Fetched 2026-04-25 06:15:46
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Timeline (top)
labeled ×3commented ×1

When a stop hook returns {"decision": "block", ...} to intentionally prevent Claude from stopping (e.g., for iterative loops like the ralph-loop plugin), Claude Code displays:

Stop hook blocking error from command: "bash ..."

The word "error" is misleading because this is expected behavior - the hook is working correctly. Users may think something is broken when the hook is functioning as designed.

Error Message

Stop hook blocking error from command: "bash ..." The word "error" is misleading because this is expected behavior - the hook is working correctly. Users may think something is broken when the hook is functioning as designed. This occurs when using the ralph-loop plugin which uses stop hooks to implement iterative development loops (the Ralph Wiggum technique). Each iteration shows "blocking error" which is confusing since it's the intended behavior. The message says "Stop hook blocking error" when it should indicate the stop was intentionally blocked.

Root Cause

The word "error" is misleading because this is expected behavior - the hook is working correctly. Users may think something is broken when the hook is functioning as designed.

Code Example

Stop hook blocking error from command: "bash ..."
RAW_BUFFERClick to expand / collapse

Description

When a stop hook returns {"decision": "block", ...} to intentionally prevent Claude from stopping (e.g., for iterative loops like the ralph-loop plugin), Claude Code displays:

Stop hook blocking error from command: "bash ..."

The word "error" is misleading because this is expected behavior - the hook is working correctly. Users may think something is broken when the hook is functioning as designed.

Suggested fix

Change the message to something clearer like:

  • "Stop blocked by hook"
  • "Stop hook: blocked"
  • "Stop hook feedback"

Context

This occurs when using the ralph-loop plugin which uses stop hooks to implement iterative development loops (the Ralph Wiggum technique). Each iteration shows "blocking error" which is confusing since it's the intended behavior.

Steps to reproduce

  1. Install the ralph-loop plugin: /plugin install ralph-loop
  2. Start a loop: /ralph-loop:ralph-loop "Do something" --max-iterations 3
  3. Complete the iteration and observe the message when the stop hook fires

The message says "Stop hook blocking error" when it should indicate the stop was intentionally blocked.

extent analysis

TL;DR

Update the stop hook message to clearly indicate that the stop was intentionally blocked, rather than implying an error occurred.

Guidance

  • Review the current stop hook implementation to understand how the message is generated and identify the best point to update the message.
  • Consider alternative message suggestions, such as "Stop blocked by hook" or "Stop hook: blocked", to ensure clarity and accuracy.
  • Verify that the updated message is displayed correctly when the stop hook fires, using the steps to reproduce provided in the issue.
  • Test the updated message with different plugins and scenarios to ensure consistency and correctness.

Example

No code snippet is provided as the issue does not include specific code details, but the message update could be as simple as replacing the existing message with a new one, e.g., "Stop hook: blocked".

Notes

The suggested fix is focused on updating the message to improve clarity and avoid confusion, rather than changing the underlying behavior of the stop hook.

Recommendation

Apply a workaround by updating the stop hook message to a clearer and more accurate phrase, such as "Stop blocked by hook", to avoid confusing users about the intended behavior.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING