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
Reasoning tokens not expanding in Codex UI - "Worked for X" shows time but no trace #45
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
Different proxy models (DeepSeek v4 flash free, Mimo v2.5 free) - same result on both
The timing itself works fine ("Worked for 23s" etc), so the connection is working
Native OpenAI models through the same Codex app work correctly
My setup
Codex desktop app (latest version)
Proxy: opencode zen API key through opencodex's hosted proxy
Models tested: DeepSeek v4 flash free, Mimo v2.5 free
Question
I'm not super experienced with API response formats, so I'm not sure if this is:
A bug in how opencodex formats reasoning tokens in the response
A limitation of the free-tier models not returning the same reasoning structure as OpenAI
Something on Codex's side that doesn't recognize non-OpenAI reasoning token formats
Or something else I'm not thinking of
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!
Investigated end-to-end, including the codex-rs consumer side.
Root cause (confirmed): Codex renders the expandable reasoning trace from the Responses reasoning item's summary[] channel. opencodex maps chat-completions reasoning_content to a raw-reasoning item with summary: [] and only content: [{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 main to be sure it isn't a client bug:
codex-api/src/sse/responses.rs parses both response.reasoning_summary_text.delta (→ summary) and response.reasoning_text.delta (→ content).
core/src/session/turn.rs + core/src/event_mapping.rs carry content into raw_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_content through the summary channel so the final reasoning item has a non-empty summary[] (treat it like the existing thinking_delta path). Non-OpenAI chat providers don't send a separate condensed summary, so their full reasoning_contentis the human-visible thinking and belongs in summary. 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_content is ever present would help. Fix for (A) is planned.
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 /responses endpoint with no translation (registry modelWireDefaults), so the bridge fix alone would not cover DeepSeek anyway - the raw reasoning_text.delta events 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/.done and reasoning item content into the summary channel, gated on statelessResponses / 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 = true in ~/.codex/config.toml makes the CLI TUI render the raw channel, but Codex Desktop's expandable trace (which only reads summary[]) stays empty.
Adding a second surface for the same stored item, still present on @bitkyc08/opencodex@2.24.2 with xai/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_text blob, not the following progress message. Codex Desktop on the same turn did not show that private text.
Activity
lidge-jun commentedon Jun 29, 2026
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).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):
reasoning_content(DeepSeek-R-style) → opencodex formatting gap, fixed by the above.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.lidge-jun commentedon Jun 29, 2026
@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?
fix(bridge): route chat reasoning_content to expandable summary channel
fix(responses): route raw reasoning through the expandable summary ch…
AlinJiang commentedon Aug 18, 2026
Filing a follow-up note since this was closed with a fix that never shipped:
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./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:
reasoning_text.delta/.doneand reasoning itemcontentinto the summary channel, gated onstatelessResponses/preserveReasoningContentModels).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.fix(responses): route raw reasoning through the expandable summary ch…
fix(responses): route raw reasoning through the expandable summary ch…
ropepop commentedon Aug 18, 2026
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
fix(bridge): route chat reasoning_content to expandable summary channel
fix(responses): route raw reasoning through the expandable summary ch…