Feature request: Allow AskUserQuestion to be dismissed programmatically or with a timeout

Resolved 💬 3 comments Opened Mar 21, 2026 by jibeex Closed Apr 19, 2026

Problem

When building dual-channel workflows (e.g., a decision gate that accepts input from both the terminal AND an external source like email), AskUserQuestion blocks indefinitely and cannot be dismissed when the external channel responds first.

The current constraints:

  • AskUserQuestion is the only way to show an interactive prompt to the user, but it blocks and has no timeout or programmatic cancellation
  • Bash tool stdin is not interactive (isatty() returns False), so we cannot build our own interactive prompt
  • There are no hooks or events that can interrupt a pending AskUserQuestion

This means if a user responds via the external channel (e.g., email), they still have to manually press Escape in the terminal to continue the workflow — defeating the purpose of a dual-channel approach.

Proposed Solutions (any would unblock this)

  1. Timeout option on AskUserQuestion — e.g., timeout_seconds: 60 that auto-dismisses and returns a timeout indicator
  2. Programmatic cancellation — allow a background task or hook to cancel a pending AskUserQuestion, returning a cancellation indicator
  3. Interactive stdin in Bash tool — connect a TTY so custom terminal UIs (e.g., curses, select on stdin) can be built

Use Case

A Claude Code skill (/ask-user-dual-channel) that:

  1. Sends a question via email
  2. Shows the same question in the terminal via AskUserQuestion
  3. Whichever channel responds first should move the workflow forward

Currently, the email response arrives and is detected by a background poll, but the terminal prompt stays stuck until the user manually dismisses it.

View original on GitHub ↗

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