Repository navigation
[Windows] codex-windows-sandbox-setup.exe fails with "The specified module could not be found" #29418
Description
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
- Open the Codex Windows app.
- Open a local Java project.
- Ask Codex to inspect and modify project files.
- Let Codex execute commands and edit files.
- 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?
### Steps to reproduce
-
Open the Codex Windows app.
-
Open a local Java project.
-
Start a Codex session and ask Codex to inspect and modify several MyBatis Mapper files.
-
Codex begins running commands and editing the project files.
-
While the task is still executing, Windows suddenly displays an error dialog for:
codex-windows-sandbox-setup.exe -
The dialog shows the following Chinese error message:
找不到指定的模块。English translation:
The specified module could not be found. -
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
github-actions commentedon Jun 22, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
CZH0919 commentedon Jun 22, 2026
这是手动修改了.env的原因
admincopm commentedon Jun 23, 2026
FreeZIngMoon11 commentedon Jun 23, 2026
I can reproduce a very similar issue on Codex Windows app
26.616.6631.0with[windows] sandbox = "elevated".Additional observations from my case:
C:\Program Files\WindowsApps\OpenAI.Codex_26.616.6631.0_x64__2p2nqsd0c76g0\app\resources\codex-windows-sandbox-setup.exe找不到指定的模块。(
The specified module could not be found.)fs sandbox helper failed ... windows sandbox failed: orchestrator_helper_launch_canceled: ShellExecuteExW failed to launch setup helper: 1223functions.view_imagereading a local image under the workspace, not only byapply_patch.stored_ports=[7890]todesired_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.
changing
C:\Users\<USER>\.codex\config.tomlfrom:view_imageand normal shell behavior.321Fontsize commentedon Jun 23, 2026
我也是手动修改了.env,请问一下,忽略这个错误是否有什么问题?
UEhQZXI commentedon Jun 24, 2026
codex 会使用 powershell 来填充修改文件,效率低,容易出错
xhxgit commentedon Jun 26, 2026
临时解决:config.toml把sandbox改成unelevated
HG731GZ commentedon Jun 26, 2026
如果不修改.env,有没有什么别的能让它稳定走代理的方案?
CZH0919 commentedon Jun 26, 2026
OneiStar commentedon Jun 29, 2026
我也遇到的相同的问题,codex无法写入文件,会弹窗报错“找不到指定的模块”
我按照这里的步骤解决了:https://www.reddit.com/r/codex/comments/1uccr76/comment/ot2wdz0/
修复方案:
完全退出 Codex,包括系统托盘中的 Codex。打开任务管理器,确认相关 Codex 进程均已结束。
用记事本打开:
[features],在其下面加入:不要重复创建第二个
[features]。你原来的以下配置可以保留:
找到类似:
将它改成:
"proxy_ports": []只改这一项,保留其余 JSON 内容。
保存两个文件,然后以普通方式启动 Codex,不需要管理员权限。
再让 Codex 执行一次文件写入测试。
如果仍然失败,可以先采用临时绕过方案,将
config.toml改为:然后重启 Codex。这个方案会降低沙箱隔离强度,只建议临时使用。
关键点是:必须先彻底退出所有 Codex 进程,再清空
proxy_ports,否则旧进程可能重新把7890写回去。z-lunaticasylum commentedon Jun 30, 2026
z-lunaticasylum commentedon Jun 30, 2026
雀食有用,顶!
dongbyb commentedon Jul 3, 2026
亲测可行
jyxu0621 commentedon Jul 3, 2026
复制发给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找不到指定的模块。
YinChus commentedon Sep 21, 2026
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.