From 9bfb13aced68e9e0778f9d46b0eeb939cef05a30 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Tue, 26 May 2026 12:58:14 -0500 Subject: feat(hooks): hard-deny the AskUserQuestion popup machine-wide The no-popup-menus rule in interaction.md was too easy to forget, so the popup kept slipping back into choice prompts. I added a PreToolUse hook on AskUserQuestion that denies the call outright and returns the rule as the reason, which routes choices back to inline numbered lists. Since ~/.claude/settings.json symlinks to this repo's .claude/settings.json, the hook is machine-wide and version-controlled across machines. I documented it under the rule in interaction.md, including the consequence: the deny is unconditional, so the old "use the popup for this one" exception now needs the hook disabled via /hooks first. --- .claude/settings.json | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to '.claude/settings.json') diff --git a/.claude/settings.json b/.claude/settings.json index 0b81559..0f76d18 100644 --- a/.claude/settings.json +++ b/.claude/settings.json @@ -8,6 +8,17 @@ "defaultMode": "bypassPermissions" }, "hooks": { + "PreToolUse": [ + { + "matcher": "AskUserQuestion", + "hooks": [ + { + "type": "command", + "command": "echo '{\"hookSpecificOutput\":{\"hookEventName\":\"PreToolUse\",\"permissionDecision\":\"deny\",\"permissionDecisionReason\":\"Popup choice menus are disabled per interaction.md (No Popup Menus for Choices) — present options inline in chat as a numbered list and ask the user to reply with a number.\"}}'" + } + ] + } + ], "PreCompact": [ { "hooks": [ -- cgit v1.2.3