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:
AskUserQuestionis 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()returnsFalse), 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)
- Timeout option on
AskUserQuestion— e.g.,timeout_seconds: 60that auto-dismisses and returns a timeout indicator - Programmatic cancellation — allow a background task or hook to cancel a pending
AskUserQuestion, returning a cancellation indicator - Interactive stdin in Bash tool — connect a TTY so custom terminal UIs (e.g.,
curses,selecton stdin) can be built
Use Case
A Claude Code skill (/ask-user-dual-channel) that:
- Sends a question via email
- Shows the same question in the terminal via
AskUserQuestion - 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.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗