Summary
The ask_user_question tool (used when I present options in plan mode) uses @clack/prompts — specifically select, confirm, and multi-select components. These take over stdin by calling process.stdin.setRawMode(true).
I believe the problem is a stdin contention issue: when @clack/prompts renders its option selector, the main Ink useInput handler (already listening on stdin through React Ink's event system) and the Clack prompt both try to read from the same stdin.
If Ink's useInput has isActive: true when the Clack prompt is shown, Ink consumes the keystroke first, and the Clack prompt never sees it resulting in a noop.
Expected Behavior
Arrow keys should navigate between options and enter should select the highlighted option.
Actual Behavior
When in plan mode, the ask_user_question tool presents options (e.g. "Yes/No" to enter plan mode or select from option lists), but keyboard inputs (arrow keys, enter) have no effect.
The options render on screen but keystrokes are not registered; they appear dead.
Steps to reproduce the issue
- Run cmd --plan or Shift+Tab to enter plan mode
- When the agent calls ask_user_question to present options
- Press arrow keys to navigate or enter to select — nothing happens
Command Code Version
0.52.1
Operating System
macOS
Terminal/IDE
ghostty
Shell
zsh
Additional context
No response
Summary
The
ask_user_questiontool (used when I present options in plan mode) uses @clack/prompts — specifically select, confirm, and multi-select components. These take over stdin by callingprocess.stdin.setRawMode(true).I believe the problem is a
stdincontention issue: when@clack/promptsrenders its option selector, the main Ink useInput handler (already listening on stdin through React Ink's event system) and the Clack prompt both try to read from the same stdin.If Ink's useInput has isActive: true when the Clack prompt is shown, Ink consumes the keystroke first, and the Clack prompt never sees it resulting in a
noop.Expected Behavior
Arrow keys should navigate between options and enter should select the highlighted option.
Actual Behavior
When in plan mode, the
ask_user_questiontool presents options (e.g. "Yes/No" to enter plan mode or select from option lists), but keyboard inputs (arrow keys, enter) have no effect.The options render on screen but keystrokes are not registered; they appear dead.
Steps to reproduce the issue
Command Code Version
0.52.1
Operating System
macOS
Terminal/IDE
ghostty
Shell
zsh
Additional context
No response