AskUserQuestion returns empty answers - TTY not passed to tool subprocess
Bug Description
AskUserQuestion tool executes but returns empty answers without rendering any interactive UI. The tool completes silently with no selection shown to the user.
Environment
- Claude Code version: 2.1.63
- OS: Ubuntu Linux 6.8.0-101-generic
- Terminal: SSH session into tmux (xterm-256color)
Root Cause Analysis
The main Claude Code process is correctly attached to a TTY:
/proc/<pid>/fd/0 -> /dev/pts/0
/proc/<pid>/fd/1 -> /dev/pts/0
/proc/<pid>/fd/2 -> /dev/pts/0
But the tool subprocess where AskUserQuestion executes has stdin/stdout/stderr connected to sockets, not a TTY:
/proc/<subprocess_pid>/fd/0 -> socket:[2096662]
isatty(stdin) = false
isatty(stdout) = false
isatty(stderr) = false
The TUI selection component requires a real TTY to render the interactive chip/option selector. Since the subprocess only has socket connections, it silently fails and returns an empty answer.
Steps to Reproduce
- SSH into a Linux server
- Start Claude Code (directly or inside tmux)
- Ask Claude something that triggers AskUserQuestion (e.g., "ask me a question with options")
- Observe: no interactive UI appears, tool returns empty string
What Was Tried (None of These Fix It)
- tmux
set -g allow-passthrough on - tmux
set -g default-terminal "xterm-256color" - SSH with
-tflag for forced TTY allocation - Various TERM/COLORTERM environment variables
None work because the issue is internal to Claude Code's tool execution architecture, not terminal configuration.
Expected Behavior
AskUserQuestion should render its interactive selection UI and capture the user's choice, regardless of whether Claude Code was launched via SSH or locally.
Related Issues
- #10229
- #9854
- #12672
- #13439
This appears to be the same underlying subprocess TTY issue reported in those issues. Filing separately because none have resolution and this includes detailed root cause diagnostics.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗