Codex IDE extension on Windows cannot execute commands: helper_unknown_error: setup refresh had errors

Open 💬 7 comments Opened Aug 21, 2026 by RDevAlarcon
💡 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?

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:

  1. Retried in the existing Codex conversation.
  2. Switched from GPT-5.6 Luna to GPT-5.5.
  3. Created a completely new Codex conversation.
  4. Closed and reopened Visual Studio Code.
  5. Updated the Codex/OpenAI extension.
  6. Closed and reopened Visual Studio Code again after updating.
  7. Rebooted Windows completely.
  8. Created a new Codex conversation after the reboot.
  9. 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?

  1. Open Visual Studio Code on Windows.
  1. Open a local repository.
  1. Open the Codex/OpenAI IDE extension.
  1. Start a new Codex conversation using the Windows native agent environment.
  1. Ask Codex to execute a simple command, for example:

node --version

  1. 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 --version and git status cannot 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.

View original on GitHub ↗

7 Comments

github-actions[bot] contributor · 6 days ago

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

  • #39841
  • #39697
  • #38898

Powered by Codex Action

RDevAlarcon · 6 days ago

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.

RDevAlarcon · 5 days ago

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.

ssh555 · 4 days ago

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:

helper_unknown_error: setup refresh had errors

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:

  • Powered by Codex & OWL 26.818.41509
  • Powered by Codex & OWL 26.818.41705
  • Powered by Codex & OWL 26.818.61809

Reproduction rate: 100%

Environment

  • Product: Codex Desktop for Windows
  • Install source: Microsoft Store
  • Architecture: x64
  • Windows edition: Windows 11 Home
  • Windows version: 25H2
  • OS Build: 26200.7171
  • Display language: Chinese
  • Timezone: Asia/Shanghai / UTC+8

Windows was not updated or reconfigured between the last known good date and the first failure.

Sandbox configuration

C:\Users\<username>\.codex\config.toml contains:

[windows]
sandbox = "elevated"

I am keeping elevated because it is the recommended Windows sandbox mode.

Minimal reproduction steps

  1. Start Codex Desktop on Windows.
  2. Open an existing local workspace.
  3. Start a Codex task using Normal Sandbox.
  4. Ask Codex to execute any harmless local command, for example:
Get-ChildItem -Force -Name

Alternatively:

Get-Location

or:

rg --version
  1. Observe that the requested process never starts.

Expected behavior

The elevated sandbox should initialize and execute the requested command inside the configured workspace permissions.

For example, Get-ChildItem -Force -Name should return the workspace directory contents.

Actual behavior

The command fails before PowerShell or the requested executable starts:

helper_unknown_error: setup refresh had errors

Because the failure occurs before process creation, Codex cannot reliably:

  • Inspect the local repository
  • Search files
  • Execute PowerShell commands
  • Run Git commands
  • Build the solution
  • Run tests
  • Perform normal implementation or refactoring workflows

Conversational responses and web-based functionality still work.

Bundled executable behavior

During diagnostics, the bundled rg.exe resolved under a path similar to:

C:\Program Files\WindowsApps\OpenAI.Codex_<version>_x64__2p2nqsd0c76g0\app\resources\rg.exe

Attempting to execute the bundled binary produced an Access is denied error.

There is no separately installed Codex CLI or local rg.exe in PATH that could cause a version conflict.

Regression window

  • Last known good date: Friday, August 21, 2026
  • First observed failure: August 24, 2026
  • Windows was not updated during this period.
  • The same computer, Windows installation, workspace, and sandbox configuration worked before the Codex Desktop update.

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:

  1. Fully exited and restarted Codex Desktop.
  2. Restarted Windows.
  3. Used Windows Settings → Apps → Codex → Repair.
  4. Used Windows Settings → Apps → Codex → Reset.
  5. Uninstalled and reinstalled Codex Desktop from Microsoft Store.
  6. Verified that no separately installed Codex CLI exists in PATH.
  7. Restored and retained the recommended configuration:
[windows]
sandbox = "elevated"
  1. Retested after updating to 26.818.41705.
  2. Retested after updating to 26.818.61809.
  3. Repeated the test with harmless read-only commands.

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-access as a workaround.

Related public reports

The following issues appear related:

  • Exact setup refresh had errors failure on Windows build 26200:

https://github.com/openai/codex/issues/39933

  • Windows app sandbox cannot execute child processes:

https://github.com/openai/codex/issues/32184

  • Bundled rg.exe returns Access Denied:

https://github.com/openai/codex/issues/13542

  • Windows desktop bundled rg.exe cannot 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:

  • Submitted feedback through Codex Desktop → Help → Feedback.
  • Opened an OpenAI Support request.
  • Had the request escalated to a support specialist for technical triage.

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 rg arguments.

Please investigate the elevated Windows sandbox setup/refresh path on Windows 11 build 26200, including execution permissions for packaged helper binaries under C:\Program Files\WindowsApps.

RDevAlarcon · 3 days ago

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.

RDevAlarcon · 3 days ago

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:

  • VS Code extension 26.818.61809
  • Windows build 26200

No files or configuration were modified during this test.

ssh555 · 3 days ago

Update: root cause identified and locally repaired

I identified the concrete cause of the following Windows sandbox failure on my machine:

helper_unknown_error: setup refresh had errors

This was not caused by PowerShell, Defender, disabled sandbox accounts, repository contents, or a damaged Codex installation.

Environment

  • Codex Desktop: 26.818.61809
  • Windows MSIX package: 26.818.8289.0
  • Windows 11 Home 25H2
  • OS Build: 26200.7171
  • Sandbox configuration:
[windows]
sandbox = "elevated"

The same failure previously reproduced on these Codex Desktop versions:

  • 26.818.41509
  • 26.818.41705
  • 26.818.61809

Diagnostic evidence

The relevant entries in the local Codex sandbox log were:

deny ACE failed on <repository>\.git:
SetNamedSecurityInfoW failed for <repository>\.git: 5

setup refresh completed with errors:
["deny ACE failed on <repository>\\.git:
SetNamedSecurityInfoW failed for <repository>\\.git: 5"]

setup error: setup refresh had errors

This shows that codex-windows-sandbox-setup.exe started successfully.

The failure occurred later, when the sandbox helper attempted to apply a deny ACE to the repository’s .git directory.

Therefore, this was not an os error 740 or helper-spawn failure.

Incorrect ownership state

The repository root was owned by the normal Windows user:

<repository>
Owner: <computer>\<user>

However, the .git directory and some entries underneath it were owned by the Codex sandbox account:

<repository>\.git
Owner: <computer>\CodexSandboxOffline

A recursive check found that 32 entries under .git were owned by CodexSandboxOffline.

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:

$repo = 'C:\path\to\repository'
$gitDir = Join-Path $repo '.git'
$backupDir = Join-Path $repo '.codex-tmp\git-acl-repair'

New-Item -ItemType Directory -Force -Path $backupDir | Out-Null

Back up the existing ACL:

$aclBackup = Join-Path $backupDir 'git-acl-before.txt'
icacls $gitDir /save $aclBackup /t /c /q

Back up the existing owner of every entry:

$ownerBackup = Join-Path $backupDir 'git-owners-before.csv'

$items = @(
    Get-Item -Force -LiteralPath $gitDir
    Get-ChildItem -Force -LiteralPath $gitDir -Recurse
)

$items |
    ForEach-Object {
        [pscustomobject]@{
            Path  = $_.FullName
            Owner = (Get-Acl -LiteralPath $_.FullName).Owner
        }
    } |
    Export-Csv -LiteralPath $ownerBackup `
        -NoTypeInformation `
        -Encoding UTF8

I then changed only the owner of entries owned by CodexSandboxOffline.

I did not reset the DACL or grant any additional access rights.

$badOwner = "$env:COMPUTERNAME\CodexSandboxOffline"

$newOwner = [System.Security.Principal.NTAccount]::new(
    $env:USERDOMAIN,
    $env:USERNAME
)

$affected = $items | Where-Object {
    (Get-Acl -LiteralPath $_.FullName).Owner -eq $badOwner
}

foreach ($item in $affected) {
    $acl = Get-Acl -LiteralPath $item.FullName
    $acl.SetOwner($newOwner)
    Set-Acl -LiteralPath $item.FullName -AclObject $acl
}

Verification:

$itemsAfter = @(
    Get-Item -Force -LiteralPath $gitDir
    Get-ChildItem -Force -LiteralPath $gitDir -Recurse
)

$remaining = $itemsAfter | Where-Object {
    (Get-Acl -LiteralPath $_.FullName).Owner -eq $badOwner
}

"Remaining CodexSandboxOffline owners: $($remaining.Count)"
(Get-Acl -LiteralPath $gitDir).Owner

Result:

Remaining CodexSandboxOffline owners: 0
.git owner: <computer>\<user>

Result after restarting Codex

After restarting Codex Desktop, I kept the elevated sandbox enabled:

[windows]
sandbox = "elevated"

I ran three consecutive validation rounds.

All of the following succeeded:

  • PowerShell process creation
  • Workspace directory listing
  • File reading
  • Text searching
  • Git repository access
  • Release build
  • Test execution

Results:

Build succeeded
0 errors

Tests passed: 371
Tests failed: 0

The original setup-refresh error no longer occurs.

Separate bundled rg.exe issue

After repairing the .git ownership, the elevated sandbox worked again, but the bundled rg.exe under the Windows MSIX package still returned Access is denied:

C:\Program Files\WindowsApps\OpenAI.Codex_<version>_x64__<publisher>\
app\resources\rg.exe

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:

ripgrep 15.2.0

rg --files and 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 .git metadata:

Owner: CodexSandboxOffline

Restoring ownership only for those affected entries fixed the elevated sandbox without:

  • switching to sandbox = "unelevated"
  • using danger-full-access
  • disabling Defender
  • weakening firewall rules
  • modifying C:\Program Files\WindowsApps
  • granting Everyone: FullControl
  • resetting the complete repository ACL

This 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:

deny ACE failed on <repository>\.git
SetNamedSecurityInfoW failed: 5

Codex should ideally recover safely from stale sandbox-account ownership or report the exact failing path and ACL operation instead of returning only:

helper_unknown_error: setup refresh had errors