AskUserQuestion tool doesn't render interactive UI — returns empty response immediately
Description
The AskUserQuestion tool does not render any interactive UI (question text, selectable options). Instead, it immediately returns with "User answered Claude's questions:" and an empty/blank answer, skipping the interactive selection entirely.
Steps to Reproduce
- Start a Claude Code session
- Ask Claude to use the
AskUserQuestiontool (e.g., "Can you ask me something?") - Claude calls
AskUserQuestionwith a question and multiple options - Expected: An interactive UI appears showing the question and selectable options
- Actual: No UI is shown. The tool immediately returns with an empty response
Observed Behavior
The conversation flow looks like this:
> Can you ask me something, I want to check if the ask-user-question tool works
● Sure, let me test for you.
● User answered Claude's questions:
(empty)
● The AskUserQuestion tool is working. It presented you with the question...
The question and options are never displayed. The tool returns as if the user answered, but with no content.
Environment
- Claude Code version: 2.1.63
- Platform: macOS (Darwin 25.3.0, Apple M4)
- Shell: zsh
Additional Context
A screenshot is available showing the exact behavior — will be added as a follow-up comment.
same issue here ! https://github.com/anthropics/claude-code/issues/29547
But only in a context of a /skill
I have the same issue.
Root Cause Found + Fix
I tracked this down to a PreToolUse hook with a wildcard matcher (*) returning updatedInput for ALL tools, which silently corrupts the AskUserQuestion input schema.
The Problem
When a PreToolUse hook returns updatedInput in its response, Claude Code replaces the tool's entire input with that object. If the hook injects extra properties (like env) into updatedInput for every tool call, it corrupts tools whose schema doesn't expect those properties.
For AskUserQuestion, the expected input is:
{"questions": [{"question": "...", "options": [...]}]}
But the hook was producing:
{"questions": [{"question": "...", "options": [...]}], "env": {"TERM": "dumb", "NO_PAGER": "1", ...}}
The extra env key causes the interactive UI to not render — the tool returns immediately with empty answers.
Minimal Reproduction
Any PreToolUse hook with:
matcher: ""(empty string = matches all tools), and- Returns
updatedInputwith injected properties (even if the properties are unrelated to the tool)
...will break AskUserQuestion, TaskCreate, and other UI tools.
The Fix (Hook Authors)
Never return updatedInput for tools that don't need input mutation. Use a passthrough allowlist:
const PASSTHROUGH_TOOLS = new Set([
"AskUserQuestion", "EnterPlanMode", "ExitPlanMode",
"TaskCreate", "TaskUpdate", "TaskList", "TaskGet",
"Read", "Glob", "Grep", "WebSearch", "WebFetch",
"Agent", "Skill",
]);
async function main() {
const input = parseStdin();
// UI/metadata tools: allow without mutation
if (PASSTHROUGH_TOOLS.has(input.tool_name)) {
console.log(JSON.stringify({
hookSpecificOutput: {
hookEventName: "PreToolUse",
permissionDecision: "allow"
}
}));
return;
}
// Only mutate tools that actually need it (e.g., Bash)
// ...
}
Suggestion for Claude Code Team
Claude Code should strip unknown properties from updatedInput before applying it, using each tool's schema as a filter. This would make hooks forward-compatible and prevent this class of bugs entirely. Alternatively, validate that updatedInput only contains keys present in the tool's parameter schema, and warn/ignore extras.
Fix Applied
I've published the fix in terrylica/cc-skills v11.63.1 — the pretooluse-subprocess-stdin-inlet-guard.ts hook now uses a PASSTHROUGH_TOOLS set to skip UI tools entirely.
Related closed issues: #13439, #10400
Downgrading to 2.1.62 ia another "fix".
My Workaround: Remove AskUserQuestion from the skill's allowed-tools frontmatter. The tool then works normally under default permissions.
My Workaround: Remove
AskUserQuestionfrom the skill's allowed-tools frontmatter. The tool then works normally under default permissions.
It's not just a problem with skills. AskUserQuestion does not work at all.
Additional case: No PreToolUse hooks, same behavior
Environment:
- Claude Code v2.1.63
- macOS (darwin)
- No PreToolUse hooks configured (hooks: {} in all settings files)
- Plugin skill with
AskUserQuestioninallowed-tools
Same symptom: AskUserQuestion returns empty answers immediately without rendering UI.
This suggests the bug has another trigger path beyond the PreToolUse hook corruption described above.
Workaround (removing AskUserQuestion from allowed-tools) works for getting responses, but markdown preview rendering degrades — multi-line previews show as "N lines hidden".
Without AskUserQuestion in allowed-tools (degraded — "N lines hidden"):
With AskUserQuestion in allowed-tools (detailed markdown preview):
experiencing same issue. AskUserQuestion is broken
+1, Claude Code 2.1.63, can be avoided in my case when I don't bypass permissions aka --dangerously-skip-permissions.
So, the out-of-the-box solution for now will be to remove the AskUserQuestion tool from the list of allowed tools?
Works again in v2.1.66
Works again in v2.1.66
Not with /gsd though :(
v2.1.66 still has the issue for me. Removing AskUserQuestion from the allowed-tools is the fix I use.
I had to troubleshoot through this. If you have the skill give a pause, and ensure there are AT LEAST TWO ANSWERS, it will work. I had a 5 question list in a skill, and the first one would get stepped on by the skill progression - the pause gate fixed that. Add a "Type Ok to continue" prompt to the skill before the questions. (You can type anything; just need the pause and user nudge to keep going).
I used this in the skill prompt: Rules:
Each AskUserQuestion call: questions array length = 1. Each question: 2-4 options with short labels (under 8 words) and short descriptions (under 20 words). Wait for the user's answer before calling AskUserQuestion again. When presenting complex information (menus, spec lists), print it as plain text output FIRST, then ask a simple approval/selection question separately. If you need to collect 5 inputs, that's 5 separate AskUserQuestion calls in sequence — not 1 call with 5 questions. NO QUESTIONS IN THE FIRST RESPONSE. After a skill loads, AskUserQuestion is broken for the entire first agent response turn — the UI silently drops every prompt. The SKILL.md injection poisons the rendering pipeline for that turn. The fix: in your first response after the skill loads, ONLY output plain text (pre-flight status, Phase 0 results, a "ready to begin" message). Do NOT call AskUserQuestion. End your first response with a prompt like "Ready — press Enter to start." The user's reply creates a turn boundary, and AskUserQuestion works normally from the second response onward.
v2.1.66 still has the issue for me. Removing AskUserQuestion from the allowed-tools is the fix I use.
Not necessary, downgrade to 2.1.62 and everything is fine.
+1, seeing this on Claude Code 2.1.121, macOS (Darwin 25.4.0), zsh, inside Cursor's integrated terminal (TERM_PROGRAM=vscode, TERM=xterm-256color).
Behaviour is intermittent within the same terminal — some sessions the interactive card UI renders fine, others it silently falls back to plain-text numbered options. No pattern I can pin to a specific trigger (no piped input, stdin clean, hooks exit cleanly with stdin closed).
Two questions for the maintainers if there's any guidance:
-
Is there a setting or env var to force-enable the interactive picker, so it errors loudly instead of silently falling through to text? Even a debug flag would help users self-diagnose.
-
Is the text fallback intentional as a token/context optimisation (e.g. avoiding the extra tool-result roundtrip), or is it purely a rendering failure path? Asking because if interactive mode costs meaningfully more tokens or latency, that's a tradeoff worth documenting; if not, the silent fallback is just a bug.
Happy to provide more repro detail if useful.
This was fixed in Claude Code 2.1.69, so we're closing this issue. If you disagree, let us know here and we can re-open it. Thanks for reporting!