Skip to content

fix(codex): 用 Claude Code 插件起的 Codex 任务只显示一张卡 (#368) - #369

Merged
wxtsky merged 1 commit into
wxtsky:mainfrom
Junyu06:fix/codex-app-server-client-origin
Oct 11, 2026
Merged

wxtsky merged 1 commit into
wxtsky:mainfrom
Junyu06:fix/codex-app-server-client-origin

Conversation

@Junyu06

@Junyu06 Junyu06 commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #368

改了什么

codexTranscriptOrigin 先看 originator:写着 Desktop 的照旧算桌面版;写着别的客户端(比如 Claude Code)的不再算桌面版,交给起它的那个进程,跟 hook 用同一个 id。插件起的子任务按同样的规则处理,所以还能合并到父对话下面。没有 originator 的、或者来源认不出来的,行为不变。

验证

  • 新增 3 个测试,改之前都失败,改之后通过;全量 swift test 0 失败。
  • 开着 ChatGPT 桌面版,从 Claude Code 起一个 Codex 任务:1.0.35 上是两张卡,这个分支上是一张。

已知影响

插件建的对话如果之后又在桌面版里继续,而 CodeIsland 恰好错过了它的 hook,卡片要等下一次 hook 到了才出来。命令行建的对话现在本来就是这样。

🤖 Generated with Claude Code

…covery (wxtsky#368)

Claude Code's Codex plugin drives its own `codex app-server` and
identifies itself as "Claude Code". Codex records those threads with
source "vscode", the same source as Codex Desktop threads, so
codexTranscriptOrigin called them Desktop rollouts. While the ChatGPT
app was running, the state-DB scan keyed each one as codexapp:<id>,
and the hooks from the plugin's app-server reported the same thread
under its raw id: two cards for one thread.

Treat a vscode/appServer rollout as Desktop only when its originator
names Desktop or is missing. Any other named client's rollout belongs
to the process that wrote it, like a CLI one. Spawned threads keep
their parent's originator under an object source, so the same rule
applies to them; otherwise the plugin's subagents would still be keyed
codexapp: and could not fold under their raw parent. Unknown sources
keep their existing best-effort handling.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@Junyu06 Junyu06 changed the title fix(codex): keep other app-server clients' threads out of Desktop discovery (#368) fix(codex): 用 Claude Code 插件起的 Codex 任务只显示一张卡 (#368) Oct 10, 2026
@wxtsky
wxtsky merged commit 5394c2e into wxtsky:main Oct 11, 2026
@wxtsky

wxtsky commented Oct 11, 2026

Copy link
Copy Markdown
Owner

感谢 @Junyu06!已合入 main(5394c2e),并随 v1.0.37 发布,App 内的自动更新稍后就能收到。

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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

用 Claude Code 的 Codex 插件起的任务,刘海上显示两张卡

2 participants