Skip to content
Source
Sign inSign up
pingdotgg/t3code

Responses duplicate when Stream assistant messages is on #349

ClosedvertopolkaLF(GitHub profile, opens in a new tab) opened this issue 3 comments
  1. Confirmed from raw Codex session logs on macOS.

    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.

  2. I can reproduce as well, on v0.0.4

    From what I can see, here's the root cause:

    • live assistant_text deltas are emitted and rendered incrementally during streaming
    • later, item.completed may arrive with payload.detail containing the full assistant message text
    • the completion path treats that detail as fallback content even when text was already emitted from streaming

    As a result, the full assistant response gets appended again on completion

    Have raised a PR for a fix: https://github.com/pingdotgg/t3code/pull/381, but not sure if they are accepting external contributions.

  3. fabmnt(GitHub profile, opens in a new tab)commented

    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).

  4. maria-rcks closed this

Sign in to join this conversation.