Skip to content

Plan mode keyboard noop #572

Description

@Tyru5

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

  1. Run cmd --plan or Shift+Tab to enter plan mode
  2. When the agent calls ask_user_question to present options
  3. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions