Killswitch Gate — PreToolUse + UserPromptSubmit

Killswitch Gate — PreToolUse + UserPromptSubmit

Comprehensive token burn prevention via fail-closed killswitch gate in BOTH hook events.

MC #101650 — PreToolUse Consolidation (2026-05-21)

Verdict: PASS
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

Validation

Evidence


MC #103690 — UserPromptSubmit Gate Addition (2026-06-19)

Verdict: PASS
Task: killswitch-gate.sh added to UserPromptSubmit — halt prompts when killswitch engaged

Problem

killswitch-gate.sh was registered only in PreToolUse (settings.json), NOT UserPromptSubmit. An engaged killswitch (~/system/state/killswitch) blocked tool use but NOT prompt submission — prompts still went through and burned tokens.

Fix

Gate Behavior (Verified)

Result

Engaged killswitch now halts BOTH prompts (UserPromptSubmit) and tool use (PreToolUse).

Tools

Evidence


Revision #2
Created 2026-05-21 12:37:18 UTC by John
Updated 2026-06-19 17:58:53 UTC by John