AskUserQuestion auto-completes with empty answers when listed in command allowed-tools

Resolved 💬 2 comments Opened Mar 2, 2026 by fivetaku Closed Mar 2, 2026

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

  1. Create a command file with allowed-tools including AskUserQuestion:
---
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.
  1. Run /test-command
  2. Expected: AskUserQuestion UI renders with selectable options
  3. 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).

View original on GitHub ↗

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