codex cli 不显示思维链
- 内容介绍
- 文章标签
- 相关推荐
codex cli 不显示思维链
RT, codex-cli 0.118.0, wsl, codex free, sub2api v0.1.105
我发现 无论是通过 sub2api 还是我自己写的反代,在实际运行过程中都无法像往常一样显示思维链等相关信息
当前行为
预期行为
image1720×879 278 KB
分析
我去分析了一下 codex cli 的源码,发现 是上游返回的事件乱序导致的
我在本地给客户端打了个 patch,也已经成功复现并修复了这个问题
疑问
刚准备提 pr, 但是想起来一个很严肃的问题
这到底是 codex cli 的问题,还是我的反代导致的
所以发帖请教一下各位大佬 有没有遇到过类似不显示思维链的情况
我想看看一下大家的反馈 再决定是否有必要向上游提交这个 PR (避免只是因为我的反代导致的)
网友解答:--【壹】--:
为啥codex要改成gui,改成gui,鼠标滚动都查看不了之前的。。。
--【贰】--:
嗯,我记得之前使用codex会有一大串英文内容,应该就是这个。现在的codex都不显示,可能就是更新bug了。
那也许可以直接找旧commit?
--【叁】--:
修复了,
--【肆】--:
本文指的是 reasoning summary, 没说清楚 不好意思~
--【伍】--: Catluo:
成功复现冰修复了这个问题
有错字哦
--【陆】--:
你不说,我还一直傻傻等待 working 呢
--【柒】--:
是的; 我已经修好了, 不过提不了pr, 打算先发issue
bug(cli): reasoning summaries may be omitted and some responses stream events can crash the CLI
已打开 05:59PM - 04 Apr 26 UTC steveday763### What version of Codex is running? codex-cli 0.118.0 ### Which model were y…ou using? gpt-5.4 ### What platform is your computer? Linux x86_64 ### What issue are you seeing? I started investigating a TUI rendering issue where reasoning summaries are present in the session JSONL but not shown in the live TUI. While validating a minimal local fix for that, I also ran into crashes in the same Responses stream handling path, for example: - `ReasoningSummaryPartAdded without active item` - `OutputTextDelta without active item` So there appear to be two closely related problems here: 1. completed `reasoning` items can contain summary text that is recorded but not rendered live 2. the stream state machine is brittle when reasoning/output-text events arrive before the corresponding active item is established ### What steps can reproduce the bug? 1. Run Codex CLI on the Responses API path. 2. Enable reasoning summaries in config, for example: ```toml model_reasoning_effort = "xhigh" model_reasoning_summary = "auto" use_experimental_reasoning_summary = true hide_agent_reasoning = false show_raw_agent_reasoning = false model_supports_reasoning_summaries = true ``` 3. Start a session that returns reasoning summary data. 4. Observe that the reasoning summary may be recorded in the session log but not shown in the live TUI. 5. While validating that path, some streams can also trigger crashes because reasoning/output-text events arrive before the corresponding active item is active. ### What is the expected behavior? - If a completed `reasoning` item contains summary text, the live TUI should render it. - The client should handle these event-ordering edge cases without crashing. ### Additional information I found a session entry like this in the JSONL log: ```json { "timestamp": "2026-04-04T14:53:06.784Z", "type": "response_item", "payload": { "type": "reasoning", "summary": [ { "type": "summary_text", "text": "..." } ] } } ``` This suggests the reasoning summary is present in the stream/session log, but the live TUI still does not render it. The crashes I hit while validating this path were: - `ReasoningSummaryPartAdded without active item` - `OutputTextDelta without active item` I put together a small branch in my fork with two commits covering both aspects: - branch: `steveday763/fix/reasoning-and-output-delta-ordering` - commits: - `7a1a825` `fix(tui): render live reasoning summaries from completed items` - `9795819` `fix(core): tolerate orphan reasoning and output text events`
--【捌】--:
我也有这种问题
Windows Powershell + codex CLI 0.117, codex team
用team或者sub2api的中转都会如此
--【玖】--:
额 不是 codex cli + codex app 一个是tui 一个是gui吗
--【拾】--:
1000252749.jpg1199×896 128 KB
直接 codex auth 登录也无法显示思考过程呢
--【拾壹】--:
学习一下
codex cli 不显示思维链
RT, codex-cli 0.118.0, wsl, codex free, sub2api v0.1.105
我发现 无论是通过 sub2api 还是我自己写的反代,在实际运行过程中都无法像往常一样显示思维链等相关信息
当前行为
预期行为
image1720×879 278 KB
分析
我去分析了一下 codex cli 的源码,发现 是上游返回的事件乱序导致的
我在本地给客户端打了个 patch,也已经成功复现并修复了这个问题
疑问
刚准备提 pr, 但是想起来一个很严肃的问题
这到底是 codex cli 的问题,还是我的反代导致的
所以发帖请教一下各位大佬 有没有遇到过类似不显示思维链的情况
我想看看一下大家的反馈 再决定是否有必要向上游提交这个 PR (避免只是因为我的反代导致的)
网友解答:--【壹】--:
为啥codex要改成gui,改成gui,鼠标滚动都查看不了之前的。。。
--【贰】--:
嗯,我记得之前使用codex会有一大串英文内容,应该就是这个。现在的codex都不显示,可能就是更新bug了。
那也许可以直接找旧commit?
--【叁】--:
修复了,
--【肆】--:
本文指的是 reasoning summary, 没说清楚 不好意思~
--【伍】--: Catluo:
成功复现冰修复了这个问题
有错字哦
--【陆】--:
你不说,我还一直傻傻等待 working 呢
--【柒】--:
是的; 我已经修好了, 不过提不了pr, 打算先发issue
bug(cli): reasoning summaries may be omitted and some responses stream events can crash the CLI
已打开 05:59PM - 04 Apr 26 UTC steveday763### What version of Codex is running? codex-cli 0.118.0 ### Which model were y…ou using? gpt-5.4 ### What platform is your computer? Linux x86_64 ### What issue are you seeing? I started investigating a TUI rendering issue where reasoning summaries are present in the session JSONL but not shown in the live TUI. While validating a minimal local fix for that, I also ran into crashes in the same Responses stream handling path, for example: - `ReasoningSummaryPartAdded without active item` - `OutputTextDelta without active item` So there appear to be two closely related problems here: 1. completed `reasoning` items can contain summary text that is recorded but not rendered live 2. the stream state machine is brittle when reasoning/output-text events arrive before the corresponding active item is established ### What steps can reproduce the bug? 1. Run Codex CLI on the Responses API path. 2. Enable reasoning summaries in config, for example: ```toml model_reasoning_effort = "xhigh" model_reasoning_summary = "auto" use_experimental_reasoning_summary = true hide_agent_reasoning = false show_raw_agent_reasoning = false model_supports_reasoning_summaries = true ``` 3. Start a session that returns reasoning summary data. 4. Observe that the reasoning summary may be recorded in the session log but not shown in the live TUI. 5. While validating that path, some streams can also trigger crashes because reasoning/output-text events arrive before the corresponding active item is active. ### What is the expected behavior? - If a completed `reasoning` item contains summary text, the live TUI should render it. - The client should handle these event-ordering edge cases without crashing. ### Additional information I found a session entry like this in the JSONL log: ```json { "timestamp": "2026-04-04T14:53:06.784Z", "type": "response_item", "payload": { "type": "reasoning", "summary": [ { "type": "summary_text", "text": "..." } ] } } ``` This suggests the reasoning summary is present in the stream/session log, but the live TUI still does not render it. The crashes I hit while validating this path were: - `ReasoningSummaryPartAdded without active item` - `OutputTextDelta without active item` I put together a small branch in my fork with two commits covering both aspects: - branch: `steveday763/fix/reasoning-and-output-delta-ordering` - commits: - `7a1a825` `fix(tui): render live reasoning summaries from completed items` - `9795819` `fix(core): tolerate orphan reasoning and output text events`
--【捌】--:
我也有这种问题
Windows Powershell + codex CLI 0.117, codex team
用team或者sub2api的中转都会如此
--【玖】--:
额 不是 codex cli + codex app 一个是tui 一个是gui吗
--【拾】--:
1000252749.jpg1199×896 128 KB
直接 codex auth 登录也无法显示思考过程呢
--【拾壹】--:
学习一下

