fix(app-paths): support Codex desktop app renamed to ChatGPT.app (26.707+) — fixes startup on macOS (#1389)#1391
Closed
LeoLin990405 wants to merge 1 commit into
Closed
Conversation
…707+) Codex 26.707 ships the same desktop bundle (CFBundleIdentifier is still com.openai.codex) under the name ChatGPT.app, and its CFBundleExecutable is ChatGPT instead of Codex. Two hardcoded assumptions break startup: 1. macos_app_candidates() only looks for Codex.app / OpenAI Codex.app / OpenAI.Codex.app -> the app is never found. 2. build_codex_executable() hardcodes Contents/MacOS/Codex -> even when the bundle is located, the executable path does not exist. Add ChatGPT.app to the candidate list (after the historical names so existing installs still win) and resolve the executable name from the bundle's CFBundleExecutable, reusing the existing plist_string_value helper, falling back to Codex when the plist is unavailable. Reading the name from Info.plist makes a future rename non-breaking. Verified live on macOS with Codex 26.707.30751 (/Applications/ChatGPT.app): resolution now yields .../Contents/MacOS/ChatGPT, which exists. Refs BigPizzaV3#1389
This was referenced Jul 10, 2026
Closed
Contributor
Author
|
关闭:与 #1390 重复,而且 #1390 更好 —— 它比本 PR 早 5 小时,并且:
抱歉造成重复 —— 我提 PR 前查了 issue 但没查开放 PR。 我已经在 #1390 上做了独立第二机验证(macOS + Codex 26.707.31428:解析出 请合 #1390。 |
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.
根因 / Root cause
Codex 26.707 把桌面端 bundle 改名成
ChatGPT.app——但它还是同一个 app:ChatGPT.app内仍含Codex Framework.framework、Resources/codex,以及 Codex++ 注入所依赖的/webview/assets/*.js(含app-initial~app-main~*)。mdfind kMDItemCFBundleIdentifier == 'com.openai.codex'全机只命中它。Codex 26.707 renamed the desktop bundle to
ChatGPT.app. It is the same app —CFBundleIdentifieris stillcom.openai.codex— butCFBundleExecutablechanged fromCodextoChatGPT, and/Applications/Codex.appno longer exists.两处硬编码因此失效 / Two hardcoded assumptions break startup:
app_paths.rs::macos_app_candidates()只找Codex.app/OpenAI Codex.app/OpenAI.Codex.app→ 找不到 app。app_paths.rs::build_codex_executable()硬编码Contents/MacOS/Codex→ 即使找到 bundle,可执行路径也不存在。这解释了 #1389(「新版无法通过 codex++ 启动」)。
改动 / Change
macos_app_candidates:候选名单加入ChatGPT.app,放在历史名字之后,保证已有Codex.app安装仍优先命中。build_codex_executable:对.app从 bundle 的CFBundleExecutable解析可执行名(复用仓库里已有的plist_string_value助手,macos_app_version也在用),读不到时回退Codex。→ 以后再改名也不会断。Only
app_paths.rs+ its tests. No behavior change for existingCodex.appinstalls.验证 / Verified
Live(本机 macOS,Codex 26.707.30751):
测试: 新增 3 个单测,
cargo test -p codex-plus-core全绿、无回归。Windows 说明 / Note on Windows
#1389 的报告人在 Windows。Windows 侧走的是
CODEX_PACKAGE_IDENTITIES = ["OpenAI.Codex", "OpenAI.CodexBeta"]匹配WindowsApps包名——改名后很可能同样匹配不上,需要补上新的 package identity。我没有 Windows 机器无法确证包名,故本 PR 只修 macOS(已 live 验证);若维护者能提供改名后的 Windows 包名,我可以在本 PR 补上。This PR fixes the macOS path only (live-verified). Windows likely needs the new package identity added to
CODEX_PACKAGE_IDENTITIES; I have no Windows machine to confirm the new name — happy to add it here if someone can provide it.Refs #1389