Codex edit/apply crashes on Windows in VS Code Insiders with codex-command-runner.exe error 0xc0000022
What version of the IDE extension are you using?
26.5311.21342
What subscription do you have?
Plus
Which IDE are you using?
VS Code
What platform is your computer?
Microsoft Windows NT 10.0.26200.0 x64
What issue are you seeing?
Any time Codex tries to edit a file in VS Code Insiders on Windows, the edit fails and Windows shows:
codex-command-runner.exe - Application Error
The application was unable to start correctly (0xc0000022).
This appears specific to Codex edit/apply. Manual editing works, and GitHub Copilot Chat can edit the same file successfully.
What steps can reproduce the bug?
Open VS Code Insiders
Open any file
Ask Codex to make a tiny edit
Codex attempts to apply the patch
Crash dialog appears for codex-command-runner.exe
No edit is applied
What is the expected behavior?
_No response_
Additional information
Any time Codex tries to edit a file in VS Code Insiders on Windows, the edit fails and Windows shows:
codex-command-runner.exe - Application ErrorThe application was unable to start correctly (0xc0000022).
This appears specific to Codex edit/apply. Manual editing works, and GitHub Copilot Chat can edit the same file successfully.
Environment:
- Windows
- VS Code Insiders
- OpenAI/Codex extension
- Example workspace file:
d:\txData\Qbox_979BCA.base\resources\[gravvy]\gravvy_hookies\test.lua
Repro:
- Open VS Code Insiders
- Open any file
- Ask Codex to make a tiny edit
- Codex attempts to apply the patch
- Crash dialog appears for
codex-command-runner.exe - No edit is applied
What works:
- Manual typing/editing in VS Code
- Copilot edit/apply in the same workspace
- Running these binaries directly from PowerShell:
codex-command-runner.execodex.execodex-windows-sandbox-setup.exe
For example:
codex-command-runner.exe --helpreturnsrunner: no request-file providedcodex.exe --helpworks normally
So the binaries themselves are launchable outside the extension.
What I tried:
- Run VS Code as admin
- Restart VS Code and PC
- Compatibility mode
sfc /scannow- Reinstall extension
- Force redownload of
codex-command-runner.exe - Disable/re-enable sandbox
- Disable WSL
- Clear VS Code Insiders cache/storage:
WebStorageLocal StorageService WorkerCacheCode CacheSession Storage- Remove legacy Codex config:
``toml``
[windows]
sandbox = "elevated"
and restart so Codex rebuilds sandbox setup
None of the above fixed it.
Relevant logs:
- Latest Codex log:
C:\Users\jt614\AppData\Roaming\Code - Insiders\logs\20260314T212606\window1\exthost\openai.chatgpt\Codex.log
Notable log behavior:
- Codex activates and spawns app-server
- Logs unsupported internal requests such as:
local-environments is not supported in the extension- previously also
open-in-target not supported in extension
This makes it look like the failure is in the Codex extension’s edit/apply integration path on Windows, not in the workspace files themselves.
Binary paths involved:
C:\Users\jt614\.codex\.sandbox-bin\codex-command-runner.exeC:\Users\jt614\.vscode-insiders\extensions\openai.chatgpt-26.5311.21342-win32-x64\bin\windows-x86_64\codex-command-runner.exeC:\Users\jt614\.vscode-insiders\extensions\openai.chatgpt-26.5311.21342-win32-x64\bin\windows-x86_64\codex.exeC:\Users\jt614\.vscode-insiders\extensions\openai.chatgpt-26.5311.21342-win32-x64\bin\windows-x86_64\codex-windows-sandbox-setup.exe
Expected:
Codex should apply file edits normally.
Actual:
Only Codex edits crash with codex-command-runner.exe 0xc0000022; manual edits and Copilot edits succeed.
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗