AskUserQuestion unavailable in all sub-agent contexts despite docs stating foreground pass-through

Resolved 💬 7 comments Opened Mar 15, 2026 by atgim Closed Apr 29, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

AskUserQuestion is completely absent from sub-agent environments — not in direct tools, deferred tools, or ToolSearch results. The official documentation states it should be passed through in foreground sub-agents, but in practice it is not provided at all.

Sub-agents docs states:

Foreground subagents block the main conversation until complete. Permission prompts and clarifying questions (like AskUserQuestion) are passed through to you.

Tools reference lists AskUserQuestion as an internal tool with no special restrictions noted.

Compared to main session, sub-agents are missing at least:

| Tool | Main session | Sub-agent |
|------|:---:|:---:|
| AskUserQuestion | ✅ | ❌ |
| EnterPlanMode | ✅ | ❌ |
| ExitPlanMode | ✅ | ❌ |

Any workflow where a sub-agent needs user interaction is broken:

  • Multi-turn requirement gathering (adaptive Q&A)
  • Design decisions requiring user input
  • Plugin-defined agents listing AskUserQuestion in tools frontmatter

What Should Happen?

Foreground sub-agents (Agent tool, Skill with context: fork) should have access to AskUserQuestion as documented. The tool should be passed through so that the sub-agent can prompt the user for input and receive answers, just like the main session does.

Error Messages/Logs

# Test 1: Agent tool (general-purpose, foreground)
Agent(prompt: "Use ToolSearch to find AskUserQuestion, then list all available tools")
→ Sub-agent reports 8 direct tools + 34 deferred tools.
→ AskUserQuestion not found in any of them.
→ ToolSearch returns "No matching deferred tools found."

# Test 2: Skill with context: fork
# .claude/skills/test-ask/SKILL.md with agent that has AskUserQuestion in tools list
→ "AskUserQuestion unavailable — the tool is not provided in the current environment."

# Test 3: Main session (control)
ToolSearch("select:AskUserQuestion") → Found, schema returned, tool works normally.

Steps to Reproduce

  1. Open Claude Code v2.1.76
  2. In the main session, run ToolSearch("select:AskUserQuestion") — confirm it works (control test)
  3. Spawn a foreground sub-agent:

``
Agent(prompt: "Use ToolSearch to find AskUserQuestion, then list all available tools")
``

  1. Observe: sub-agent reports AskUserQuestion is not found in direct tools, deferred tools, or ToolSearch results
  2. Alternatively, create a skill with context: fork and an agent that lists AskUserQuestion in its tools frontmatter:

``yaml
# .claude/skills/test-ask/SKILL.md
---
name: test-ask
description: AskUserQuestion test
context: fork
agent: planner # agents/planner.md with tools: Read, Grep, Glob, Write, Edit, AskUserQuestion
---
Use AskUserQuestion to ask the user a question.
``

  1. Invoke the skill — observe that AskUserQuestion is unavailable in the forked context

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

~2.1.61 (early March 2026). The v2.1.70 changelog mentions an AskUserQuestion performance fix, suggesting it was functional at that point.

Claude Code Version

2.1.76

Platform

Anthropic API

Operating System

  • Linux (Docker container)
  • macOS (local)
  • Reproduced in both environments

Terminal/Shell

  • Non-interactive/CI environment (Docker)
  • Terminal.app (macOS)

Additional Information

Related issues with AskUserQuestion in non-main contexts:

  • #30563 — AskUserQuestion returns empty answer when PreToolUse hook + skill allowed-tools are both present
  • #29393 — Co-work teammate silently stalls when agent calls AskUserQuestion
  • #30983 — AskUserQuestion auto-resolves with empty answers in Agent SDK
  • #30523 — AskUserQuestion returns empty inside Skill tool

These suggest a broader pattern of AskUserQuestion being broken in all non-main-session contexts.

🤖 Generated with Claude Code

View original on GitHub ↗

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