PostToolUse HTTP hooks not dispatched despite docs claiming support

Resolved 💬 3 comments Opened Mar 10, 2026 by voyagi Closed Mar 14, 2026

Bug Description

HTTP hooks configured for PostToolUse events are silently ignored. The configuration is accepted without error, but no HTTP POST request is sent to the configured URL when a PostToolUse event fires. Command hooks for the same event work correctly.

Steps to Reproduce

  1. Configure an HTTP hook for PostToolUse in ~/.claude/settings.json:
{
  "hooks": {
    "PostToolUse": [
      {
        "matcher": "Glob",
        "hooks": [
          {
            "type": "command",
            "command": "node -e \"console.log('command hook fired')\""
          },
          {
            "type": "http",
            "url": "http://127.0.0.1:18923/hooks/my-hook",
            "timeout": 5
          }
        ]
      }
    ]
  }
}
  1. Start a new session (hook config is session-scoped)
  2. Trigger a Glob tool call
  3. Observe: command hook fires (stdout appears as system-reminder), HTTP hook does NOT fire (no request received by server)

Verification

  • The HTTP server is running and responds correctly to direct POST requests
  • The same HTTP URL works correctly when configured for PreToolUse events
  • The settings.json format is identical between working PreToolUse and non-working PostToolUse entries
  • No project-level settings override exists
  • Tested across 3 separate sessions with consistent results

Expected Behavior

HTTP POST should be sent to the configured URL for PostToolUse events, matching the behavior of PreToolUse HTTP hooks.

Actual Behavior

The HTTP hook config is silently accepted but no request is ever sent. Command hooks in the same matcher group fire correctly.

Impact

This prevents migration of PostToolUse hooks from command-based (shell-spawned) to HTTP-based execution. On Windows/MSYS, each command hook spawns a Node.js process through bash (~30ms overhead). For high-frequency PostToolUse hooks (e.g., matcherless hooks firing on every tool call), this represents significant cumulative overhead that HTTP hooks would eliminate.

Environment

  • Claude Code version: 2.1.72
  • Platform: Windows 11 (MSYS2/Git Bash)
  • Hook server: Node.js HTTP on localhost:18923

Documentation Reference

Hooks documentation lists PostToolUse as supporting all four hook types including HTTP, which does not match observed behavior.

View original on GitHub ↗

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