Codex App 的 Chrome 插件离奇坏法:node_repl 进程在跑,但 js 工具没注入会话

这次不是 PD 虚拟机的问题了,是 Codex App/Chrome 插件链路里一个更离谱的 bug:Chrome 插件所需的 node_repl/js 工具没有注入到当前会话,导致 @chrome 明明可选、Chrome 也登录好了,但模型无法真正接管浏览器。

现象

我想让 Codex 用 @chrome 去 Parallels forum 发帖。Chrome 标签页已经打开并登录好了,Chrome 插件也被显式触发了,但 Codex 在执行 Chrome skill 时卡住:

  • Chrome skill 要求使用 node_repl 的 JS 工具来 bootstrap browser-client.mjs
  • 当前会话工具面里没有 node_repl/js / mcp__node_repl__js
  • 因此无法调用 agent.browsers.get("extension")
  • 最终不能控制已登录的 Chrome tab

这不是论坛登录态问题,也不是 Chrome 扩展没装。

本机版本

Codex App:

CFBundleShortVersionString = 26.601.21317
CFBundleVersion = 3511

安装/更新时间:

Codex.app mtime = Jun 3 08:10:37 2026
node_repl mtime = Jun 3 08:10:36 2026

Chrome 插件缓存:

/Users/m/.codex/plugins/cache/openai-bundled/chrome/26.601.21317
/Users/m/.codex/plugins/cache/openai-bundled/chrome/latest -> 26.601.21317

静态检查全部正常

Chrome 正在运行:

{
  "platform": "darwin",
  "running": true,
  "processes": [
    { "process_name": "Google Chrome" }
  ]
}

Codex Chrome Extension 已安装并启用:

{
  "extensionId": "hehggadaopoacecdllhhajmbjkdcmajg",
  "selectedProfileDirectory": "Default",
  "installed": true,
  "enabled": true,
  "profiles": [
    {
      "profileDirectory": "Default",
      "installed": true,
      "registered": true,
      "enabled": true,
      "selected": true,
      "versions": ["1.1.5_0"]
    }
  ]
}

Native Messaging Host 也是正确的:

{
  "manifestPath": "/Users/m/Library/Application Support/Google/Chrome/NativeMessagingHosts/com.openai.codexextension.json",
  "expectedHostName": "com.openai.codexextension",
  "actualHostName": "com.openai.codexextension",
  "expectedExtensionId": "hehggadaopoacecdllhhajmbjkdcmajg",
  "allowedOrigins": [
    "chrome-extension://hehggadaopoacecdllhhajmbjkdcmajg/"
  ],
  "exists": true,
  "nameMatches": true,
  "hasExpectedOrigin": true,
  "correct": true,
  "problem": null
}

browser-client.mjs 也存在:

/Users/m/.codex/plugins/cache/openai-bundled/chrome/26.601.21317/scripts/browser-client.mjs

node_repl 二进制存在且可执行:

/Applications/Codex.app/Contents/Resources/node_repl: Mach-O 64-bit executable arm64
-rwxr-xr-x ... /Applications/Codex.app/Contents/Resources/node_repl

配置里也有 MCP server:

[mcp_servers.node_repl]
args = []
command = "/Applications/Codex.app/Contents/Resources/node_repl"
startup_timeout_sec = 120

[mcp_servers.node_repl.env]
NODE_REPL_NATIVE_PIPE_CONNECT_TIMEOUT_MS = "1000"
NODE_REPL_NODE_PATH = "/Applications/Codex.app/Contents/Resources/node"
NODE_REPL_TRUSTED_CODE_PATHS = "/Users/m/.codex"
BROWSER_USE_AVAILABLE_BACKENDS = "chrome,iab"
NODE_REPL_INSTRUCTIONS_USE_CASE_CHROME = "Control the Chrome browser in conjunction with the Chrome Plugin. Prefer this method of controlling Chrome over alternatives (such as Computer Use) unless the user explicitly mentions an alternative."

最关键的异常点

这次和一些旧 issue 不一样:extension-host 不是没启动,node_repl 也不是没启动。

进程里能看到:

/Users/m/.codex/plugins/cache/openai-bundled/chrome/latest/extension-host/macos/arm64/extension-host chrome-extension://hehggadaopoacecdllhhajmbjkdcmajg/

还能看到多个 Codex 启动的 node_repl

/Applications/Codex.app/Contents/Resources/node_repl
/Applications/Codex.app/Contents/Resources/codex app-server --listen stdio://
/Applications/Codex.app/Contents/Resources/node_repl
/Applications/Codex.app/Contents/Resources/codex app-server --listen stdio://
...

父子关系也很明确:

Codex app-server --analytics-default-enabled
  ├─ node_repl
  │   └─ codex app-server --listen stdio://
  ├─ node_repl
  │   └─ codex app-server --listen stdio://
  └─ ...

也就是说:

不是 node_repl 二进制不存在,不是配置没写,不是 native host 坏掉,也不是 extension-host 没起来;而是 Codex App 启动了相关进程,但没有把 node_repl/js 这个 MCP tool 注入到当前 thread 的可调用工具列表里。

和已有 issue 的区别

之前看到的相邻问题包括:

  • Browser Use unavailable because Node REPL tool is not exposed
  • Chrome plugin unavailable despite extension/native host checks passing
  • extension-host not running, node_repl MCP tool unavailable

但本次补充了一个更窄的证据:

  • macOS 上 Codex App 26.601.21317 (3511) 仍复现
  • Chrome extension 正常
  • Native host manifest 正常
  • extension-host 已运行
  • 多个 node_repl 进程已由 Codex app-server 启动
  • 但模型会话仍然没有 node_repl/js / mcp__node_repl__js

这更像新版 Codex App 的 tool injection / session tool declaration 回归,而不是浏览器插件安装问题。

临时修复/缓解建议

这个问题用户侧很难彻底修,因为断点在 Codex App 会话工具注入阶段。能做的主要是诊断和规避:

  1. 不要反复重装 Chrome 扩展。静态检查都正常时,重装扩展大概率没用。
  2. 不要把问题误判成登录态或网页问题。Chrome 页面已登录也没用,模型没有浏览器控制工具。
  3. 新开 thread、重启 Codex App 可以试,但如果 26.601 仍不注入 node_repl/js,只是碰运气。
  4. 真正需要官方修的是:当 Chrome/Browser skill 被选中时,Codex App 必须把 node_repl MCP server 的 js tool 注入到该会话,并保证 prompt/tool manifest 里能看到 node_repl/jsmcp__node_repl__js

建议官方检查点

我准备给 GitHub issue 写的核心判断是:

Codex App 26.601.21317 on macOS has a browser/Chrome plugin tool-injection regression: Chrome extension, native host, extension-host, and node_repl processes are healthy, but node_repl/js is not exposed to the model session, breaking the Chrome plugin bootstrap.

更具体地说,可能要查:

  • app-server 启动 node_repl 后,MCP tools 是否被正确枚举
  • tools manifest 是否被附加到当前 thread/model request
  • Chrome skill 被触发时,是否有逻辑遗漏了 node_repl server 的 tool declaration
  • projectless thread 与 workspace thread 是否走了不同的 tool 注入路径
  • plugin version 从 26.52726.601 后,trusted browser-client hash 更新是否只更新了 env,却没有保证 tool exposure

结论

这是个很逆天的状态:

浏览器开着,扩展装着,native host 对着,extension-host 跑着,node_repl 也跑着,但模型看不到 node_repl/js,于是 Chrome 插件等于残废。

所以这不是“Chrome 插件没装好”,而是 Codex App 这一层的会话工具注入坏了。