Troubleshooting

Windows environments can be quirky. Use these checks before filing an issue—most problems disappear after a few quick commands.

Install fails or cannot find codex-windows

Confirm Node.js 22 is active and npm’s global bin folder is on your PATH.

Execution policy blocks the CLI

If PowerShell refuses to launch Codex because of script restrictions, adjust the policy for the current user:

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

Restart PowerShell afterwards so the policy takes effect.

Antivirus flags the binary

Some antivirus suites quarantine freshly installed Node binaries. Add the npm global directory to your allow list and reinstall. The default path is %AppData%\npm.

VS Build Tools commands do not run

Codex automatically inherits MSVC environment variables if Visual Studio Build Tools or Visual Studio are installed. No developer PowerShell prompt is required.

Sandbox or seatbelt issues

The fork respects the same environment variables as upstream. If you see errors mentioning CODEX_SANDBOX or CODEX_SANDBOX_NETWORK_DISABLED, review the sandbox documentation and adjust the environment before launching Codex.

Resetting local state

If configuration files get into a bad state, remove the Codex cache and start over:

Remove-Item -Recurse -Force "$env:LOCALAPPDATA\codex" -ErrorAction Ignore
Remove-Item -Recurse -Force "$env:USERPROFILE\.codex" -ErrorAction Ignore

Reinstall afterwards with the standard npm command.

Gathering logs for issue reports

Include the following when you open an issue:

Still stuck? Share your findings in a new GitHub issue so we can update the guide for everyone else.