Stop hook does not fire in VSCode extension

Resolved 💬 4 comments Opened Mar 27, 2026 by Daytona666 Closed Apr 30, 2026

Description

The Stop hook configured in .claude/settings.json does not fire when Claude Code runs inside the VSCode extension. The same hook works correctly in CLI sessions.

Reproduction

  1. Configure a Stop hook in .claude/settings.json:
{
  "hooks": {
    "Stop": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "bash /path/to/stop.sh",
            "timeout": 5000
          }
        ]
      }
    ]
  }
}
  1. The script reads stdin JSON and exits with code 2 (to block the stop with feedback):
#!/bin/bash
INPUT=$(cat)
echo "Stop hook fired" >&2
exit 2
  1. Manual test: echo '{"session_id":"test"}' | bash stop.sh → exits 2, stderr output shown. ✅
  2. CLI: hook fires as expected. ✅
  3. VSCode extension: hook never fires. ❌

Environment

  • Windows 11 Pro 10.0.26100
  • VSCode with Claude Code extension
  • Other hooks in the same settings file (PreToolUse, PostToolUse, SessionStart) all fire correctly in the same VSCode extension environment.

Expected behavior

Stop hook should fire in the VSCode extension the same way it does in CLI, consistent with PreToolUse/PostToolUse/SessionStart hooks which all work in both environments.

Notes

This follows the same pattern as Notification hooks not firing in VSCode (#11156).

View original on GitHub ↗

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