# `CMDC.Tool.AskUser`
[🔗](https://github.com/tupleyun/cmdc/blob/v0.5.3/lib/cmdc/tool/ask_user.ex#L1)

向用户提问，等待用户回答后继续。

## 执行流程

1. 生成唯一 `ref`
2. 广播 `{:ask_user, session_id, question, options, ref}` 事件
3. 阻塞等待 `{:cmdc_event, session_id, {:user_responded, session_id, ref, response}}` 消息
4. 超时（默认 5 分钟）则返回错误
5. 将用户回答作为工具结果返回 LLM

## 选项参数（可选）

`options` 字段支持预设选项列表，UI 可展示为单选/多选。
为空列表时视为自由文本输入。

## 注意

此工具会**阻塞当前工具执行 Task**，直到用户响应或超时。
外部需通过 `CMDC.approve/2` 或发送对应事件来解除阻塞。

---

*Consult [api-reference.md](api-reference.md) for complete listing*
