问题描述
在 Codex standby 模式下,helloagents doctor codex 初始检查正常;但重启 Codex App 后,~/.codex/config.toml 里的 notify 会被 Codex App / Computer Use 改写为链式通知形式,随后 helloagents doctor codex 会报告 drift:
issue[standby-notify-drift]: standby notify 未使用受管命令入口
fix: helloagents update codex --standby
但实际配置里 HelloAGENTS 的 codex-notify 并没有丢失,只是被放进了 SkyComputerUseClient 的 --previous-notify 参数里。
环境
- HelloAGENTS:
3.0.37
- Codex:
0.132.0
- 安装模式:
standby
- 命令:
helloagents install codex --standby
- 平台: macOS / Codex App
复现步骤
- 执行:
结果正常:
Codex CLI:
status: ok
detected_mode: standby
tracked_mode: standby
notifyPathMatch: ok
globalNotifyPathMatch: ok
issues=0
-
重启 Codex App。
-
再次执行:
结果变为 drift:
Codex CLI:
status: drift
notifyPathMatch: missing
globalNotifyPathMatch: missing
issue[standby-notify-drift]: standby notify 未使用受管命令入口
fix: helloagents update codex --standby
实际配置
重启 Codex App 后,~/.codex/config.toml 中的 notify 被改为类似:
notify = [
"/Users/xxx/.codex/computer-use/Codex Computer Use.app/Contents/SharedSupport/SkyComputerUseClient.app/Contents/MacOS/SkyComputerUseClient",
"turn-ended",
"--previous-notify",
"[\"helloagents-js\",\"codex-notify\"]"
]
这里 helloagents-js codex-notify 仍然存在,只是作为 --previous-notify 的 JSON 字符串参数传给了 SkyComputerUseClient。
预期行为
helloagents doctor codex 应该识别这种链式 notify 配置,并认为它仍然有效:
codexNotify: ok
notifyPathMatch: ok
globalNotifyPathMatch: ok
- 不应报告
standby-notify-drift
实际行为
当前 doctor 只识别直接形式:
notify = ["helloagents-js", "codex-notify"]
但不识别被 Computer Use 包装后的形式:
notify = [".../SkyComputerUseClient", "turn-ended", "--previous-notify", "[\"helloagents-js\",\"codex-notify\"]"]
因此重启 Codex App 后会误报 drift。
疑似原因
源码中 notifyPathMatch / globalNotifyPathMatch 似乎是通过文本包含判断实现的:
codexConfig.includes(CODEX_MANAGED_NOTIFY_VALUE)
而 CODEX_MANAGED_NOTIFY_VALUE 是直接形式:
["helloagents-js", "codex-notify"]
被 --previous-notify 包装后,配置文本中实际出现的是转义后的 JSON 字符串:
"[\"helloagents-js\",\"codex-notify\"]"
所以文本匹配失败。
建议修复
建议 doctor 对 notify 做结构化解析,而不是只做原始文本包含判断:
- 解析
notify 数组;
- 如果直接等于
["helloagents-js", "codex-notify"],视为有效;
- 如果包含
--previous-notify,解析其后一个参数为 JSON;
- 若解析结果等于
["helloagents-js", "codex-notify"],也视为有效;
- 对这种情况可额外输出 note,例如:
HelloAGENTS notify is chained through Codex Computer Use,但不应标记为 drift。
这样可以兼容 Codex App / Computer Use 对 notify 的包装行为,避免用户每次重启 Codex App 后都看到误报。
问题描述
在 Codex standby 模式下,
helloagents doctor codex初始检查正常;但重启 Codex App 后,~/.codex/config.toml里的notify会被 Codex App / Computer Use 改写为链式通知形式,随后helloagents doctor codex会报告 drift:但实际配置里 HelloAGENTS 的
codex-notify并没有丢失,只是被放进了SkyComputerUseClient的--previous-notify参数里。环境
3.0.370.132.0standbyhelloagents install codex --standby复现步骤
结果正常:
重启 Codex App。
再次执行:
结果变为 drift:
实际配置
重启 Codex App 后,
~/.codex/config.toml中的notify被改为类似:这里
helloagents-js codex-notify仍然存在,只是作为--previous-notify的 JSON 字符串参数传给了SkyComputerUseClient。预期行为
helloagents doctor codex应该识别这种链式 notify 配置,并认为它仍然有效:codexNotify: oknotifyPathMatch: okglobalNotifyPathMatch: okstandby-notify-drift实际行为
当前 doctor 只识别直接形式:
但不识别被 Computer Use 包装后的形式:
因此重启 Codex App 后会误报 drift。
疑似原因
源码中
notifyPathMatch/globalNotifyPathMatch似乎是通过文本包含判断实现的:而
CODEX_MANAGED_NOTIFY_VALUE是直接形式:被
--previous-notify包装后,配置文本中实际出现的是转义后的 JSON 字符串:所以文本匹配失败。
建议修复
建议 doctor 对
notify做结构化解析,而不是只做原始文本包含判断:notify数组;["helloagents-js", "codex-notify"],视为有效;--previous-notify,解析其后一个参数为 JSON;["helloagents-js", "codex-notify"],也视为有效;HelloAGENTS notify is chained through Codex Computer Use,但不应标记为 drift。这样可以兼容 Codex App / Computer Use 对
notify的包装行为,避免用户每次重启 Codex App 后都看到误报。