Skip to content

Codex **async** choice questions show as plain text instead of a question card #4990

Closed

Description

@sgfost

Summary

Outside of plan mode codex seems to choose request_user_input_async for questions. It calls this successfully, but will only display plain text

Image

Versions and environment

  • bb 0.45.0 desktop
  • macOS 26.6.2
  • Codex 0.160.1
  • “Ask User Question” plugin disabled

Steps to reproduce

  1. bb thread spawn --project proj_personal --provider codex --prompt 'Use request_user_input_async to ask me to choose between a, b, and c'

Expected vs actual

See above screenshot for actual result, choice popup is expected

Evidence

No response

What you ruled out

The fix for #4678 (#4044 ) handles synchronous questions, codex seems to only use the async tool outside of plan mode, unclear whether this is a recent change. Async support was proposed in #3917 but didn't get merged

Suggested priority and effort (optional)

~Medium priority, questions can get lost. Probably low effort

Checks

  • I reproduced this on the latest release or on main, or I say above that I could not.
  • I searched open and closed issues for the same problem.
  • If an agent wrote this, the body ends with > AGENT GENERATED and links the thread or report.

Activity

  1. added theissue type on Oct 6, 2026
  2. added
    providers
    provider-codex
    partial-repro
    on Oct 6, 2026
  3. bb-slop-cop commented on Oct 6, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

    • Classification: Bug · Priority: Medium · Effort: Medium; providers, provider-codex.
    • Reproduction and root-cause report: PARTIALLY REPRODUCED, confidence medium; reproduction label: partial-repro.
    • Root cause: the provider adapter rebuilds async assistant messages as text-only deltas, discarding synthesized choice metadata rather than creating a durable question interaction.
    • Evidence: the choice-retention regression fails identically in two clean trusted-main checkouts; 87 existing provider tests pass. The actual Codex 0.160.1 payload and macOS UI remain unverified; Chrome was unavailable for visual capture.
    • No PR: safe async answering requires shared provider/runtime/server interaction and lifecycle changes, outside the simple-fix gate.

    AGENT GENERATED

  4. ariofrio commented on Oct 6, 2026

    @ariofrio
    Contributor

    I confirmed the root cause against the Codex 0.160.1 source and a real persisted bb 0.45.0 session (model gpt-6.1-sol, Default mode).

    Codex sends the question as structured data, but not as a request. request_user_input_async emits one agentMessage item and always returns {"accepted":true} to the model (handler L126–L145). The item's text is the question title followed by - option lines, and it also carries delivery: "async" and questions: [{title, options?}] (v2 ThreadItem::AgentMessage L257–L262). These fields aren't behind the experimental API gate. Codex's own TUI reads item.questions on live items (streaming.rs L416–L417) and sends the answer back as an ordinary user message, submitted or queued (questions.rs L1–L2, L123–L149). Nothing is sent over the item/tool/requestUserInput RPC, so #4044 can't catch it.

    Clients can't turn it off. Codex registers the tool for root sessions whenever the model catalog's experimental_supported_tools includes request_user_input_async (or the old name send_user_message_async) (spec_plan.rs L1178–L1203; unchanged on main as of 0.162.0-alpha.17). No feature flag or [tools] key controls it. tools.experimental_request_user_input.enabled and features.default_mode_request_user_input only affect the synchronous tool, which is Plan-only by default. The only lever is replacing the whole catalog with model_catalog_json, which is impractical. So in Default mode, the async tool is the only native question tool the model sees.

    What bb does with it. The Codex adapter types agentMessage as {type, id, text} (schemas.ts L370–L376) and rebuilds it as {type: "agentMessage", text} (delta-translation.ts L779), so delivery and questions are dropped before persistence. The vendored ThreadItem.ts predates questions. The persisted event has only the flattened text:

    {"type":"item/completed","data":{"item":{"type":"agentMessage","id":"…","text":"<question title>\n- <option 1>\n- <option 2>"}}}

    This isn't a renderer bug: the client never receives question metadata. It also isn't a failed tool call, since accepted is unconditional.

    Fix direction. Keep delivery/questions on Codex agentMessage items. Show them in the existing question card without blocking the turn, and send the answer as a new user message, steering an active turn or starting a new one. That's the async half of closed draft #3917, and it matches the Codex TUI's contract. Until then, Codex threads only get a native card if the model picks AskUserQuestion (Ask User Question plugin enabled) over request_user_input_async.

    AGENT GENERATED

  5. added a commit that references this issue on Oct 9, 2026
    c3b4993
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    partial-reproprovider-codexproviders

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions