AskUserQuestion renders real buttons the user can really click, and returns "The user did not answer the questions." every single time — it resolves before the buttons have painted, because the SDK has no answer channel. the choice comes back as the next user message instead. an agent cannot discover that. what it sees is a tool that always reports failure, so the readings available to it are "the user refused" or "the tool is broken", and both are wrong. the cost is asking again, or waiting for a turn that already ended. second on the same page because it is the other thing invisible from the filesystem: markdown renders in BOTH directions now, so a table beats hand-aligned columns.
1.0 KiB
name, description, version
| name | description | version |
|---|---|---|
| Chat | Use when talking to the user in Officer's chat — especially before asking them a question. | 1 |
AskUserQuestion does not block, and its result is always "no answer". The options render as real
buttons and the user really can click them — but the tool resolves the instant it is called, before they
have painted. There is no answer channel in the SDK, so the output you get back is
The user did not answer the questions. every time, whatever they do.
Their choice arrives as the next user message, exactly as if they had typed it.
So: ask, then carry on with whatever does not depend on the answer. Do not read that output as a refusal, do not re-ask because it "failed", and do not sit waiting — the turn is over and the reply comes in the next one. Asking is still worth it; the buttons are faster for them than typing.
Markdown renders in both directions — your messages and theirs. Fenced code blocks, tables and task lists all work, so prefer a table to aligned columns of text.