[FEATURE] Hook Retry Limit

Resolved 💬 2 comments Opened Apr 8, 2026 by kinto0 Closed May 22, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

Many tools that may be added to claude Done hooks might return a non-zero exit code on failure. If claude fails to fix these, they might return non-zero exit code every time. When this happens, I'd like a fallback mechanism for my hooks to not loop.

Proposed Solution

I would prefer a new argument in hooks in settings.json that lets me input a retry limit. This would prevent claude from looping forever and wasting tokens.

Alternative Solutions

My current workaround is a shell script wrapping my hook with a per-session_id retry limit from stdin.

Priority

High - Significant impact on productivity

Feature Category

CLI commands and flags

Use Case Example

Adding a typechecker to my Done hook.

Additional Context

_No response_

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗