Foreground subagent AskUserQuestion pass-through does not work — tool not available to subagents
Summary
The documentation at sub-agents#run-subagents-in-foreground-or-background states:
Foreground subagents block the main conversation until complete. Permission prompts and clarifying questions (like AskUserQuestion) are passed through to you.
In practice, AskUserQuestion is not available in the subagent environment at all. It does not appear in the subagent's built-in tools, deferred tools, or ToolSearch results.
Environment
- Claude Code version: 2.1.86
- Platform: macOS (Darwin 24.6.0)
- Model: claude-opus-4-6 (1M context)
- Permission mode: bypassPermissions
Reproduction Steps
- Create a custom agent (e.g.
designer) in~/.claude/agents/designer.md - Spawn it as a foreground subagent via the
Agenttool - Instruct the subagent to call
AskUserQuestion
Experiment 1: ToolSearch then call
Instructed the subagent to use ToolSearch("select:AskUserQuestion") first, then call it.
Result: ToolSearch returned "No matching deferred tools found."
Experiment 2: Declare in frontmatter, then ToolSearch
Added tools: AskUserQuestion, Read, Edit, Write, Bash, Grep, Glob, WebFetch, WebSearch, ToolSearch to the agent's YAML frontmatter.
Result: ToolSearch still returned "No matching deferred tools found."
Experiment 3: Declare in frontmatter, direct call (no ToolSearch)
Kept the tools: frontmatter declaration and instructed the subagent to call AskUserQuestion directly without ToolSearch.
Result: Subagent reported AskUserQuestion is not in its available tools. It listed its full tool inventory:
- Built-in:
Bash,Edit,Glob,Grep,Read,Write,ToolSearch - Deferred:
SendMessage,TaskCreate,TeamCreate,WebSearch,WebFetch, MCP tools, etc. AskUserQuestionwas absent from both lists.
Expected Behavior
Per the documentation, a foreground subagent should be able to call AskUserQuestion, and the question should be passed through to the user in the main conversation.
Actual Behavior
AskUserQuestion does not exist in the subagent tool pool. The tools: frontmatter declaration has no effect. The subagent cannot interact with the user at all — the only path is returning results to the parent agent, which then relays questions manually.
Impact
This affects any workflow where a subagent needs to gather user input before proceeding (e.g., a design agent collecting aesthetic preferences, a planning agent clarifying requirements). The documented pass-through behavior would be very useful if implemented.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗