[BUG] AskUserQuestion autoselecting without waiting for user input

Resolved 💬 6 comments Opened Oct 24, 2025 by dluc Closed Jan 12, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

I have a custom command scanning a TODO folder, searching and recommending what dev task to do next. Part of the command looks like this:

3. Present options to the user using AskUserQuestion:
   - List all TODO items grouped by type (Features, Issues, DevOps)
   - Format each option as: "[Type] #NNNNN - Title"
   - Include options for:
     - "Cancel" - Exit without doing anything
     - "Delete an item" - Show list of items to delete

4. Handle user selection:
   - **If item selected**: Launch the engineer agent using the Task tool to work on the selected item
   - **If "Delete an item" selected**:
     - Show list of all items again with option to select which one to delete
     - Delete the selected file using Bash
     - Show updated list and allow another selection
   - **If "Cancel" selected**: Exit gracefully

Bug: Several times the command will not show the list, but pick one and start working on it WITHOUT ASKING instead.

Possible root cause:

  • the list is too long
  • --dangerously-skip-permissions : this might be the culprit, but it feels like a bug, if a command is designed to ask for a choice, I would not consider that a "permission" ask.

What Should Happen?

When using AskUserQuestion Claude Code CLI should always wait for the user.

Error Messages/Logs

Steps to Reproduce

-see notes above-

Claude Model

Sonnet (default)

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

2.0.26

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Warp

Additional Information

<img width="1245" height="239" alt="Image" src="https://github.com/user-attachments/assets/4988f20f-f640-444c-a319-05ae72ac61a8" />

View original on GitHub ↗

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