Skip to content

Reasoning tokens not expanding in Codex UI - "Worked for X" shows time but no trace #45

Description

@Rezhnn

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

  • 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:

  1. A bug in how opencodex formats reasoning tokens in the response
  2. A limitation of the free-tier models not returning the same reasoning structure as OpenAI
  3. Something on Codex's side that doesn't recognize non-OpenAI reasoning token formats
  4. 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!

Activity

  1. lidge-jun commented on Jun 29, 2026

    @lidge-jun
    Owner

    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.rs ReasoningSummaryCell).
    • 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_content is 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.

  2. lidge-jun commented on Jun 29, 2026

    @lidge-jun
    Owner

    @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?

  3. AlinJiang commented on Aug 18, 2026

    @AlinJiang
    Contributor

    Filing a follow-up note since this was closed with a fix that never shipped:

    1. 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.
    2. 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.

  4. ropepop commented on Aug 18, 2026

    @ropepop

    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.

    Separate Remote leak/flicker report: #2064

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions