Application failed to start correctly (Windows)

Open 💬 15 comments Opened Mar 10, 2026 by XiaodengziBoy
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What version of the IDE extension are you using?

openai.chatgpt

What subscription do you have?

null

Which IDE are you using?

vscode

What platform is your computer?

_No response_

What issue are you seeing?

<img width="550" height="249" alt="Image" src="https://github.com/user-attachments/assets/1079e934-8131-4a60-a1c8-f9e223d29c53" />

What steps can reproduce the bug?

Error will be reported when operating the command.
Anti-virus software has no interception, and it is executed with the permission of super administrator.

What is the expected behavior?

_No response_

Additional information

_No response_

View original on GitHub ↗

15 Comments

github-actions[bot] contributor · 4 months ago

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

  • #12910
  • #12888

Powered by Codex Action

etraut-openai contributor · 4 months ago

English translation of dialog: "The application failed to start correctly (0xc0000022). Click OK to close the application."

etraut-openai contributor · 4 months ago

I presume you're using the Codex IDE Extension? Which version? I presume you're running on Windows based on the screen shot and error code. Are you using WSL?

Can you provide more specific repro steps?

XiaodengziBoy · 4 months ago
我猜你用的是Codex IDE扩展?哪个版本?根据截图和错误代码,我猜你是在Windows上运行的。你用的是WSL吗? 你能提供更具体的复刻步骤吗?

Both the extension codex and codex applications of vscode have this problem.

aptx4869zoe · 4 months ago

I have the same problem when it use some commad like this: $ Get-ChildItem -Force

magic-249 · 4 months ago

是否开启了这个,为代理模式启用沙盒

<img width="543" height="70" alt="Image" src="https://github.com/user-attachments/assets/e6fe3826-b884-4c00-8c6e-27aad9ee3c1d" />

magic-249 · 4 months ago

windows11,vscode1.111.0 (system setup),codex 26.304.20706同样的问题

magic-249 · 4 months ago

@XiaodengziBoy 你是否升级了powershell7

XiaodengziBoy · 4 months ago
你是否升级了PowerShell7

<img width="641" height="256" alt="Image" src="https://github.com/user-attachments/assets/3fa9f058-f347-4aec-825e-a18edc2e3be3" />

我发现就是开了沙盒模式或者默认权限会报错,操作不了命令。但是完全访问权限可以正常试用

magic-249 · 4 months ago
> 你是否升级了PowerShell7 <img alt="Image" width="641" height="256" src="https://private-user-images.githubusercontent.com/30485698/564526811-3fa9f058-f347-4aec-825e-a18edc2e3be3.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzM3Mjk1ODMsIm5iZiI6MTc3MzcyOTI4MywicGF0aCI6Ii8zMDQ4NTY5OC81NjQ1MjY4MTEtM2ZhOWYwNTgtZjM0Ny00YWVjLTgyNWUtYTE4ZWRjMmUzYmUzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjAzMTclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwMzE3VDA2MzQ0M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWI2ZTA0MjdhOTQyMDZiNzVmYmJhYTc0NWVkZWVhYjc1NzY1Njc3ZGYwODVlODE4ZDAyMTRjNDFhNTNlZDk1MjMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.7vp3j6DelfHbQalt73IUu9RE0d98V0mSCaC2Qvx8gNo"> 我发现就是开了沙盒模式或者默认权限会报错,操作不了命令。但是完全访问权限可以正常试用

我以为是我升级ps7导致的;
我删除codex相关文件重新下载后可以运行,但是开沙盒就会重现问题

meideng-liukaining · 3 months ago

有解决吗?

boooooommmmmm · 3 months ago

尝试关闭沙盒模式? Try to turn off sandbox mode?
codex --sandbox danger-full-access
(也可以在 config.toml中永远关闭 sandbox_mode = "danger-full-access"

nzwl2020 · 3 months ago
有解决吗?

You can give this solution a try.
https://github.com/openai/codex/issues/14729#issuecomment-4273028587

youxin666 · 2 months ago

解决了!把这个问题贴过去给codex成功解决了!
问题根因就是那两个 VC++ 运行库 DLL 缺少 Users:(RX) 权限。
这是codex的回答

FHF404 · 2 months ago

【已解决】我这边遇到同样的 codex-command-runner.exe 报 0xc0000022 问题,确认不是杀毒软件、管理员权限或 PowerShell 本身的问题,runner 直接运行是正常的,但 Codex 在 Windows 的 elevated 沙箱模式下会用 CodexSandboxOffline 这个本地沙箱用户去启动 runner,这条路径在我机器上会失败,表现为 Windows 弹窗 codex-command-runner.exe Application Error 0xc0000022,Codex 里则是 windows sandbox: timed out after 15000ms connecting runner pipe-in;解决方法是编辑 %USERPROFILE%\.codex\config.toml,把 [windows] 下面的 sandbox = "elevated" 改成 sandbox = "unelevated",然后完全重启 Codex / VS Code / Codex App,重启后普通命令就能正常执行了。这个方法不是关闭沙箱,而是把 Windows 沙箱后端从 elevated 换成 unelevated,避开会崩的 elevated command runner 路径。