[BUG] Stop hook stuck in loop

Resolved 💬 3 comments Opened Jul 3, 2025 by apetta Closed Jul 4, 2025

Environment

  • Claude CLI version: 1.0.41 (Claude Code)

Bug Description

Stop hook inspired by the docs keeps going in a loop. Doesn't exit. How do we set an exit condition?

Config:

{
 "hooks": {
    "Stop": [
      {
        "matcher": "",
        "hooks": [
          {
            "type": "command",
            "command": "pnpm run ci"
          }
        ]
      }
    ]
  }
}

Expected Behavior

Run the hook once and end if nothing to do.

Actual Behavior

It keeps triggering itself.

<img width="592" alt="Image" src="https://github.com/user-attachments/assets/e70ba2d0-cdfd-48e3-a3be-c35279cfbd90" />

View original on GitHub ↗

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