The 5-Minute Wrong Turn
You ask your agent to design the data layer for a new feature. Five minutes later you scroll up and notice it picked Postgres. You wanted SQLite — embedded, single-binary, no service to run. You've now wasted 5 minutes of token spend on the wrong direction, and you're about to spend another 5 walking it back.
The cost wasn't the wrong answer. It's that nobody ever asked you.
This pattern shows up everywhere coding agents work:
- "Should this be a modal or a drawer?" → agent picks modal, you wanted drawer
- "There are three files that match — which one do you mean?" → agent picks the wrong one
- "Should this migration backfill or be additive?" → agent picks backfill, your table is 50M rows
- "Tailwind or CSS modules?" → agent picks Tailwind, your codebase uses CSS modules
The agent isn't dumb. It's just confidently guessing on questions where there's no right answer without your input.
The Three Bad Alternatives Agents Have Today
Look at what coding agents do today when they hit a fork in the road:
-
Pick one and proceed. Fast, but you only catch the mistake by reviewing the diff. Wrong direction has high blast radius — every subsequent decision compounds the original wrong turn.
-
Output a question as plain text and stop. The agent writes "should I use X or Y?" and dies. You type back "Y". The agent has no context for the answer — its mental state is gone. You re-type half your original prompt.
-
Spawn a planning subagent. Slow, expensive, and overkill for "Postgres or SQLite?". Subagents are great for exploration — not for asking a yes-or-no question.
Every agent today does some mix of these. None are great. The fix turns out to be small.
The Fix: A Multiple-Choice Tool
Aii CLI v0.16.4 adds AskUserQuestion — a tool the agent can call like any other. It pauses execution, shows you a structured choice, and resumes with your answer in context.
> I'm starting a new analytics service. Use AskUserQuestion to ask me
which database to use. Give me 3 options with descriptions and allow Other.
● I'll help you set up your analytics service. Let me ask about
the database choice first.
● AskUserQuestion(Which database should we use for the analytics service?)
Which database should we use for the analytics service?
The database choice will affect scalability, query patterns,
and development approach.
● 1. PostgreSQL
Relational database with JSON support, strong consistency
○ 2. ClickHouse
Columnar database optimized for analytical queries
○ 3. TimescaleDB
PostgreSQL extension for time-series data
○ 4. Other
[↑↓ navigate · 1-4 jump · Enter submit · Esc cancel]Pick an option with arrows or number keys, hit Enter, and the agent picks up where it left off — with your answer as context, not a re-typed prompt.
● AskUserQuestion(Which database should we use for the analytics service?)
└ User answered: [Other]: MySQL
● Great choice! MySQL is a solid option for analytics services — it's
battle-tested, widely supported, and has good tooling.
Now, before we write any code, I should understand more about your
analytics service. What kind of analytics are you planning to collect?
...The "Other" option means you're never boxed in by the model's three guesses. Type whatever you actually want and it gets prefixed back to the agent as [Other]: <your text>.
The Subtle Part: Teaching the Model When NOT to Use It
This is where most implementations of "ask the user" patterns fail. If you give the model a question tool with no guidance, one of two things happens:
- Over-use — the agent asks for permission on every trivial choice. "Should I name the variable
countortotal?" You disable the feature within a day. - Under-use — the agent never calls it because the prompt doesn't make the trigger conditions obvious. The tool exists but nobody benefits.
The fix is explicit prompt guidance, baked into the system prompt:
Use AskUserQuestion when:
- Multiple valid architectural approaches exist
- Multiple valid UX patterns exist
- Multiple files match an ambiguous reference
- Confirming destructive operations beyond what permissions cover
Do NOT use AskUserQuestion for:
- Trivial questions where you have a clear best answer
- Questions you can answer by reading the codebase
- Yes/no confirmations (use natural conversation instead)
Provide 2-4 concrete options with descriptions explaining the tradeoff.
Always allow "Other" so the user isn't boxed in.Without this guidance the tool is useless. With it, the model develops a feel for when a decision actually belongs to the human. The prompt is half the feature.
What This Looks Like in the Terminal
After the dialog closes, the scrollback shows a clean one-line summary:
● AskUserQuestion(Which database should we use?)
└ User selected: PostgreSQLOr for free-form answers:
● AskUserQuestion(Which database should we use?)
└ User answered: [Other]: MariaDB Galera clusterOr if you cancel with Esc:
● AskUserQuestion(Which database should we use?)
└ Cancelled by userThe agent receives the cancellation as a structured error and can decide what to do — retry with different options, ask differently in plain text, or stop and wait. You stay in control.
What Happens When You Cancel
Cancellation is the part most agents get wrong. The first instinct is to immediately re-ask with rephrased options, which is exactly what the user just said no to. Aii's prompt guidance teaches the agent that pressing Esc means "the multiple-choice frame wasn't right" — not "try harder."
When you cancel, the agent should switch to natural conversation: explain the tradeoffs of each option in plain text, then ask one open-ended follow-up to understand your context.
● AskUserQuestion(Which database should we use for analytics?)
└ Cancelled by user
● The user cancelled the question. Let me try a different approach —
I'll provide some guidance and let you decide.
For analytics services, the main considerations are:
1. Data volume and growth rate
2. Query patterns — aggregations, time-series, complex joins
3. Real-time vs batch
4. Data structure — structured, semi-structured, time-series
Common picks:
* PostgreSQL — ACID compliance, complex joins, moderate volume
* ClickHouse — real-time aggregations on massive datasets
* TimescaleDB — time-series data like metrics, monitoring, IoT
* Snowflake/BigQuery — fully managed cloud data warehousing
What's your primary use case — dashboards, real-time monitoring,
or batch reporting?That's a real DeepSeek response in our terminal. No structured re-ask, no presumptuous default — the agent recognizes it overreached with the rigid frame and pivots to a softer one. You give a one-line answer, the agent has the context it needed, you both move on.
This is what "knowing when to pause" actually means. The pause matters less than what happens after.
Works on Any LLM
This isn't a model-specific feature. AskUserQuestion is implemented as a regular tool definition in Aii's tool registry — every model that supports tool calls can use it. We tested with Claude, GPT, DeepSeek, and local models via Ollama. The dialog UI, the result handling, the prompt guidance — all of it ships once and works everywhere.
That matters because the "ask the user" pattern shouldn't be locked to a single provider. Knowing when to pause is a design choice in the agent layer, not a frontier-model capability.
The Bigger Picture
The next stretch of agent UX isn't about smarter autonomy. It's about knowing when to pause.
We covered plans (visible work) and progress (visible state) in our earlier post on agent planning. AskUserQuestion completes the picture: collaborative decisions. Three faces of the same trust-building shift — agents that work with you instead of at you.
A confident-guesser agent feels powerful for the first 30 seconds and exhausting after the first hour. A pause-when-it-matters agent feels like a real collaborator from minute one.
Try It
npm install -g @aiiware/aii
aiiTry a prompt where the answer genuinely depends on you:
> design the data layer for a new analytics feature. ask me which
database to use before you write any code.Watch the dialog appear. Pick an option, or type your own. The agent picks up from there with your decision in context — not a re-typed prompt, not a wrong-direction five minutes later.
— AiiWare Engineering