Enhancement: interactive ask_user_question tool (tabbed questionnaire UI)

Open 💬 26 comments Opened Jan 26, 2026 by vbp1
💡 Likely answer: A maintainer (etraut-openai, contributor) responded on this thread — see the highlighted reply below.

Adds a new tool, ask_user_question, for structured Q&A in the Codex CLI.

What it is / why

ask_user_question lets the agent ask the user a small set of clarifying questions with constrained answers, instead of relying on free-form chat back-and-forth.
This is useful for resolving ambiguity quickly (e.g. picking a backend/framework, providers, feature set, etc.) while keeping the model input structured.

UX (what the user sees)

  • The prompt appears in the bottom input area.
  • A row of tabs: one tab per question + a Submit tab.
  • You can navigate tabs with keyboard only (←/→), and can move forward without answering.
  • Single choice: selecting an option advances to the next tab (returning lets you change it).
  • Multiple choice: select/deselect options, then press Enter for Next.
  • Each question can include a custom option; if selected, the user types their own label.
  • The bottom area shows a short progress hint (e.g. Select to continue. ←/→ tabs / Press Enter for Next. ←/→ tabs) and the usual key-hint footer.
  • On Submit, the tool returns only the structured answers, and the chat transcript gets a summary block like:
  • ● User answered:
  • ⎿ · <question> → <answer(s)>

<img width="1532" height="878" alt="Image" src="https://github.com/user-attachments/assets/f757dd1b-ed38-475b-94ce-b1a7d0f88a3c" />

Non-interactive exec safety

codex exec is non-interactive and must not hang waiting for user input.
A proposed implementation should ensure that by:

  • Removing human-input tools (ask_user_question, request_user_input) from the toolset when SessionSource::Exec is used.
  • Adding a defensive fail-fast in both handlers: tool calls return a clear error in non-interactive session sources instead of waiting on a response channel.

Implementation notes

  • Keep existing request_user_input unchanged.
  • Support multi-question prompts with tabs + Submit tab.
  • Cancel aborts the tool call; Submit returns answers only.
  • Add minimal snapshot coverage for the new UI.

Notes:

  • Add a protocol event (e.g. AskUserQuestion) to drive the TUI overlay.

References

View original on GitHub ↗

26 Comments

etraut-openai contributor · 5 months ago

Thanks for the suggestion. If we were to implement this, we'd need to plumb it through to all of our supported Codex surfaces including the Codex CLI (TUI), Codex IDE Extension, and Codex Web.

We are already exploring something similar to this in the context of the Plan Mode feature request.

aravhawk · 5 months ago

@vbp1
+1, this is the only thing remaining that would get me to move my workflow completely to Codex CLI (from Claude Code / OpenCode)

vbp1 · 5 months ago

You may test ask TUI, just build codex binary from https://github.com/vbp1/codex/tree/feat/ask-question-tool

am-will · 5 months ago

this already exists.

turn on

collaboration_modes = true

its called the request_user_input tool

you can just call it on command, as you can see in my example. its awesome.

proof here!

https://x.com/LLMJunky/status/2014229866254610531?s=20

vbp1 · 5 months ago

Nop.
It's another functionality (primarily, it's collaboration with 3 modes, not just the tool), I do not need that modes yet, I would like agent just asking me.
I tried these modes and the agent's behavior changed (not for the better)

am-will · 5 months ago

That is not correct. Request_user_input is the same thing as AskUserQuestion they are literally identical and can be used at any time, just like in Claude. It can ask at any time.

And there's only 2 modes.

Code and plan.

You are mistaken. This will be part of Codex default when they take it out of beta.

Nop. It's another functionality (primarily, it's collab with 3 modes, not just the tool), I do not need that modes yet, I would like agent just asking me. I tried these modes and the agent's behavior changed (not for the better)
vbp1 · 5 months ago

It have been changed since I tried to use it, ok, I will try to test it again. Thank you

vbp1 · 5 months ago

Tested
Looks like good anough. The only issue: tool is not available in code mode, only in plan mode (request_user_input is unavailable in code mode), but one can switch to plan mode (Shift+Tab), but....
Oh, another one: the tool does not display questions and user responses in the chat as is after the Q&A session ends. I can fix this by creating a rule (in AGENT.md for example) but...

BTW, there are 5 collaboration modes in the code:

  • Plan
  • Code (default)
  • PairProgramming
  • Execute
  • Custom
am-will · 5 months ago
Tested Looks like good anough. The only issue: tool is not available in code mode, only in plan mode (request_user_input is unavailable in code mode), but one can switch to plan mode (Shift+Tab), but.... Oh, another one: the tool does not display questions and user responses in the chat as is after the Q&A session ends. I can fix this by creating a rule (in AGENT.md for example) but... BTW, there are 5 collaboration modes in the code: Plan Code (default) PairProgramming Execute * Custom

There is only two. You used to be able to use Request_user_input in both modes but now they changed it. make sure you leave feedback so they bring it back please. its important to be able to use it in any mode IMHO! enjoy!

I left feedback about this too. Unfortunate

And yeah there used to be extra modes but they removed them.

am-will · 5 months ago

Yeah that is unfrotunate please consider adding that back. they fixed plan mode quite a bit. hey @vbp1 one thing I want to let you know is that with collaboration_modes = true, it might default you to high reasoning for everything so if your'e on a plus account, be careful.

<img width="1230" height="920" alt="Image" src="https://github.com/user-attachments/assets/1b92a677-48db-44c2-b744-65a58c83a251" />

am-will · 5 months ago

Yeah that is unfrotunate please consider adding that back. they fixed plan mode quite a bit. hey @vbp1 one thing I want to let you know is that with collaboration_modes = true, it might default you to high reasoning for everything so if your'e on a plus account, be careful.

<img width="1230" height="920" alt="Image" src="https://github.com/user-attachments/assets/1b92a677-48db-44c2-b744-65a58c83a251" />

Lemocuber · 2 months ago

I hate how plan mode always drafts a plan that I don't really care to read
Need this lightweight ask feature!

peterparker2005 · 2 months ago

Coming from Claude. Being able to call AskUserQuestion without plan mode is a killer feature.

It enables real back-and-forth (tradeoffs, clarification) before committing to a plan.
Right now Codex feels too rigid since everything is forced into the TUI plan step.

Would be great to keep interactive questioning outside plan mode

tsingyu42 · 2 months ago
Coming from Claude. Being able to call AskUserQuestion _without_ plan mode is a killer feature. It enables real back-and-forth (tradeoffs, clarification) _before_ committing to a plan. Right now Codex feels too rigid since everything is forced into the TUI plan step. Would be great to keep interactive questioning outside plan mode

Agreed.

am-will · 2 months ago

You can already do this with a feature flag.

default_mode_request_user_input = true

> Coming from Claude. Being able to call AskUserQuestion _without_ plan mode is a killer feature. > > It enables real back-and-forth (tradeoffs, clarification) _before_ committing to a plan. Right now Codex feels too rigid since everything is forced into the TUI plan step. > > Would be great to keep interactive questioning outside plan mode Agreed.
apeatling · 2 months ago
You can already do this with a feature flag. default_mode_request_user_input = true

Is there a plan to turn this on by default? It would be massively beneficial for skills that ask questions and provide a greater level of interaction.

am-will · 2 months ago
> You can already do this with a feature flag. > default_mode_request_user_input = true Is there a plan to turn this on by default? It would be massively beneficial for skills that ask questions and provide a greater level of interaction.

i'm not on the team but can answer confidently no it is not.

its extremely easy to add the flag, and there's a sizeable portion of people who do not want the agent stopping to ask a question after they walk away from the machine.

IME it only stops every once in a while when its legit an important question with high impact

so i have no issue leaving it on.

but many do not want that. so this is the best compromise. i wouldn't expect any further changes.

we have the feature we wanted so its a win for everyone.

apeatling · 2 months ago

There are so many assumptions in your reply I lost count. :D

I get where you are coming from, but I have a specific skill where this would be very useful. The skill I need this for is asking up front, and I can't even put codex in plan mode automatically, even being able to control that would be fine.

This is possible in Claude Code and I think it's working fine there. As a feature flag is fine for testing, but basically a non starter for regular people using Codex.

am-will · 2 months ago
There are so many assumptions in your reply I lost count. :D I get where you are coming from, but I have a specific skill where this would be very useful. The skill I need this for is asking up front, and I can't even put codex in plan mode automatically, even being able to control that would be fine. This is possible in Claude Code and I think it's working fine there. As a feature flag is fine for testing, but basically a non starter for regular people using Codex.

I'm not sure what you're going on about fam.

If you want to use the feature, just turn it on. It's really that simple. It takes two seconds to enable it.

This is not a real issue. You're complaining for no reason.

apeatling · 2 months ago

I am distributing a skill for people to use, that would make use of this tool if it was available. I can't ask people to use that flag it's amateurish.

paralin · 2 months ago

One of the most starred repositories on GitHub has a grill-me skill which makes heavy use of this tool. It's not a niche use case - I'm personally ok with it being behind a flag but if I was distributing skills I might also feel it should be enabled on default.

am-will · 2 months ago

It doesn't matter what you and I, or some random person who makes skills feel.

The other half or more of the community doesn't want their agent randomly stopping to ask a question when they aren't at their machine.

When I myself spent weeks on X pushing for this feature to be added, I received significant pushback from a large number of people.

It is common practice to have to have to configure software to the settings you want to use. Some are on by default, some are off by default.

This idea that it's some kind of major friction or "amateurish" to have to enable a feature you want to use is a bit ridiculous.

Just like those that want to use yolo mode permanently have to flag that, this is no different. This is a non issue.

etraut-openai contributor · 2 months ago

@apeatling, I understand your perspective. If we can find a way to enable this capability by default without inconveniencing users who don't want to be interrupted, I think we'd be open to that. We might be able to do this with strong wording in the steering prompt. We've used that technique successfully in other places, like with subagents where we didn't want the primary agent to create subagents unless explicitly allowed to do so by the user. We also used this technique in plan mode to prevent the agent from making code modifications during planning.

apeatling · 2 months ago

@etraut-openai Thanks for the response, I appreciate your perspective on it and I get where you're coming from.

The skill I'm working on essentially allows Codex to talk to a custom external agent with the expectation that questions will be asked up front. It's not used at any other point and the user would expect this to happen if they use the skill. Completely agree you don't want it used at other points and interrupting long running sessions.

I'd be interested in how Claude Code does this because they allow skills to access askUserQuestion and it doesn't seem to trigger the scenario you fear.

tats-u · 2 months ago

At least in Copilot, this tool won't be invoked in any mode other than the Plan Mode unless explicit instructions are provided. Using it excessively would actually hurt GitHub's business due to the premium request system in place until this month.

dydzio0614 · 2 months ago

For some reason this feature does not work for me with "default_mode_request_user_input = true" added to config.toml
In plan mode it works correctly for same agent skill... any idea?