Skip to content

fix: stabilize Windows Codex launch#1351

Open
wanxiaoT wants to merge 1 commit into
BigPizzaV3:mainfrom
wanxiaoT:fix-windows-launch-stability
Open

fix: stabilize Windows Codex launch#1351
wanxiaoT wants to merge 1 commit into
BigPizzaV3:mainfrom
wanxiaoT:fix-windows-launch-stability

Conversation

@wanxiaoT

@wanxiaoT wanxiaoT commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

概述

这个 PR 修复 Windows 上 Codex++ 拉起 CodexDesktop 时的启动/注入稳定性问题,尤其是 packaged app 复用已有 Codex 实例时,新命令行参数可能被忽略导致的 debug/inspector port 不稳定问题。

修改内容

  • Windows packaged Codex 启动时保持 requested debug port 稳定。
  • native menu inspector port 在 Windows 上保持稳定。
  • 继续交给已有 CDP probing 逻辑判断 Codex 是否可连接。
  • renderer 注入侧同时兼容 app-server-manager-signals-*app-server-manager-hooks-* 资源。
  • 通过运行时 registry 尝试发现 app server request client。
  • 对重复失败的诊断日志做限流。
  • 插件自动展开没有可操作 UI 时不再反复记录 no-op 日志。

背景

在 Windows packaged app activation 场景下,如果系统里已经有 CodexDesktop 实例,Windows 可能会复用已有实例,并忽略新传入的命令行参数。

原逻辑在端口占用时会选择随机空闲端口,但已有 Codex 实例不会切换到这个新端口,导致 Codex++ 后续注入/本地化逻辑可能等待一个 Codex 永远不会打开的端口,从而表现为启动后间歇性卡顿或等待。

测试

已验证:

cargo fmt --check
cargo test -p codex-plus-core native_menu_inspector_port
cargo test -p codex-plus-core ports_windows_packaged_debug_keeps_requested_when_requested_is_busy
cargo test -p codex-plus-core renderer_script_falls_back_to_app_server_manager_hooks_asset
git diff --cached --check

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.

1 participant