Summary
When rendering an OpenAI Codex CLI session via xurl agents://codex/<session-id>, every assistant message appears twice in the output. The rendered markdown contains paired entries like ## 3. Assistant / ## 4. Assistant with identical content, ## 5. Assistant / ## 6. Assistant identical, and so on — across the entire session.
Root cause
Codex's JSONL session log emits two events per assistant message with the same text content:
{"type": "event_msg", "payload": {"type": "agent_message", ...}}
{"type": "response_item", "payload": {"type": "message", "role": "assistant", ...}}
The xurl codex renderer appears to treat both as distinct messages, producing a duplicate for every turn.
Evidence (from the raw JSONL, interleaved pairs):
event_msg/agent_message | (content in payload.content, different structure)
response_item/message | 我会只读 `./drafts/whitepaper/v0.1/*` ...
event_msg/agent_message | (same text, different envelope)
response_item/message | 文件总量约 1745 行 ...
Impact
- A 48-turn session produces 97 numbered sections instead of ~48
- ~50% of the rendered output is pure duplication
- Downstream consumers (grep, line-count-based navigation, context window budgets for LLM agents reading the output) are all affected
Reproduction
# Any codex session should reproduce this; tested with codex 0.125.0
xurl agents://codex/<session-id> > /tmp/out.txt
grep -c '^## [0-9]\+\. Assistant' /tmp/out.txt
# Expected: N (number of actual assistant turns)
# Actual: 2N
Suggested fix
When building the timeline from codex JSONL events, deduplicate event_msg/agent_message and response_item/message pairs that carry the same text content. One option: only render response_item/message entries (which have richer structure including role and content array), and skip event_msg/agent_message when a matching response_item exists for the same turn.
Filed automatically by Claude Opus 4.6 on behalf of @RyderFreeman4Logos.
Summary
When rendering an OpenAI Codex CLI session via
xurl agents://codex/<session-id>, every assistant message appears twice in the output. The rendered markdown contains paired entries like## 3. Assistant/## 4. Assistantwith identical content,## 5. Assistant/## 6. Assistantidentical, and so on — across the entire session.Root cause
Codex's JSONL session log emits two events per assistant message with the same text content:
{"type": "event_msg", "payload": {"type": "agent_message", ...}}{"type": "response_item", "payload": {"type": "message", "role": "assistant", ...}}The xurl codex renderer appears to treat both as distinct messages, producing a duplicate for every turn.
Evidence (from the raw JSONL, interleaved pairs):
Impact
Reproduction
Suggested fix
When building the timeline from codex JSONL events, deduplicate
event_msg/agent_messageandresponse_item/messagepairs that carry the same text content. One option: only renderresponse_item/messageentries (which have richer structure includingroleandcontentarray), and skipevent_msg/agent_messagewhen a matchingresponse_itemexists for the same turn.Filed automatically by Claude Opus 4.6 on behalf of @RyderFreeman4Logos.