Repository navigation
Reasoning tokens not expanding in Codex UI - "Worked for X" shows time but no trace #45
Description
Activity
Investigated end-to-end, including the codex-rs consumer side.
Root cause (confirmed): Codex renders the expandable reasoning trace from the Responses
reasoningitem'ssummary[]channel. opencodex maps chat-completionsreasoning_contentto a raw-reasoning item withsummary: []and onlycontent: [{reasoning_text}], so the Codex app shows the "Worked for Xs" timer (driven separately by elapsed time /reasoning_tokens) but has nothing to expand.I traced this through codex-rs
mainto be sure it isn't a client bug:codex-api/src/sse/responses.rsparses bothresponse.reasoning_summary_text.delta(→ summary) andresponse.reasoning_text.delta(→ content).core/src/session/turn.rs+core/src/event_mapping.rscarrycontentintoraw_content(not dropped), but the persisted/expandable block comes from the summary channel (tui/src/history_cell/messages.rsReasoningSummaryCell).- Native OpenAI models populate
summary; routed chat models don't, which is exactly the report.
Fix (planned, opencodex-side only): route chat
reasoning_contentthrough the summary channel so the finalreasoningitem has a non-emptysummary[](treat it like the existingthinking_deltapath). Non-OpenAI chat providers don't send a separate condensed summary, so their fullreasoning_contentis the human-visible thinking and belongs insummary. No codex-rs change needed.Two sub-cases (look identical to the user):
- (A) Provider returns
reasoning_content(DeepSeek-R-style) → opencodex formatting gap, fixed by the above. - (B) Provider returns no reasoning at all (many free models) → nothing to expand; "Worked for Xs" is pure elapsed time. Model limitation, not an opencodex bug.
To confirm which applies to a specific model, a raw upstream chunk showing whether
choices[].delta.reasoning_contentis ever present would help. Fix for (A) is planned.@Rezhnn I couldnt see reasoning summary on app or cli I succeed to parse on exec mode could you hand me a some screenshot and config set?
- added a commit that references this issue
on Jun 29, 2026 - added a commit that references this issue
on Aug 18, 2026 Filing a follow-up note since this was closed with a fix that never shipped:
- The fix commit
3183154509("route chat reasoning_content to expandable summary channel") landed June 29 but its changes are not present in any released version - not 2.24.2, not 2.25.0, not current main. The bridge was rewritten in July-August and the content-channel shaping came back. - Since then the situation changed further: DeepSeek now routes Responses inbound through its native
/responsesendpoint with no translation (registrymodelWireDefaults), so the bridge fix alone would not cover DeepSeek anyway - the rawreasoning_text.deltaevents now come straight from DeepSeek's own Responses API.
I verified all of this live against DeepSeek V4 Flash through the current proxy, then sent a PR that covers both wires:
- fix(responses): route raw reasoning through the expandable summary channel (bridge + passthrough) #2007: routes raw reasoning through the expandable summary channel in the streaming/buffered bridge and adds a payload rewrite for the native-Responses passthrough (converts
reasoning_text.delta/.doneand reasoning itemcontentinto the summary channel, gated onstatelessResponses/preserveReasoningContentModels). - Replay is preserved: DeepSeek's Responses API accepts summary-shaped reasoning input items (verified live, including a tool-call continuation - no 400), and the bridge replay cache handoff is untouched.
Until that (or an equivalent) merges, the workarounds are:
show_raw_agent_reasoning = truein~/.codex/config.tomlmakes the CLI TUI render the raw channel, but Codex Desktop's expandable trace (which only readssummary[]) stays empty.- The fix commit
Adding a second surface for the same stored item, still present on
@bitkyc08/opencodex@2.24.2withxai/grok-4.6(openai-chat).This issue’s Desktop report is: the chip has nothing to expand. On Codex Remote (iOS) the same empty
summary[]+content: [{ type: "reasoning_text" }]item is visible. Private thinking streams first (response.reasoning_text.delta), then the normal progress line replaces it, and an italic tail fragment stays on screen.One live thread: 179 / 179 reasoning items were that empty-summary shape. Official summary text: 0 characters. The leftover italic on the phone was the tail of a stored
reasoning_textblob, not the following progress message. Codex Desktop on the same turn did not show that private text.Separate Remote leak/flicker report: #2064
What happens
When I use opencodex with any proxy model (DeepSeek v4 flash free, Mimo v2.5 free, etc.), the Codex app shows "Worked for Xs" but when I click on it, there's nothing to expand. No reasoning trace, no thinking steps, nothing.
With original OpenAI models (e.g. gpt-5.5), it works normally - For example i see "Worked for 33m 6s" and when I click on it, there's a full expandable section showing all the reasoning/thinking steps.
What I expected
The expandable reasoning trace to appear the same way it does with native OpenAI models, since the README says reasoning tokens are supported.
What I tried
My setup
Question
I'm not super experienced with API response formats, so I'm not sure if this is:
Would love to understand what's going on here. If there's any log or config I can check on my end to help debug, happy to do that. Thanks!