You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Responses duplicate when Stream assistant messages is on #349
In the local session JSONL, each assistant message is recorded twice in sequence:
event_msg with payload.type: "agent_message"
response_item with payload.type: "message", role: "assistant"
I checked four sessions for the same repo on 2026-03-07 and all show a strict 1:1 duplicate-pair pattern:
session A: 17 duplicate pairs
session B: 21 duplicate pairs
session C: 4 duplicate pairs
session D: 6 duplicate pairs
So this does not look like the model independently generating the same text twice. It looks like the UI/log consumer is rendering both record types when stream assistant messages is enabled.
Environment details from the session metadata:
Codex CLI 0.111.0
observed with session sources exec and vscode
If useful, I can provide a small repro parser against the JSONL format, but the key signal is that each duplicated visible message corresponds to one agent_message record immediately followed by one assistant response_item with identical text.
I noticed the same bug on Windows 11. In the Codex app, the same thread looks fine, but in the t3code the response is duplicated (I have streaming responses enabled).
Activity
jmbenedetto commentedon Mar 7, 2026
Confirmed from raw Codex session logs on macOS.
In the local session JSONL, each assistant message is recorded twice in sequence:
event_msgwithpayload.type: "agent_message"response_itemwithpayload.type: "message",role: "assistant"I checked four sessions for the same repo on 2026-03-07 and all show a strict 1:1 duplicate-pair pattern:
So this does not look like the model independently generating the same text twice. It looks like the UI/log consumer is rendering both record types when stream assistant messages is enabled.
Environment details from the session metadata:
0.111.0execandvscodeIf useful, I can provide a small repro parser against the JSONL format, but the key signal is that each duplicated visible message corresponds to one
agent_messagerecord immediately followed by one assistantresponse_itemwith identical text.ishaanrajiv commentedon Mar 7, 2026
I can reproduce as well, on v0.0.4
From what I can see, here's the root cause:
As a result, the full assistant response gets appended again on completion
Have raised a PR for a fix: #381, but not sure if they are accepting external contributions.
fabmnt commentedon Mar 8, 2026
I noticed the same bug on Windows 11. In the Codex app, the same thread looks fine, but in the t3code the response is duplicated (I have streaming responses enabled).