[Bug]: Async question replies display the agent’s question as user-authored text #10786
Before submitting#
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area#
apps/server
Steps to reproduce#
- In a Codex thread, have the agent ask a question using
request_user_input_async. - Enter a custom answer in the question panel and submit it.
- Read the resulting user message in the transcript.
A minimal example is a question of Which package manager? and an answer of pnpm. This concerns the async question tool, not the older blocking question flow.
Expected behavior#
The transcript distinguishes the agent's question from the user's answer. Keeping the question as context is reasonable, but it should not appear to be text the user authored.
Actual behavior#
The question and answer appear together in one user bubble, with no attribution or formatting that distinguishes them:
Which package manager?
pnpm
In the observed conversation, the agent asked about CPU power limits, fan/cooler settings, or RAM speed. The user entered only a reply about CPU cooler tuning presets. The resulting user bubble included the entire agent question before that reply.
A read-only inspection of that conversation's stored records confirmed:
- The
user-input.resolvedactivity contains only the user's reply inanswers. - The generated
async-answer:...user message contains the full question followed by that reply.
This is not only a renderer issue. The server constructs and persists the combined text, and the normal turn path sends that text to the provider.
Impact#
Cosmetic issue
The transcript misattributes the question to the user. No failed delivery, duplicate submission, or change in the agent's reasoning was demonstrated.
Version or commit#
Source verified at 061543e9e5b54ec0048725c37d52fef2962df173, which matched upstream main when checked. The exact installed version behind the original observation was not recorded.
Environment#
Observed in the T3 chat UI with Codex async questions. The source path is shared by web, desktop, and mobile clients. Exact browser/desktop and Codex versions were not recorded; this was not independently reproduced on each client.
Supporting evidence#
- The decider joins each question and answer and stores the result as a user message in the same command sequence.
- The provider turn path uses the stored message text.
- The existing engine test expects question-plus-answer text.
- Async question support was introduced in #9512.
The focused engine test was attempted but failed during imports with Schema.TaggedError is not a function, before any test ran. Installed Effect was 4.0.0-beta.103, while this checkout requires 4.0.0-rc.112. The evidence above is from the observed transcript, persisted records, and source inspection, not a successful new test run.
Workaround#
No verified workaround. The report asks for clear attribution of question context, without requiring removal of that context from the provider message or a particular UI design.
juliusmarminge added labelsvia-triage
juliusmarminge added labelsbug
juliusmarminge closed this
Sign in to join this conversation.
Triage#
Confirmed. This is a real cosmetic bug in the async question reply path, not a renderer-only glitch.
When
thread.user-input.respondhandles aresponseMode: "message"request (Codexrequest_user_input_async), the decider keeps only the user's reply onuser-input.resolved, then builds a normal user message by joining each question and answer:That string is persisted as
role: "user"with idasync-answer:${requestId}and sent to the provider asmessage.text. The existing engine test expects this shape (Which package manager?\npnpm\n\n…). The chat timeline then renders that text as a user bubble with no special case, so the agent's question looks user-authored.This is the message-mode path added in #9512. The older blocking question flow does not create this combined user message.
Related (not duplicates)#
No open PR rewrites the
question\nanswerconstruction.Suggested fix#
Keep the question as provider context if needed, but attribute it. Smallest change is to label the join in
apps/server/src/orchestration/decider.tsand updateOrchestrationEngine.test.ts. Optionally, renderasync-answer:*messages as a Q&A row from the requested activity +answersinstead of a raw user bubble.Cosmetic only: no failed delivery or agent-reasoning issue was shown. Enough detail to implement; no further reporter input needed.