Skip to content

[Windows app 26.903.8094.0] In-app browser discovery fails with nodeRepl.fetch request failed after cua_repl reset #44117

Open

Description

@staminaoo

What version of the Codex App are you using?

  • Installed Windows package, queried locally: OpenAI.Codex 26.903.8094.0.
  • Desktop app-server executable version, queried locally: codex-cli 0.153.4.
  • Browser control tool: mcp__cua_repl, documented cua API.

What platform is your computer?

Windows x64. Observed on 2026-09-09.

What issue are you seeing?

The app reported two open in-app browser tabs and a selected loopback preview URL. The user explicitly mentioned the Browser tool, but even the initial inventory call failed:

await cua.getState();

The result was:

{
  "apps": [],
  "browsers": [],
  "errors": [
    "Browsers: Error: nodeRepl.fetch request failed"
  ]
}

The tool then emitted Error: nodeRepl.fetch request failed. Recent attempts took approximately 22–24 seconds each.

The empty browser array is returned alongside an inventory error; it should not be interpreted as evidence that the user has no browser tabs open. No browser or tab handle could be obtained during these failed attempts.

What steps can reproduce the bug?

Sequence observed in this affected session (not a fresh-install or cross-machine reproduction):

  1. Have the in-app browser open with a local preview selected.
  2. Ask the agent to inspect that browser, including an explicit Browser mention.
  3. Call the documented inventory API await cua.getState();.
  4. Observe the error above instead of browser/tab inventory.
  5. Call mcp__cua_repl.js_reset. The tool reports js kernel reset.
  6. In the fresh session, execute exactly one first-use API call: await cua.getState();.
  7. Initial tool documentation is returned, but browser inventory again fails with the same error.

Repeated inventory attempts and one documented REPL reset did not restore the connection. A full application restart/reinstall was not tested for this occurrence.

Control checks and limits

  • An independent HTTP check of the loopback preview returned HTTP 200 and its expected page title. This confirms that the web server responded, not that the current browser rendering was visually verified.
  • App-supplied UI context reported two in-app browser tabs and the selected preview URL. Because browser-control inventory failed, current page contents could not be independently read or screenshotted through that tool.
  • Earlier in this task, the same in-app-browser workflow could open, inspect and screenshot the preview. The trigger for the later connection failure is unknown.
  • The failing operation was inventory, before any navigation or page interaction. It did not return a URL-policy denial or command-approval rejection.
  • No proxy, firewall, browser profile, credentials, or security settings were modified to diagnose this browser failure. Proxy/environment inheritance and the underlying transport failure have not been established as causes.

What is the expected behavior?

The tool should discover the available in-app browser and tabs, or provide an actionable diagnostic identifying which connection/setup stage failed. A documented reset should either re-establish the connection or clearly state what additional recovery is needed.

Related reports

This report contains no personal filesystem paths, account identifiers, private site domains, credentials, screenshots, or raw session logs.

Activity

  1. added
    bugSomething isn't working
    appIssues related to the Codex desktop app
    windows-osIssues related to Codex on Windows systems
    connectivityIssues involving networking or endpoint connectivity problems (disconnections)
    tool-callsIssues related to tool calling
    on Sep 9, 2026
  2. github-actions commented on Sep 9, 2026

    @github-actions
    Contributor

    Potential duplicates detected. Please review them and close your issue if it is a duplicate.

    Powered by Codex Action

  3. Yy-9519 commented on Sep 16, 2026

    @Yy-9519

    Windows Codex 无法控制 Chrome:代理修复记录

    故障现象

    Chrome 和 ChatGPT 扩展已安装,但 Codex 读取浏览器状态或列出标签页时,约 21 秒后报错:

    nodeRepl.fetch request failed
    

    本机定位结果

    读取运行中进程的实际环境后发现:

    • .codex/.env 已配置 HTTP/HTTPS 代理。
    • Codex app-server 收到了这些代理变量。
    • CUA 浏览器控制进程及其启动的 node_repl 没有收到。
    • 失败期间,node_repl 出现公网 443 连接持续处于 SYN_SENT 的情况。

    因此,本机问题定位在浏览器控制进程的代理环境传递上;具体是哪一层过滤或未传递变量,尚未完全确认。

    修复方式

    先备份当前版本实际使用的 CUA 启动文件,再在启动 node_repl 的 spawn(..., { env: ... }) 中加入:

    NODE_USE_ENV_PROXY: "1",
    HTTP_PROXY: "http://127.0.0.1:7897",
    HTTPS_PROXY: "http://127.0.0.1:7897",
    http_proxy: "http://127.0.0.1:7897",
    https_proxy: "http://127.0.0.1:7897",
    NO_PROXY: "localhost,127.0.0.1,::1",
    no_proxy: "localhost,127.0.0.1,::1",

    注意:

    • 7897 是本机 HTTP/mixed 代理端口,其他电脑应按实际端口调整。
    • 保留原有环境变量、trusted-service 和权限设置。
    • 不需要关闭沙箱、开启危险模式或重装扩展。

    本机修改文件为:

    C:\Users\Administrator\AppData\Local\OpenAI\Codex\runtimes\cua_node\6f12e0ef1c6e5061\bin\node_modules\@oai\cua-repl\dist\lib\js\oai_js_cua_repl\src\launch.js
    

    不同版本的路径和文件名可能不同,不能直接照抄。

    完成修改和语法检查后,完全退出并重启 Codex。

    修复验证

    重启后实际验证通过:

    1. Chrome provider 发现成功。
    2. listTabs 成功,耗时约 0.66 秒。
    3. 打开并读取 https://example.com/ 成功。
    4. 点击 “Learn more” 成功。
    5. 读取跳转后的 IANA 页面成功。

    这验证了真实浏览器操作,不只是代理端口或独立网络探测通过。

    为什么只在 .codex/.env 加 NODE_USE_ENV_PROXY=1 没用?

    做过排除补丁干扰的对照测试:

    1. 在已有完整代理配置的 .env 中加入 NODE_USE_ENV_PROXY=1。
    2. 将 launch.js 恢复原版。
    3. 完全退出并重启 Codex。
    4. 再次读取运行中进程环境并测试浏览器。

    结果:

    进程 代理变量 NODE_USE_ENV_PROXY
    app-server 已收到 1
    CUA / node_repl 未收到 未收到

    浏览器再次在约 21.98 秒后报 fetch 错误。

    所以,不能简单说这个变量“无效”:本机测试表明,它没有通过 .env 传入需要它的浏览器控制进程。直接在启动子进程时注入代理环境,才是本次验证有效的方式。

    失败后已恢复之前有效的启动补丁和测试前的 .env。恢复后的文件仍需重启 Codex 才能生效。

    Codex 更新后的注意事项

    这是临时绕过方案,不是官方持久配置接口。

    Codex 更新可能覆盖补丁,或改用新的运行时目录,导致修复失效;不是每次更新都一定失效。

    更新后若问题复现:

    1. 重新确认当前实际使用的启动文件。
    2. 检查代理补丁是否仍在。
    3. 如需重新修改,先备份新版本文件。
    4. 只补入代理环境设置,不要用旧版整份文件覆盖新版文件。
    5. 重启后重新验证标签列表、页面读取和链接点击。

    回滚时,恢复同版本的原文件备份,再重启 Codex。

    参考

    #44364 (comment)

    该 issue 使用旧版本 launch.mjs;本机使用的是运行时包内的 launch.js,应以实际启动链路为准。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appIssues related to the Codex desktop appbrowserbugSomething isn't workingconnectivityIssues involving networking or endpoint connectivity problems (disconnections)tool-callsIssues related to tool callingwindows-osIssues related to Codex on Windows systems

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions