AskUserQuestion returns empty answer when PreToolUse hook + skill allowed-tools are both present

Resolved 💬 8 comments Opened Mar 4, 2026 by littlebig1 Closed Apr 2, 2026

Bug Description

AskUserQuestion auto-approves and returns empty answers (just ".") when both conditions are true:

  1. A PreToolUse hook is configured in settings.json
  2. AskUserQuestion is listed in a skill/command's allowed-tools frontmatter

Neither condition alone triggers the bug.

Reproduction

Environment: Claude Code v2.1.63, macOS

settings.json (PreToolUse hook):

"PreToolUse": [{
  "hooks": [{
    "type": "command",
    "command": "bash ~/.claude/hooks/log-tool-use.sh",
    "async": true
  }]
}]

Command frontmatter (allowed-tools):

allowed-tools:
  - AskUserQuestion

Test matrix:

| PreToolUse hook | AskUserQuestion in allowed-tools | Result |
|---|---|---|
| Yes | No (bare call) | Works |
| No | Yes (inside skill) | Works |
| Yes | Yes (inside skill) | Empty answer "." |

Expected Behavior

AskUserQuestion should render the question UI and wait for user input regardless of PreToolUse hooks.

Notes

  • Related to #13439 (PreToolUse fix in v2.0.76) and #29547 (allowed-tools injection fix)
  • The v2.0.76 fix appears to not cover the combined code path where alwaysAllowRules (from allowed-tools injection) interacts with PreToolUse hook processing

View original on GitHub ↗

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