Conversation
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.
问题
在 Windows 上,通过 Microsoft Store 安装 Codex Desktop 后,点击微信连接设置中的「使用桌面版内置 CLI」,可能填入以下路径:
这个文件虽然存在,但管理器进程可能没有执行权限。随后收到微信消息时,启动 Codex app-server 失败,提示「拒绝访问。(os error 5)」。即使用户目录中已经有可正常运行的 Codex CLI,再次点击按钮也会选回不可执行的包内路径。
根因是
find_desktop_codex_cli原先只查找桌面应用包内的 CLI 文件,没有验证其能否启动,也没有查找用户目录中的 standalone CLI。修改后的行为
点击「使用桌面版内置 CLI」时:
--version;只有进程成功退出才接受该路径。%LOCALAPPDATA%\OpenAI\Codex\bin及其一级版本子目录中的 CLI,取文件修改时间最新的候选,并验证其能否启动。启动验证设置 5 秒超时,超时后终止并回收探测进程;Windows 上隐藏探测进程的控制台窗口。新增测试覆盖版本子目录、bin 根目录和没有 CLI 文件的情况。
验证