AskUserQuestion: Agentic processing breaks when sub-agent is asked to use AUQ by initial user-prompt
Summary
AskUserQuestion is listed as an available tool in spawned subagent definitions, but when a subagent (launched via the Agent tool) calls it, the interactive question UI is never surfaced to the user. This is especially problematic when the user explicitly requests AskUserQuestion in their initial prompt to the main session: that intent is delegated downstream through the agent chain to the specialist agent — which has the domain context to formulate meaningful questions — but instead of an interactive UI, the questions appear as plain prose text and processing halts. The user can read the questions but has no way to answer them interactively, and the requested task is never completed.
The Core Problem
A user asks for interactive clarification as part of a delegated task. The instruction flows naturally down the chain:
User prompt: "... the specialist must use AskUserQuestion for any open topics"
→ Main session
→ Orchestrator subagent (Agent tool)
→ Specialist subagent (Agent tool)
↑ has full domain context, best positioned to ask
↑ calls AskUserQuestion — questions are output as plain prose, no interactive UI
↑ processing halts — user can see the questions but cannot answer them
↑ requested task (e.g. file generation) is never executed
The specialist calls AskUserQuestion — instead of an interactive dialog, the questions are printed as plain text and the agent stops. The user can read the questions but has no mechanism to respond. The actual task is never performed.
Steps to Reproduce
Setup
Create two agent definition files:
.claude/agents/orchestrator.md
---
name: orchestrator
description: Routes requests to the right specialist
tools: Read, Agent, AskUserQuestion
---
Classify the request and delegate to the correct specialist via the Agent tool.
Pass the full user prompt — including any instruction to use AskUserQuestion — verbatim to the specialist.
.claude/agents/specialist.md
---
name: specialist
description: Domain expert that performs the actual task
tools: Read, Write, AskUserQuestion
---
You have full domain context for this task.
If the user requested AskUserQuestion, identify open topics and ask the user
using AskUserQuestion before proceeding with the task.
Reproduce
In a Claude Code session, send a prompt to the main session that explicitly forces the specialist subagent to use AskUserQuestion:
"@orchestrator Please handle this task and produce output file X. The specialist subagent MUST use AskUserQuestion to clarify any open topics before producing the output. Do not fall back to placeholders or assumptions — interactive questions via AskUserQuestion are required."
The main session delegates to the orchestrator (via Agent tool), which passes the full prompt — including the explicit AskUserQuestion requirement — verbatim to the specialist (via Agent tool). The specialist, bound by the user's instruction and having the domain context to know what is unclear, calls AskUserQuestion to comply.
Expected: An interactive question UI appears in the terminal; after the user answers, the specialist completes the task and produces the output.
Actual: The questions appear as plain prose text in the terminal. No interactive UI is shown. The user can read the questions but has no way to answer them. Processing halts. The task is never completed and the user must re-invoke the entire pipeline.
Actual Behavior
AskUserQuestion is silently degraded in subagent contexts: instead of an interactive UI, questions are emitted as plain text and the agent stops. No error is raised. The user can see what was asked but cannot respond. The user's explicit instruction to use AskUserQuestion causes the pipeline to stall — a worse outcome than if the instruction had never been given.
Expected Behavior
One of:
- A)
AskUserQuestionworks end-to-end in subagent contexts, surfacing the interactive UI from within the spawned agent; after answers are received the agent completes its task. - B) The framework provides a mechanism for a subagent to return structured questions, with the parent automatically re-surfacing them via
AskUserQuestionand re-invoking the specialist with the answers — preserving the user's intent transparently. - C)
AskUserQuestionis explicitly excluded from the available tool list in subagent contexts with a clear error at definition load or call time, so developers know not to rely on it and the agent never halts on it.
Workaround (until fixed)
Subagent definitions must explicitly instruct agents NOT to call AskUserQuestion and to proceed with [TODO: ...] placeholders for missing information instead. The parent session calls AskUserQuestion before delegating — but without the specialist's domain context, requiring a two-pass pattern that is fragile and non-obvious.
Flag workarounds in agent definitions with a comment so they can be removed once fixed:
<!-- WORKAROUND: AskUserQuestion silently halts subagents — github.com/anthropics/claude-code/issues/57658 -->
Environment
- Platform: macOS (darwin)
- Shell: zsh
- Model: claude-sonnet-4-6
- Claude Code CLI (latest as of 2026-05-09)
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗