MC 101650 Hook PreToolUse Killswitch Consolidation
MC 101650 Hook PreToolUse Killswitch Consolidation
Verdict: PASS
Date: 2026-05-21
Task: [P3-4] Hook consolidation: merge PreToolUse matchers, eliminate 6x killswitch + duplicate fires
Summary
~/.claude/settings.json had killswitch-gate.sh repeated in every PreToolUse matcher group. For Task, multiple matcher groups also matched, causing duplicate killswitch execution. The PreToolUse killswitch is now centralized in one universal matcher while specialized gates remain in their original matcher groups.
Change
- Added first PreToolUse entry: matcher
.*→bash $HOME/system/hooks/killswitch-gate.sh. - Removed
killswitch-gate.shfrom the specific PreToolUse matcher entries:BashTask|WebSearch|WebFetchTaskmcp__playwright__.*Write|Edit|MultiEdit
- Preserved UserPromptSubmit killswitch separately because it is a different hook event.
- Backed up settings to
~/.claude/settings.json.bak-101650. - Restored
uchgimmutable flag on~/.claude/settings.json.
Validation
settings.jsonJSON-valid.- PreToolUse killswitch occurrences reduced from
5to1. - Total killswitch occurrences reduced from
6to2:- one PreToolUse universal matcher,
- one UserPromptSubmit gate.
- Representative matching analysis shows exactly one PreToolUse killswitch for:
- Bash
- Task
- WebSearch
- WebFetch
- mcp__playwright__click
- Write/Edit/MultiEdit
- Killswitch OFF smoke:
killswitch-gate.shexits0with empty stdout/stderr.
Evidence
/tmp/101650-hook-inventory.txt/tmp/101650-post-consolidation-analysis.txt/tmp/101650-smoke-validation.txt/tmp/101650-evidence/