GrepBoard/Manuals
605 manuals ·

Fix Codex Windows "setup refresh had errors" (os error 32)

·Tested on Codex official docs, release notes and issue · 2026-10·Test scope ↓·6 steps

Codex on Windows: setup refresh had errors (os error 32) is a sandbox ACL bug in app 26.1002. Update the app to 26.1007.21434 and the CLI to 0.163.0+.

text
helper_unknown_error: setup refresh had errors

After updating the Windows Codex app to 26.1002.51308 (build 13417), every command fails with this error before it starts. Sandbox setup tried to fix permissions on runtime files Codex itself was using and failed with Windows error 32 (sharing violation). Users reported that updating the app to 26.1007.21434 or later, and the CLI to 0.163.0 or later, cleared it.

[1] Confirm with the log. The log the official docs point to for diagnostics is CODEX_HOME/.sandbox/sandbox.log (by default under %USERPROFILE%\.codex\.sandbox\); in the issue it appeared in a dated file such as sandbox.2026-10-07.log:

text
runtime read/execute validation failed: validate runtime read/execute access onC:\Users\<USER>\AppData\Local\OpenAI\Codex\runtimes\cua_node\2c9e75c4e9c71beb\bin\node_repl.exe:open ACL target for root-only update: The process cannot access the file because it is being used by another process. (os error 32)

trusted Node process exited unexpectedly was reported alongside it for Node REPL. The reporter noted that an error 32 on C:\Users\<USER> followed by continuing setup is not the fatal failure. Several reports say restarting the app or rebooting Windows did not help.

[2] Update the app. In the issue, several users confirmed the fix after moving to 26.1007.21434 (build 13901, Store package 26.1007.2314.0). Check the version on the app's About screen, update from the Microsoft Store, then quit the app completely and reopen it. As of 2026-10 the issue (#51601) is still open, and the fix could not be confirmed in official app release notes.

[3] Update an npm-installed CLI too. The change that avoids sharing violations during runtime ACL repair (#51822) is listed in the Codex CLI 0.163.0 release notes (2026-10-15). In a 10-15 report, the app was already on a fixed version, but codex exec from npm @openai/codex 0.162.1 still hit the same error while the app held the runtime.

console
> codex --version> npm install -g @openai/codex@latest

If codex --version is below 0.163.0, upgrade. The same report says a separate CODEX_HOME does not avoid it, because the runtime lives under AppData\Local\OpenAI\Codex, not under CODEX_HOME.

[4] Only if you cannot update, switch to unelevated temporarily. The official docs let you pick the legacy sandbox implementation in config.toml and suggest unelevated as a temporary fallback where policy permits. Issue comments also report commands running again after this change. Before changing it, note whether config.toml (by default %USERPROFILE%\.codex\config.toml) has a sandbox line under [windows] and what its value is.

toml
[windows]sandbox = "unelevated"

[5] Verify. Run a light command such as Get-Location in a new task and check for exit code 0, and check that no new os error 32 line appears in sandbox.log. On fixed versions, users reported setup refresh finishing with errors=[].

[6] If it persists, send diagnostics. The docs ask for sandbox.log, the implementation in use (mxc, elevated or unelevated), the error message shown, and your Windows build number. An issue comment describes quitting every Codex process and moving the runtimes\cua_node\<hash> folder out of the way, but that means moving files the app uses by hand, so it is not recommended here.

If commands fail to launch in WSL instead, see Fix Codex "Failed to create unified exec process" in WSL. For approval and sandbox modes in general, see Fix Codex CLI approval policy and sandbox settings.

#codex#windows#sandbox#troubleshooting