No progress indicator during long-running PostToolUse hooks — user sees silent hang

Resolved 💬 3 comments Opened Apr 26, 2026 by podop969 Closed Apr 30, 2026

Summary

When PostToolUse hooks take a long time (e.g., running test suites), Claude Code shows no progress indicator or status message. The user sees the model appear completely frozen with no output for the duration of the hook execution. In our case, this caused apparent 30-50 minute hangs.

Root cause (user-side, now fixed)

We had auto-test.sh attached to PostToolUse Write|Edit matcher with a 120s timeout. Each file edit triggered a full pytest run. During a typical coding session with 15-20 file edits, cumulative hook time was 30-50 minutes — entirely silent from the user's POV.

Fix: moved auto-test to PostToolUse Bash only (fires on commits, not edits).

UX gap (Claude Code side)

During hook execution, the UI shows nothing. No spinner, no "running hooks...", no hook name or elapsed time. The user has no way to distinguish:

  • Hooks running normally (expected wait)
  • Model genuinely stuck (needs intervention)
  • Network timeout (should retry)

Suggestion

Show a status line during hook execution, e.g.:
⏳ Running PostToolUse hook: auto-test.sh (12s / 120s timeout)

This would have saved us hours of confusion across multiple sessions.

Environment

  • Windows 11, Claude Code CLI
  • 8+ hooks configured across SessionStart/UserPromptSubmit/PreToolUse/PostToolUse/Stop
  • Hooks call Ollama API + pytest + shell scripts

Additional note

The Bash matcher does NOT match PowerShell tool calls. This is expected but non-obvious — our workaround of "bypass and use PowerShell directly" worked because it silently skipped all Bash-matched hooks. Worth documenting in hook matcher docs.

View original on GitHub ↗

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