AskUserQuestion auto-completes with empty answers when listed in command allowed-tools
Bug Description
When AskUserQuestion is included in a command's YAML frontmatter allowed-tools list, the question UI does not render. Instead, the tool auto-completes with empty answers and proceeds silently.
Steps to Reproduce
- Create a command file with
allowed-toolsincludingAskUserQuestion:
---
name: test-command
allowed-tools:
- AskUserQuestion
---
# /test-command
## Turn 1
Use AskUserQuestion to ask the user:
**Question 1**: "What kind of app do you want to build?"
- **Todo app** — Productivity app
- **Budget app** — Finance tracking
## Turn 2
Print the answer.
- Run
/test-command - Expected: AskUserQuestion UI renders with selectable options
- Actual: "User answered Claude's questions:" appears with empty answers, no UI shown
Working Case
The same command without allowed-tools frontmatter (or with AskUserQuestion removed from the list) renders the question UI correctly.
# /test-command (no frontmatter)
## Turn 1
Use AskUserQuestion to ask the user:
...
This works as expected — the question picker UI appears and the user can select options.
Root Cause Hypothesis
allowed-tools appears to auto-approve tool calls, which for most tools (Read, Write, Bash, etc.) makes sense. However, AskUserQuestion is a user interaction tool that requires UI rendering. Auto-approving it skips the UI and submits empty answers.
Environment
- Claude Code CLI (latest)
- macOS Darwin 25.2.0
- Tested across multiple fresh sessions — consistently reproducible
Workaround
Remove AskUserQuestion from the allowed-tools list. The tool still works correctly when not explicitly listed — it just requires normal user permission approval (which triggers the UI to render).
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗