Reproduced in the web dev app on b5a226e49c, Linux, Codex GPT-6-Astra. Queued a follow-up during an initial pause, left the subsequent async question unanswered until both turns finished, then answered. The next turn received and acknowledged the answer, but the timeline showed it only on the original question card, with no user message between the intervening reply and the acknowledgement. On this build the question takes over the composer, so the follow-up was queued before the question appeared.
[Bug]: Answering an async question after a queued message runs hides the answer from the timeline#15873
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area
apps/web
Steps to reproduce
- Start a turn where the agent asks an async question, such as a Codex
ask_user-style question whoseresponseCapabilityis{ type: "message" }. The run keeps working after it asks. - While that run (run N) is still going, queue a follow-up message. It becomes run N+1.
- Let run N finish. The queued run N+1 starts and completes.
- Now answer the question from step 1. The server dispatches the answer as a user message
async-answer:<requestId>, which starts run N+2.
Expected behavior
The answer shows up in the timeline where the conversation continues, right before run N+2's reply, the same way any message you send does.
Actual behavior
The answer never appears at the bottom of the thread. Run N+2's reply follows run N+1 with no user message in between, so it looks like the input was lost. The answer only shows up on run N's question card, which is above the queued message and usually scrolled out of view.
In the screenshot, I answered "For Pi doesnt pi just work with a chatgpt subscription now" after the queued message ran. Nothing appears between "Tell me once it's saved…" and "I'll check Pi's current ChatGPT login support…", which is the reply to that answer.
Nothing is lost on the server. The message is persisted and the agent receives it. This is only a timeline rendering problem.
Cause
apps/web/src/session-logic.ts (around line 591) builds foldedAnswerMessageIds from every user_input_request that has a questionAnswer, then drops the matching async-answer:* user messages from the timeline. The fold assumes the answer arrives while the asking run is still active, so the card and the agent's response sit next to each other. A late answer starts a new run, but it's still drawn on the old run's card. Anything that runs in between, such as a queued message, pushes the answer out of order and out of view.
Projection data from the affected thread:
| Ordinal | Run | Item |
|---|---|---|
| 8000070 | 8 | user_input_request, with questionAnswer.answers containing the user's reply |
| 9000001 | 9 | queued user message |
| 10000001 | 10 | user_message async-answer:…, hidden by the fold |
Suggested fix
Only fold an async-answer:* message into its question card when the message is in the same run as the question. When it's in a later run, render it as a normal user message at its own position. The incremental path's check around session-logic.ts:893 needs to match.
Impact
Major degradation or frequent failure
Version or commit
main @ de09c7566c
Environment
macOS, T3 Code desktop, Codex (gpt-6.1-sol)