Codex IDE extension on Windows cannot execute commands: helper_unknown_error: setup refresh had errors
What version of the IDE extension are you using?
26.818.31338
What subscription do you have?
ChatGPT Plus
Which IDE are you using?
Visual Studio Code
What platform is your computer?
Microsoft Windows NT 10.0.26200.0 x64
What issue are you seeing?
The Codex IDE extension is unable to execute any local command on Windows because the runner fails before process creation.
The error is consistently:
helper_unknown_error: setup refresh had errors
The failure happens before even trivial commands can execute.
Examples of commands I tried:
node --version
npm --version
git branch --show-current
git status --short
None of these commands actually execute. Codex immediately reports:
helper_unknown_error: setup refresh had errors
Environment:
- IDE: Visual Studio Code
- Codex/OpenAI IDE extension version: 26.818.31338
- Subscription: ChatGPT Plus
- Agent environment: Windows native
Troubleshooting already attempted:
- Retried in the existing Codex conversation.
- Switched from GPT-5.6 Luna to GPT-5.5.
- Created a completely new Codex conversation.
- Closed and reopened Visual Studio Code.
- Updated the Codex/OpenAI extension.
- Closed and reopened Visual Studio Code again after updating.
- Rebooted Windows completely.
- Created a new Codex conversation after the reboot.
- Tested only harmless commands such as node --version, npm --version and git status.
The exact same error persists:
helper_unknown_error: setup refresh had errors
Expected behavior:
Codex should create the local process and execute basic terminal commands.
Actual behavior:
The runner fails during "setup refresh" before creating the process. No command is executed.
Impact:
Codex is currently unusable for local development because it cannot execute any terminal command.
Additional information:
The Codex process is running from the VS Code extension installation path:
.vscode/extensions/openai.chatgpt-26.818.31338-win32-x64/
No repository files were modified during the failed attempts.
No database operations were executed.
No dependencies were installed.
No migrations or tests were executed.
The issue persists across:
- different models;
- new conversations;
- extension restart/update;
- VS Code restart;
- full Windows reboot.
What steps can reproduce the bug?
- Open Visual Studio Code on Windows.
- Open a local repository.
- Open the Codex/OpenAI IDE extension.
- Start a new Codex conversation using the Windows native agent environment.
- Ask Codex to execute a simple command, for example:
node --version
- The command is never executed. The runner immediately returns:
helper_unknown_error: setup refresh had errors
The same behavior occurs with other basic commands, including:
npm --version
git status --short
git branch --show-current
The problem is reproducible in both existing and completely new Codex conversations.
I also reproduced it after:
- restarting Visual Studio Code;
- updating the extension;
- switching models;
- creating a new conversation;
- rebooting Windows completely.
After the Windows reboot, the first simple command in a new Codex conversation still failed with the same error.
What is the expected behavior?
Codex should successfully initialize the Windows native agent environment, create the requested local process, and execute terminal commands.
For example, when requesting:
node --version
Codex should execute Node.js and return the installed version.
Similarly, commands such as:
npm --version
git status --short
should execute normally.
A setup refresh failure should not prevent all local command execution in the IDE extension.
Additional information
The issue appears to be related to the Codex IDE extension runner/environment rather than the repository being opened.
Additional observations:
- Agent environment is configured as "Windows native".
- The Codex process is launched from the VS Code extension installation:
.vscode/extensions/openai.chatgpt-26.818.31338-win32-x64/
- The failure occurs before any requested process is created.
- Even read-only/basic commands such as
node --versionandgit statuscannot start. - The same repository and normal PowerShell outside Codex can execute commands.
- The failure persists in completely new Codex conversations.
- Switching between GPT-5.6 Luna and GPT-5.5 did not change the behavior.
- Updating the extension did not resolve it.
- Restarting Visual Studio Code did not resolve it.
- A full Windows reboot did not resolve it.
The consistent error is:
helper_unknown_error: setup refresh had errors
Because the failure occurs before command execution, I have not attempted to modify the project as a workaround.
If additional Codex/VS Code diagnostic logs are needed, please let me know which logs would be useful and I can provide them.
7 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
This appears closely related to #38898. I’m seeing the same helper_unknown_error: setup refresh had errors in the VS Code extension, but on extension version 26.818.31338. The issue persists after updating the extension, creating new conversations, switching models, restarting VS Code, and rebooting Windows.
Update:
I updated the VS Code Codex/OpenAI extension from version 26.818.31338 to 26.818.41705 and restarted the extension host.
After the update, I tested only basic commands:
node --version
npm --version
git --version
The runner still fails before process creation with the same error:
helper_unknown_error: setup refresh had errors
No command was executed.
So the issue persists on extension version 26.818.41705 as well.
No project files, database state, Git state, or configuration were modified during this test.
Summary
Codex Desktop for Windows cannot execute any local command because the elevated sandbox fails during setup refresh, before the requested process is created.
The exact error is:
The problem persists after multiple Codex Desktop updates, including the current version
26.818.61809.Codex versions tested
The issue reproduced on all of these Microsoft Store versions:
26.818.4150926.818.4170526.818.61809Reproduction rate: 100%
Environment
26200.7171Windows was not updated or reconfigured between the last known good date and the first failure.
Sandbox configuration
C:\Users\<username>\.codex\config.tomlcontains:I am keeping
elevatedbecause it is the recommended Windows sandbox mode.Minimal reproduction steps
Alternatively:
or:
Expected behavior
The elevated sandbox should initialize and execute the requested command inside the configured workspace permissions.
For example,
Get-ChildItem -Force -Nameshould return the workspace directory contents.Actual behavior
The command fails before PowerShell or the requested executable starts:
Because the failure occurs before process creation, Codex cannot reliably:
Conversational responses and web-based functionality still work.
Bundled executable behavior
During diagnostics, the bundled
rg.exeresolved under a path similar to:Attempting to execute the bundled binary produced an
Access is deniederror.There is no separately installed Codex CLI or local
rg.exein PATH that could cause a version conflict.Regression window
This suggests a Codex Desktop/Windows sandbox regression or a compatibility problem with Windows build
26200.Troubleshooting already completed
The following actions did not resolve the issue:
26.818.41705.26.818.61809.The exact same error persists.
Impact
Severity: Blocker
Codex Desktop can respond conversationally, but it cannot execute local commands or complete normal coding workflows in Normal Sandbox.
I am not willing to switch permanently to a weaker sandbox mode or use
danger-full-accessas a workaround.Related public reports
The following issues appear related:
setup refresh had errorsfailure on Windows build 26200:https://github.com/openai/codex/issues/39933
https://github.com/openai/codex/issues/32184
rg.exereturns Access Denied:https://github.com/openai/codex/issues/13542
rg.execannot execute:https://github.com/openai/codex/issues/18666
The particularly notable similarity is that multiple affected systems use Windows build
26200.Support status
I already:
Additional information
The failure occurs before the requested shell command starts, so it does not appear to be caused by the workspace, repository contents, PowerShell script, or
rgarguments.Please investigate the elevated Windows sandbox setup/refresh path on Windows 11 build
26200, including execution permissions for packaged helper binaries underC:\Program Files\WindowsApps.I can confirm another matching data point.
My affected machine also reports:
OsBuildNumber: 26200
Command used:
Get-ComputerInfo | Select-Object WindowsProductName, WindowsVersion, OsBuildNumber
Result:
WindowsProductName: Windows 10 Home Single Language
WindowsVersion: 2009
OsBuildNumber: 26200
I am using the VS Code Codex/OpenAI extension version 26.818.41705 and I get the exact same error:
helper_unknown_error: setup refresh had errors
The failure occurs before node, npm, git, or other requested processes are started.
So we now have at least two affected environments reporting Windows build 26200 with the same setup-refresh failure.
Update:
I updated the VS Code Codex/OpenAI extension to version 26.818.61809 and restarted the extension host.
After the update, I opened a new Codex conversation and tested only:
node --version
The runner still fails before process creation with:
helper_unknown_error: setup refresh had errors
No command was executed.
My Windows machine reports:
OsBuildNumber: 26200
So the issue still reproduces on:
No files or configuration were modified during this test.
Update: root cause identified and locally repaired
I identified the concrete cause of the following Windows sandbox failure on my machine:
This was not caused by PowerShell, Defender, disabled sandbox accounts, repository contents, or a damaged Codex installation.
Environment
26.818.6180926.818.8289.026200.7171The same failure previously reproduced on these Codex Desktop versions:
26.818.4150926.818.4170526.818.61809Diagnostic evidence
The relevant entries in the local Codex sandbox log were:
This shows that
codex-windows-sandbox-setup.exestarted successfully.The failure occurred later, when the sandbox helper attempted to apply a deny ACE to the repository’s
.gitdirectory.Therefore, this was not an
os error 740or helper-spawn failure.Incorrect ownership state
The repository root was owned by the normal Windows user:
However, the
.gitdirectory and some entries underneath it were owned by the Codex sandbox account:A recursive check found that 32 entries under
.gitwere owned byCodexSandboxOffline.This stale ownership prevented the elevated sandbox helper from applying its required ACL changes.
Local repair
I fully exited Codex Desktop and backed up the existing ACL and ownership information before making any changes.
The following commands were run from an elevated PowerShell window.
Replace the placeholder path with the local repository path:
Back up the existing ACL:
Back up the existing owner of every entry:
I then changed only the owner of entries owned by
CodexSandboxOffline.I did not reset the DACL or grant any additional access rights.
Verification:
Result:
Result after restarting Codex
After restarting Codex Desktop, I kept the elevated sandbox enabled:
I ran three consecutive validation rounds.
All of the following succeeded:
Results:
The original setup-refresh error no longer occurs.
Separate bundled rg.exe issue
After repairing the
.gitownership, the elevated sandbox worked again, but the bundledrg.exeunder the Windows MSIX package still returnedAccess is denied:This appears to be a separate WindowsApps package-execution issue.
I installed a standalone copy of ripgrep in an existing directory that appears earlier in
PATH.After that change:
rg --filesand repository searches worked normally inside the elevated sandbox.I did not modify the permissions or ownership of
C:\Program Files\WindowsApps.Conclusion
On this machine, the setup-refresh failure was caused by stale ownership of part of the repository’s
.gitmetadata:Restoring ownership only for those affected entries fixed the elevated sandbox without:
sandbox = "unelevated"danger-full-accessC:\Program Files\WindowsAppsEveryone: FullControlThis should not be treated as a universal repair without checking the sandbox log first.
The ownership repair is applicable when the sandbox log specifically contains:
Codex should ideally recover safely from stale sandbox-account ownership or report the exact failing path and ACL operation instead of returning only: