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
- Configure a Stop hook in
.claude/settings.json:
{
"hooks": {
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "bash /path/to/stop.sh",
"timeout": 5000
}
]
}
]
}
}
- 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
- Manual test:
echo '{"session_id":"test"}' | bash stop.sh→ exits 2, stderr output shown. ✅ - CLI: hook fires as expected. ✅
- 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).
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗