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

Resolved 💬 14 comments Opened Jun 22, 2026 by admincopm Closed Jun 29, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

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?

<img width="823" height="665" alt="Image" src="https://github.com/user-attachments/assets/6525c445-4001-4e5b-a80b-a6cf6b5f7f21" />

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

  1. The dialog shows the following Chinese error message:

找不到指定的模块。

English translation:

The specified module could not be found.

  1. 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_

View original on GitHub ↗

14 Comments

github-actions[bot] contributor · 28 days ago

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

  • #29200
  • #29178
  • #29127
  • #29072
  • #29089

Powered by Codex Action

CZH0919 · 28 days ago

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

admincopm · 28 days ago
这是手动修改了.env的原因

I don't have this file locally.

FreeZIngMoon11 · 28 days ago

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 #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:
``toml
[windows]
sandbox = "elevated"
`
to:
`toml
[windows]
sandbox = "unelevated"
`
and fully restarting Codex restored
view_image` and normal shell behavior.

321Fontsize · 27 days ago

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

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

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

xhxgit · 25 days ago
https://www.reddit.com/r/codex/comments/1uccr76/comment/ot2wdz0

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

HG731GZ · 24 days ago
这是手动修改了.env的原因

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

CZH0919 · 24 days ago

clash,开启tun

---Original---
From: @.*&gt;
Date: Fri, Jun 26, 2026 14:59 PM
To:
@.*&gt;;
Cc: @.****@.**&gt;;
Subject: Re: [openai/codex] [Windows] codex-windows-sandbox-setup.exe fails with "The specified module could not be found" (Issue #29418)

HG731GZ left a comment (openai/codex#29418)

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

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


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you commented.Message ID: @.***&gt;

OneiricStar · 21 days ago

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

修复方案:

  1. 完全退出 Codex,包括系统托盘中的 Codex。打开任务管理器,确认相关 Codex 进程均已结束。
  1. 用记事本打开:
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,不需要管理员权限。
  1. 再让 Codex 执行一次文件写入测试。

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

[windows]
sandbox = "unelevated"

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

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

z-lunaticasylum · 20 days ago
我也遇到的相同的问题,codex无法写入文件,会弹窗报错“找不到指定的模块” 我按照这里的步骤解决了:https://www.reddit.com/r/codex/comments/1uccr76/comment/ot2wdz0/ 修复方案: 1. 完全退出 Codex,包括系统托盘中的 Codex。打开任务管理器,确认相关 Codex 进程均已结束。 2. 用记事本打开: `` C:\Users\{user}\.codex\config.toml ` 3. 找到已有的 [features],在其下面加入: network_proxy = true 不要重复创建第二个 [features]。 4. 在配置文件末尾添加: [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 内容。 6. 保存两个文件,然后以普通方式启动 Codex,不需要管理员权限。 7. 再让 Codex 执行一次文件写入测试。 如果仍然失败,可以先采用临时绕过方案,将 config.toml 改为: [windows] sandbox = "unelevated" 然后重启 Codex。这个方案会降低沙箱隔离强度,只建议临时使用。 关键点是:必须先彻底退出所有 Codex 进程,再清空 proxy_ports,否则旧进程可能重新把 7890` 写回去。
z-lunaticasylum · 20 days ago

雀食有用,顶!

dongbyb · 18 days ago
proxy_ports

亲测可行

jyxu0621 · 17 days ago

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