PreToolUse hook status message renders repeatedly causing visual noise

Open 💬 5 comments Opened Jan 1, 2026 by kogangdon

Description

When a PreToolUse hook is configured with matcher: "Bash", the status message (e.g., "Running PreToolUse hook...") renders repeatedly in the terminal, causing significant visual noise.

Environment

  • OS: Windows 11
  • Shell: Git Bash
  • Claude Code version: Latest

Configuration

{
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "Bash",
        "hooks": [
          {
            "type": "command",
            "command": "bash .claude/hooks/pre-commit-lint.sh",
            "timeout": 180,
            "statusMessage": "Running lint before commit..."
          }
        ]
      }
    ]
  }
}

Expected Behavior

The status message should render once and update in place, similar to other loading indicators in the CLI.

Actual Behavior

The status message renders multiple times in sequence:

● Bash(git log --oneline -10)
                               ⎿  Running PreToolUse hook…

● Bash(git log --oneline -10)
                               ⎿  Running PreToolUse hook…

● Bash(git log --oneline -10)
                               ⎿  Running PreToolUse hook…

● Bash(git log --oneline -10)
                               ⎿  Running PreToolUse hook…
...

This repeats many times (10-20+) before the actual command output appears.

Steps to Reproduce

  1. Configure a PreToolUse hook with matcher: "Bash"
  2. Run any Bash command through Claude Code
  3. Observe the repeated status message rendering

Additional Context

  • The hook itself executes correctly
  • The issue appears to be with the terminal rendering/refresh logic
  • Even when the hook script exits early (for non-matching commands), the rendering issue still occurs

View original on GitHub ↗

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