Repository navigation
fix(codex): ChatGPT 桌面版的 Codex 对话只显示一张卡 (#370) - #371
Merged
Merged
Conversation
ChatGPT starts Codex Desktop's app-server from ChatGPT.app/Contents/Resources/codex-cli/CodexCLI.app without __CFBundleIdentifier in its environment. The bridge learned the host only from that variable, so Desktop hooks reached HookEvent without _term_bundle and stayed under the raw thread id, while the state-DB scan keyed the same thread as codexapp:<id>: two cards for one thread. When neither the payload nor the environment names a bundle, check the nearest Codex process in the hook's ancestry: if it runs the app-server subcommand (after nothing but -c overrides, as Desktop starts it) and its direct parent belongs to the com.openai.codex app, stamp that bundle. The binary alone cannot decide this. Codex CLI started through ChatGPT's codex-cli/bin/codex launcher and the app-server Claude Code's Codex plugin starts run the same binary, and exec codex in ChatGPT's own terminal also leaves ChatGPT as the parent. Everything else keeps its current keying. With Desktop hooks on their codexapp: card, the same-PID parent fallback for native subagents must skip them: every Desktop thread shares the one app-server, so under Merge a thread's own hook could take its card (which a child hook left that PID on) for its parent and fold into itself. Desktop children already find their parent from rollout metadata. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Owner
vxiaofengs
pushed a commit
to vxiaofengs/CodeIsland
that referenced
this pull request
Oct 12, 2026
Five upstream commits across v1.0.37 and v1.0.38, all Codex: finding the binary newer ChatGPT builds bundle, keying Desktop app-server hooks without a bundle id (wxtsky#371), and keeping other app-server clients' threads out of Desktop discovery (wxtsky#369). No conflicts; none of it touches the panel, approval or jump code this branch carries. Co-Authored-By: Claude Opus 5.5 <[email protected]>
RooobinYe
added a commit
to RooobinYe/CodeIsland
that referenced
this pull request
Oct 14, 2026
* fix(codex): keep other app-server clients' threads out of Desktop discovery (wxtsky#369) Fixes wxtsky#368 (cherry picked from commit 5394c2e) * fix(codex): key Desktop app-server hooks as Desktop without a bundle id (wxtsky#371) Fixes wxtsky#370 (cherry picked from commit cd39ddd) * fix(codex): find the Codex binary newer ChatGPT builds bundle ChatGPT moved Codex from Contents/Resources/codex to Contents/Resources/codex-cli/CodexCLI.app/Contents/MacOS/codex. The process scan never found Desktop's app-server there, so Desktop threads were never read from state_5.sqlite, and the app-server client could not start at all. The same binary also runs Codex CLI, ChatGPT's cloud exec-server and CodeIsland's own app-server client, so the process is classified by argv and parent: the app-server ChatGPT starts is the Desktop host, helpers and our own child are skipped, anything else is a CLI session process. Co-Authored-By: Claude Opus 5.5 <[email protected]> (cherry picked from commit 9905070) --------- Co-authored-by: Terry Li <[email protected]> Co-authored-by: wxtsky <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #370
改了什么
app-server,而且它的父进程是com.openai.codex,就补上_term_bundle = com.openai.codex,hook 事件于是落到桌面版那张卡上。判断写成纯函数CLIProcessResolver.codexDesktopTermBundle(ancestry:)。codexNativeSubsessionParentId对桌面版的 hook 不再按进程号找父对话。不然在合并模式下,父对话自己的 hook 会被当成它的子任务吞掉。验证
swift test0 失败。已知影响
合并模式下,子任务的 hook 如果比它的对话记录先到,就不再按进程号并到父对话下面,会先单独显示一张卡,等扫描到了再合并。这期间如果它有待审批的请求,现有的移除逻辑会把请求拒掉。以前带 bundle id 的桌面版 hook 本来就是这样。
🤖 Generated with Claude Code