Skip to content

[Windows] codex-windows-sandbox-setup.exe fails with "The specified module could not be found" #29418

Closed

Description

@admincopm

What version of the Codex App are you using (From “About Codex” dialog)?

26.616.6631.0

What subscription do you have?

ChatGPT Plus

What platform is your computer?

Microsoft Windows NT 10.0.26100.0 x64

What issue are you seeing?

Description

While Codex was executing a task in the Windows app, Windows suddenly displayed an error dialog for:

codex-windows-sandbox-setup.exe

The error message shown in Chinese was:

找不到指定的模块。

English translation:

The specified module could not be found.

Codex was working normally last week. I did not intentionally change the sandbox configuration or the application settings before this started happening.

Steps to reproduce

  1. Open the Codex Windows app.
  2. Open a local Java project.
  3. Ask Codex to inspect and modify project files.
  4. Let Codex execute commands and edit files.
  5. During task execution, a Windows error dialog appears for codex-windows-sandbox-setup.exe.

Expected behavior

The Windows sandbox should initialize successfully, and Codex should continue executing the task without displaying an operating system error dialog.

Actual behavior

Windows displays an error dialog saying:

The specified module could not be found.

The executable path shown in the dialog is similar to:

C:\Program Files\WindowsApps\OpenAI.Codex_26.616.6631.0_x64__...\codex-windows-sandbox-setup.exe

Additional information

  • Codex worked normally last week.
  • The issue appeared while Codex was running commands and editing Java Mapper files.
  • The project itself continued to be accessible.
  • I did not intentionally change the sandbox mode.
  • This appears to be a regression or an incomplete/missing dependency in the Windows sandbox setup component.

Screenshot

A screenshot of the Windows error dialog is attached below.

What steps can reproduce the bug?

Image ### Steps to reproduce
  1. Open the Codex Windows app.

  2. Open a local Java project.

  3. Start a Codex session and ask Codex to inspect and modify several MyBatis Mapper files.

  4. Codex begins running commands and editing the project files.

  5. While the task is still executing, Windows suddenly displays an error dialog for:

    codex-windows-sandbox-setup.exe

  6. The dialog shows the following Chinese error message:

    找不到指定的模块。

    English translation:

    The specified module could not be found.

  7. Close the error dialog. Codex may remain on the task execution/editing screen.

Conversation information

  • Conversation ID: 019eee34-ddc6-7a42-9cbe-14a4f085e555
  • Context window remaining: approximately 62%
  • Context used: approximately 98,288 / 258K
  • 5-hour usage limit remaining: 0%
  • 5-hour limit reset time shown: 19:04
  • 7-day usage limit remaining: 56%
  • 7-day limit reset date shown: June 25

The quota screenshot was taken after the error occurred, so I cannot confirm whether the 5-hour limit had already reached 0% at the exact moment the error dialog appeared.

Additional details

  • Codex worked normally last week.

  • I did not intentionally change the sandbox configuration.

  • The error occurred while Codex was executing commands and editing Java source files.

  • The executable path shown in the dialog was similar to:

    C:\Program Files\WindowsApps\OpenAI.Codex_26.616.6631.0_x64__...\codex-windows-sandbox-setup.exe

What is the expected behavior?

No response

Additional information

No response

Activity

  1. added
    appIssues related to the Codex desktop app
    on Jun 22, 2026
  2. added
    bugSomething isn't working
    windows-osIssues related to Codex on Windows systems
    sandboxIssues related to permissions or sandboxing
    on Jun 22, 2026
  3. CZH0919 commented on Jun 22, 2026

    @CZH0919

    这是手动修改了.env的原因

  4. admincopm commented on Jun 23, 2026

    @admincopm
    Author

    这是手动修改了.env的原因
    I don't have this file locally.

  5. FreeZIngMoon11 commented on Jun 23, 2026

    @FreeZIngMoon11

    I can reproduce a very similar issue on Codex Windows app 26.616.6631.0 with [windows] sandbox = "elevated".

    Additional observations from my case:

    • The visible Windows dialog is for:
      C:\Program Files\WindowsApps\OpenAI.Codex_26.616.6631.0_x64__2p2nqsd0c76g0\app\resources\codex-windows-sandbox-setup.exe
    • Dialog message on zh-CN Windows:
      找不到指定的模块。
      (The specified module could not be found.)
    • The tool error was:
      fs sandbox helper failed ... windows sandbox failed: orchestrator_helper_launch_canceled: ShellExecuteExW failed to launch setup helper: 1223
    • In my case this was triggered by functions.view_image reading a local image under the workspace, not only by apply_patch.
    • The target image file itself was valid and readable by PIL.
    • Normal shell commands could still run.
    • The sandbox log showed the fs-helper path requiring setup after offline firewall settings changed, including a transition like:
      stored_ports=[7890] to desired_ports=[]
      This looks related to Windows Codex Desktop 26.616.4196.0 regression: apply_patch / fs-helper fails when global proxy env is set #29178, but I have not confirmed whether the source of port 7890 is the same.
    • The helper executable exists at the WindowsApps path.
    • The user accepted Windows permission prompts, but the issue still reproduced, so this does not appear to be only a user-cancelled UAC prompt.
    • Workaround verified locally:
      changing C:\Users\<USER>\.codex\config.toml from:
      [windows]
      sandbox = "elevated"
      to:
      [windows]
      sandbox = "unelevated"
      and fully restarting Codex restored view_image and normal shell behavior.
  6. 321Fontsize commented on Jun 23, 2026

    @321Fontsize

    我也是手动修改了.env,请问一下,忽略这个错误是否有什么问题?

  7. UEhQZXI commented on Jun 24, 2026

    @UEhQZXI

    我也是手动修改了.env,请问一下,忽略这个错误是否有什么问题?

    codex 会使用 powershell 来填充修改文件,效率低,容易出错

  8. xhxgit commented on Jun 26, 2026

    @xhxgit

    https://www.reddit.com/r/codex/comments/1uccr76/comment/ot2wdz0

    临时解决:config.toml把sandbox改成unelevated

  9. HG731GZ commented on Jun 26, 2026

    @HG731GZ

    这是手动修改了.env的原因

    如果不修改.env,有没有什么别的能让它稳定走代理的方案?

  10. CZH0919 commented on Jun 26, 2026

    @CZH0919
  11. OneiStar commented on Jun 29, 2026

    @OneiStar

    我也遇到的相同的问题,codex无法写入文件,会弹窗报错“找不到指定的模块”
    我按照这里的步骤解决了:https://www.reddit.com/r/codex/comments/1uccr76/comment/ot2wdz0/

    修复方案:

    1. 完全退出 Codex,包括系统托盘中的 Codex。打开任务管理器,确认相关 Codex 进程均已结束。

    2. 用记事本打开:

    C:\Users\{user}\.codex\config.toml
    
    1. 找到已有的 [features],在其下面加入:
    network_proxy = true

    不要重复创建第二个 [features]。

    1. 在配置文件末尾添加:
    [shell_environment_policy]
    inherit = "all"
    exclude = ["HTTP_PROXY", "HTTPS_PROXY", "ALL_PROXY", "http_proxy", "https_proxy", "all_proxy"]

    你原来的以下配置可以保留:

    [windows]
    sandbox = "elevated"
    1. 打开:
    C:\Users\{user}\.codex\.sandbox\setup_marker.json
    

    找到类似:

    "proxy_ports": [7890]

    将它改成:

    "proxy_ports": []

    只改这一项,保留其余 JSON 内容。

    1. 保存两个文件,然后以普通方式启动 Codex,不需要管理员权限。

    2. 再让 Codex 执行一次文件写入测试。

    如果仍然失败,可以先采用临时绕过方案,将 config.toml 改为:

    [windows]
    sandbox = "unelevated"

    然后重启 Codex。这个方案会降低沙箱隔离强度,只建议临时使用。

    关键点是:必须先彻底退出所有 Codex 进程,再清空 proxy_ports,否则旧进程可能重新把 7890 写回去。

  12. z-lunaticasylum commented on Jun 30, 2026

    @z-lunaticasylum

    我也遇到的相同的问题,codex无法写入文件,会弹窗报错“找不到指定的模块” 我按照这里的步骤解决了:https://www.reddit.com/r/codex/comments/1uccr76/comment/ot2wdz0/

    修复方案:

    1. 完全退出 Codex,包括系统托盘中的 Codex。打开任务管理器,确认相关 Codex 进程均已结束。
    2. 用记事本打开:
    C:\Users\{user}\.codex\config.toml
    
    1. 找到已有的 [features],在其下面加入:

    network_proxy = true
    不要重复创建第二个 [features]。

    1. 在配置文件末尾添加:

    [shell_environment_policy]
    inherit = "all"
    exclude = ["HTTP_PROXY", "HTTPS_PROXY", "ALL_PROXY", "http_proxy", "https_proxy", "all_proxy"]
    你原来的以下配置可以保留:

    [windows]
    sandbox = "elevated"
    5. 打开:

    C:\Users\{user}\.codex\.sandbox\setup_marker.json
    

    找到类似:

    "proxy_ports": [7890]
    将它改成:

    "proxy_ports": []
    只改这一项,保留其余 JSON 内容。

    1. 保存两个文件,然后以普通方式启动 Codex,不需要管理员权限。
    2. 再让 Codex 执行一次文件写入测试。

    如果仍然失败,可以先采用临时绕过方案,将 config.toml 改为:

    [windows]
    sandbox = "unelevated"
    然后重启 Codex。这个方案会降低沙箱隔离强度,只建议临时使用。

    关键点是:必须先彻底退出所有 Codex 进程,再清空 proxy_ports,否则旧进程可能重新把 7890 写回去。

  13. z-lunaticasylum commented on Jun 30, 2026

    @z-lunaticasylum

    雀食有用,顶!

  14. dongbyb commented on Jul 3, 2026

    @dongbyb

    proxy_ports

    亲测可行

  15. jyxu0621 commented on Jul 3, 2026

    @jyxu0621

    复制发给codex,自己修好了,亲测有用,顶顶顶!!!!!😍
    成功解决:[Windows] codex-windows-sandbox-setup.exe fails with "The specified module could not be found"
    出现C:/ProgramFiles/WindowsApps/OpenAI.Codex_26.623.139.../codex-windows-sandbox-setup.exe找不到指定的模块。

  16. YinChus commented on Sep 21, 2026

    @YinChus

    in config.json : Modify the user path in the config file. After reinstalling the system, avoid using percent‑wrapped environment variables for the user path. Use slash‑formatted paths instead.

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 appbugSomething isn't workingsandboxIssues related to permissions or sandboxingwindows-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