codex - 💡(How to fix) Fix Windows elevated sandbox setup helper shows “The parameter is incorrect” even with clean CODEX_HOME and short ASCII npm path; unelevated works

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

Observed console error: and the same console error: and the same console error: 2. return a clear actionable error explaining which Windows policy, argument, path, or setup precondition is invalid.

Fix Action

Workaround

Use:

[windows]
sandbox = "unelevated"

unelevated mode works. I am not using danger-full-access.

Code Example

codex-windows-sandbox-setup.exe

---

参数错误。

---

windows sandbox failed: orchestrator_helper_launch_canceled: ShellExecuteExW failed to launch setup helper: 1223

---

OS: Windows 11 x64
Codex CLI: 0.133.0
Codex App: 26.519.5221.0
Node/npm install method: npm global install

---

npm uninstall -g @openai/codex

New-Item -ItemType Directory -Force C:\npm-global | Out-Null
npm config set prefix C:\npm-global

$oldUserPath = [Environment]::GetEnvironmentVariable("Path", "User")
if ($oldUserPath -notlike "*C:\npm-global*") {
  [Environment]::SetEnvironmentVariable("Path", "$oldUserPath;C:\npm-global", "User")
}

$env:Path = "$env:Path;C:\npm-global"

npm install -g @openai/codex@latest
C:\npm-global\codex.cmd --version

---

codex-cli 0.133.0

---

C:\npm-global\codex.cmd -c windows.sandbox="unelevated" sandbox windows cmd /c echo SHORT_PATH_UNELEVATED_OK

---

SHORT_PATH_UNELEVATED_OK

---

C:\npm-global\codex.cmd -c windows.sandbox="elevated" sandbox windows cmd /c echo SHORT_PATH_ELEVATED_OK

---

codex-windows-sandbox-setup.exe
参数错误。

---

windows sandbox failed: orchestrator_helper_launch_canceled: ShellExecuteExW failed to launch setup helper: 1223

---

$oldHome = $env:CODEX_HOME
$env:CODEX_HOME = "C:\CodexHomeDiag"

New-Item -ItemType Directory -Force "C:\CodexHomeDiag" | Out-Null
New-Item -ItemType Directory -Force "C:\CodexDiag" | Out-Null
Set-Location "C:\CodexDiag"

@'
model = "gpt-5.5"
sandbox_mode = "workspace-write"
approval_policy = "on-request"

[windows]
sandbox = "unelevated"
'@ | Set-Content -Encoding UTF8 "C:\CodexHomeDiag\config.toml"

codex -c windows.sandbox="unelevated" sandbox windows cmd /c echo FORCED_UNELEVATED_OK
codex -c windows.sandbox="elevated" sandbox windows cmd /c echo FORCED_ELEVATED_OK

if ($oldHome) {
  $env:CODEX_HOME = $oldHome
} else {
  Remove-Item Env:CODEX_HOME -ErrorAction SilentlyContinue
}

---

FORCED_UNELEVATED_OK

---

codex-windows-sandbox-setup.exe
参数错误。

---

orchestrator_helper_launch_canceled: ShellExecuteExW failed to launch setup helper: 1223

---

codex -c windows.sandbox="elevated" -c windows.sandbox_private_desktop=false sandbox windows cmd /c echo ELEVATED_NO_PRIVATE_DESKTOP_OK

---

codex-windows-sandbox-setup.exe
参数错误。

---

windows sandbox failed: orchestrator_helper_launch_canceled: ShellExecuteExW failed to launch setup helper: 1223

---

Start-Process powershell.exe -Verb RunAs -ArgumentList '-NoProfile -Command "Write-Host UAC_OK; pause"'

---

reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA
reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v ConsentPromptBehaviorAdmin
reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v ValidateAdminCodeSignatures

---

EnableLUA = 0x1
ValidateAdminCodeSignatures = 0x0

---

npm uninstall -g @openai/codex

New-Item -ItemType Directory -Force C:\npm-global | Out-Null
npm config set prefix C:\npm-global

$oldUserPath = [Environment]::GetEnvironmentVariable("Path", "User")
if ($oldUserPath -notlike "*C:\npm-global*") {
  [Environment]::SetEnvironmentVariable("Path", "$oldUserPath;C:\npm-global", "User")
}

$env:Path = "$env:Path;C:\npm-global"

npm install -g @openai/codex@latest
C:\npm-global\codex.cmd --version

---

codex-cli 0.133.0

---

C:\npm-global\codex.cmd -c windows.sandbox="unelevated" sandbox windows cmd /c echo SHORT_PATH_UNELEVATED_OK

---

SHORT_PATH_UNELEVATED_OK

---

C:\npm-global\codex.cmd -c windows.sandbox="elevated" sandbox windows cmd /c echo SHORT_PATH_ELEVATED_OK

---

C:\npm-global\node_modules\@openai\codex\...\codex-windows-sandbox-setup.exe

---

参数错误。

---

windows sandbox failed: orchestrator_helper_launch_canceled: ShellExecuteExW failed to launch setup helper: 1223

---

$oldHome = $env:CODEX_HOME
$env:CODEX_HOME = "C:\CodexHomeDiag"

New-Item -ItemType Directory -Force "C:\CodexHomeDiag" | Out-Null
New-Item -ItemType Directory -Force "C:\CodexDiag" | Out-Null
Set-Location "C:\CodexDiag"

@'
model = "gpt-5.5"
sandbox_mode = "workspace-write"
approval_policy = "on-request"

[windows]
sandbox = "unelevated"
'@ | Set-Content -Encoding UTF8 "C:\CodexHomeDiag\config.toml"

codex -c windows.sandbox="unelevated" sandbox windows cmd /c echo FORCED_UNELEVATED_OK
codex -c windows.sandbox="elevated" sandbox windows cmd /c echo FORCED_ELEVATED_OK

if ($oldHome) {
  $env:CODEX_HOME = $oldHome
} else {
  Remove-Item Env:CODEX_HOME -ErrorAction SilentlyContinue
}

---

FORCED_UNELEVATED_OK

---

codex-windows-sandbox-setup.exe
参数错误。

---

orchestrator_helper_launch_canceled: ShellExecuteExW failed to launch setup helper: 1223

---

codex -c windows.sandbox="elevated" -c windows.sandbox_private_desktop=false sandbox windows cmd /c echo ELEVATED_NO_PRIVATE_DESKTOP_OK

---

参数错误。

---

windows sandbox failed: orchestrator_helper_launch_canceled: ShellExecuteExW failed to launch setup helper: 1223

---

Start-Process powershell.exe -Verb RunAs -ArgumentList '-NoProfile -Command "Write-Host UAC_OK; pause"'

---

reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA
reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v ValidateAdminCodeSignatures

---

EnableLUA = 0x1
ValidateAdminCodeSignatures = 0x0

---

SHORT_PATH_ELEVATED_OK

---

参数错误。

---

ShellExecuteExW failed to launch setup helper: 1223

---

[windows]
sandbox = "unelevated"
RAW_BUFFERClick to expand / collapse

What version of the Codex App are you using (From “About Codex” dialog)?

26.519.41501

What subscription do you have?

Plus

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

What issue are you seeing?

On native Windows 11, Codex Windows sandbox works in unelevated mode but fails in elevated mode before the requested command runs.

The elevated failure opens a Windows dialog from:

codex-windows-sandbox-setup.exe

The visible dialog message is:

参数错误。

English equivalent: “The parameter is incorrect.”

The console then reports:

windows sandbox failed: orchestrator_helper_launch_canceled: ShellExecuteExW failed to launch setup helper: 1223

This happens even with:

  • a clean short CODEX_HOME
  • a clean short working directory
  • a short ASCII npm global prefix (C:\npm-global)
  • UAC working normally
  • ValidateAdminCodeSignatures=0
  • windows.sandbox_private_desktop=false

unelevated mode succeeds from the same environment.

Versions

OS: Windows 11 x64
Codex CLI: 0.133.0
Codex App: 26.519.5221.0
Node/npm install method: npm global install

Related issues

This appears related to:

  • Windows sandbox setup helper launch fails with ShellExecuteExW failed to launch setup helper: 1223
  • Windows elevated sandbox fails while unelevated succeeds on Codex CLI 0.133.0

Reproduction steps

1. Verify short ASCII npm global prefix

npm uninstall -g @openai/codex

New-Item -ItemType Directory -Force C:\npm-global | Out-Null
npm config set prefix C:\npm-global

$oldUserPath = [Environment]::GetEnvironmentVariable("Path", "User")
if ($oldUserPath -notlike "*C:\npm-global*") {
  [Environment]::SetEnvironmentVariable("Path", "$oldUserPath;C:\npm-global", "User")
}

$env:Path = "$env:Path;C:\npm-global"

npm install -g @openai/codex@latest
C:\npm-global\codex.cmd --version

Observed:

codex-cli 0.133.0

2. Unelevated sandbox succeeds

C:\npm-global\codex.cmd -c windows.sandbox="unelevated" sandbox windows cmd /c echo SHORT_PATH_UNELEVATED_OK

Observed:

SHORT_PATH_UNELEVATED_OK

3. Elevated sandbox fails

C:\npm-global\codex.cmd -c windows.sandbox="elevated" sandbox windows cmd /c echo SHORT_PATH_ELEVATED_OK

Observed visible Windows dialog:

codex-windows-sandbox-setup.exe
参数错误。

Observed console error:

windows sandbox failed: orchestrator_helper_launch_canceled: ShellExecuteExW failed to launch setup helper: 1223

4. Clean CODEX_HOME also reproduces elevated failure

$oldHome = $env:CODEX_HOME
$env:CODEX_HOME = "C:\CodexHomeDiag"

New-Item -ItemType Directory -Force "C:\CodexHomeDiag" | Out-Null
New-Item -ItemType Directory -Force "C:\CodexDiag" | Out-Null
Set-Location "C:\CodexDiag"

@'
model = "gpt-5.5"
sandbox_mode = "workspace-write"
approval_policy = "on-request"

[windows]
sandbox = "unelevated"
'@ | Set-Content -Encoding UTF8 "C:\CodexHomeDiag\config.toml"

codex -c windows.sandbox="unelevated" sandbox windows cmd /c echo FORCED_UNELEVATED_OK
codex -c windows.sandbox="elevated" sandbox windows cmd /c echo FORCED_ELEVATED_OK

if ($oldHome) {
  $env:CODEX_HOME = $oldHome
} else {
  Remove-Item Env:CODEX_HOME -ErrorAction SilentlyContinue
}

Observed:

FORCED_UNELEVATED_OK

Then elevated fails with the same visible dialog:

codex-windows-sandbox-setup.exe
参数错误。

and the same console error:

orchestrator_helper_launch_canceled: ShellExecuteExW failed to launch setup helper: 1223

5. sandbox_private_desktop=false also fails

codex -c windows.sandbox="elevated" -c windows.sandbox_private_desktop=false sandbox windows cmd /c echo ELEVATED_NO_PRIVATE_DESKTOP_OK

Observed:

codex-windows-sandbox-setup.exe
参数错误。

and:

windows sandbox failed: orchestrator_helper_launch_canceled: ShellExecuteExW failed to launch setup helper: 1223

UAC / Windows policy checks

Start-Process -Verb RunAs works and successfully opens an elevated PowerShell:

Start-Process powershell.exe -Verb RunAs -ArgumentList '-NoProfile -Command "Write-Host UAC_OK; pause"'

Registry checks:

reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA
reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v ConsentPromptBehaviorAdmin
reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v ValidateAdminCodeSignatures

Observed:

EnableLUA = 0x1
ValidateAdminCodeSignatures = 0x0

ValidateAdminCodeSignatures=0 rules out the UAC policy that requires interactive elevation executables to pass PKI signature validation.

What steps can reproduce the bug?

  1. On Windows 11 x64, install Codex CLI 0.133.0 with npm.

  2. Move the npm global prefix to a short ASCII-only path to rule out long path or non-ASCII username issues:

npm uninstall -g @openai/codex

New-Item -ItemType Directory -Force C:\npm-global | Out-Null
npm config set prefix C:\npm-global

$oldUserPath = [Environment]::GetEnvironmentVariable("Path", "User")
if ($oldUserPath -notlike "*C:\npm-global*") {
  [Environment]::SetEnvironmentVariable("Path", "$oldUserPath;C:\npm-global", "User")
}

$env:Path = "$env:Path;C:\npm-global"

npm install -g @openai/codex@latest
C:\npm-global\codex.cmd --version

Observed version:

codex-cli 0.133.0
  1. Run the same trivial command in unelevated Windows sandbox mode:
C:\npm-global\codex.cmd -c windows.sandbox="unelevated" sandbox windows cmd /c echo SHORT_PATH_UNELEVATED_OK

Observed result:

SHORT_PATH_UNELEVATED_OK
  1. Run the same trivial command in elevated Windows sandbox mode:
C:\npm-global\codex.cmd -c windows.sandbox="elevated" sandbox windows cmd /c echo SHORT_PATH_ELEVATED_OK

Observed result:

A Windows dialog appears from:

C:\npm-global\node_modules\@openai\codex\...\codex-windows-sandbox-setup.exe

The dialog message is:

参数错误。

English equivalent: “The parameter is incorrect.”

The console then reports:

windows sandbox failed: orchestrator_helper_launch_canceled: ShellExecuteExW failed to launch setup helper: 1223
  1. Also tested with a clean short CODEX_HOME and clean working directory:
$oldHome = $env:CODEX_HOME
$env:CODEX_HOME = "C:\CodexHomeDiag"

New-Item -ItemType Directory -Force "C:\CodexHomeDiag" | Out-Null
New-Item -ItemType Directory -Force "C:\CodexDiag" | Out-Null
Set-Location "C:\CodexDiag"

@'
model = "gpt-5.5"
sandbox_mode = "workspace-write"
approval_policy = "on-request"

[windows]
sandbox = "unelevated"
'@ | Set-Content -Encoding UTF8 "C:\CodexHomeDiag\config.toml"

codex -c windows.sandbox="unelevated" sandbox windows cmd /c echo FORCED_UNELEVATED_OK
codex -c windows.sandbox="elevated" sandbox windows cmd /c echo FORCED_ELEVATED_OK

if ($oldHome) {
  $env:CODEX_HOME = $oldHome
} else {
  Remove-Item Env:CODEX_HOME -ErrorAction SilentlyContinue
}

Observed result:

FORCED_UNELEVATED_OK

Then elevated mode fails with the same visible dialog:

codex-windows-sandbox-setup.exe
参数错误。

and the same console error:

orchestrator_helper_launch_canceled: ShellExecuteExW failed to launch setup helper: 1223
  1. Also tested with private desktop disabled:
codex -c windows.sandbox="elevated" -c windows.sandbox_private_desktop=false sandbox windows cmd /c echo ELEVATED_NO_PRIVATE_DESKTOP_OK

Observed result:

The same codex-windows-sandbox-setup.exe dialog appears:

参数错误。

and the console reports:

windows sandbox failed: orchestrator_helper_launch_canceled: ShellExecuteExW failed to launch setup helper: 1223
  1. UAC itself appears to work. This command successfully opens an elevated PowerShell:
Start-Process powershell.exe -Verb RunAs -ArgumentList '-NoProfile -Command "Write-Host UAC_OK; pause"'

Registry checks:

reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA
reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v ValidateAdminCodeSignatures

Observed:

EnableLUA = 0x1
ValidateAdminCodeSignatures = 0x0

What is the expected behavior?

The elevated Windows sandbox should either:

  1. successfully launch codex-windows-sandbox-setup.exe and run the command, printing:
SHORT_PATH_ELEVATED_OK

or

  1. return a clear actionable error explaining which Windows policy, argument, path, or setup precondition is invalid.

Actual behavior

Elevated mode fails before executing even a trivial command. The setup helper dialog says:

参数错误。

Then Codex reports:

ShellExecuteExW failed to launch setup helper: 1223

Workaround

Use:

[windows]
sandbox = "unelevated"

unelevated mode works. I am not using danger-full-access.

Additional information

No response

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix Windows elevated sandbox setup helper shows “The parameter is incorrect” even with clean CODEX_HOME and short ASCII npm path; unelevated works