Yes, Codex runs on Windows: install the ChatGPT desktop app for Windows and Codex works natively in PowerShell inside a Windows sandbox, with no Linux setup needed. You can switch the agent to run in WSL2 instead, but for most people the native app with Ask for approval switched on is the simpler, safer choice.
On Windows the app supports worktrees, scheduled tasks, Git, the built-in browser, file previews, plugins and skills. For a general tour, see my ChatGPT desktop app guide. This page is the Windows-specific part: setup, sandbox modes, and the two errors that trip people up.
Install and first run
Download the ChatGPT desktop app for Windows from the Microsoft Store listing OpenAI links to, or install it from the command line:
Install from PowerShell
winget install --id 9PLM9XGG6VKS -s msstore
Then, as of October 2026:
- Open the app and sign in with your ChatGPT account.
- Add a project folder, ideally one stored on your normal Windows drive.
- Before you send your first message, select Ask for approval beneath the composer. That's what applies the sandbox protections.
- If the app shows the Windows sandbox setup prompt above the composer, follow it.
- Install Git if you haven't already. It powers the review panel, where you inspect or revert Codex's changes, and without it some features don't work.
OpenAI also lists Node.js, Python, the .NET SDK and GitHub CLI as tools Codex works best with. Each one installs with a single winget line, or you can ask Codex to install them. After GitHub CLI, run gh auth login to switch on the GitHub features. If you're new to Codex itself, my beginner walkthrough covers what to ask it.
The three sandbox modes, decoded
The sandbox is the fence around what Codex can touch: which folders it can read or write, and whether it can reach the network. Codex supports three Windows versions of it:
| Sandbox | What it means | Who it's for |
|---|---|---|
| mxc | Native process isolation. No administrator-approved setup, no extra Windows accounts, no local firewall rules. | Recommended on compatible devices. The app prefers it automatically for consumer accounts when the device supports it. |
| elevated | Uses dedicated lower-privilege sandbox users, filesystem boundaries and firewall rules. Needs administrator-approved setup, but commands run without administrator privileges. | The preferred fallback when MXC isn't available or is switched off. |
| unelevated | Runs commands with a restricted token based on your own user. Weaker network isolation, and no denied read paths. | A last resort when administrator setup is blocked and company policy allows it. |
MXC needs Microsoft Execution Containers, which Microsoft introduced in Windows 11 24H2 (build 26100.9278) and 25H2 (build 26200.9278). With Codex CLI 0.162.0 or later there's a one-command test that should print MXC_OK with exit code 0. OpenAI's version table lists Windows 11 as recommended, recent fully updated Windows 10 as best effort, and older Windows 10 builds as not recommended. IT teams rolling Codex out to many machines have a separate Windows deployment guide.
Native agent or WSL2
By default the app uses the Windows-native agent, which runs commands in PowerShell. OpenAI suggests WSL2 when you need Linux-native tooling, your repositories already live in WSL2, or the native sandboxes don't meet your needs. To switch, open Settings, change the agent from Windows native to WSL, and restart the app; the change doesn't take effect until you do.
If you don't have WSL yet, install it from PowerShell opened as an administrator:
Install WSL from an administrator PowerShell
wsl --install
One version note: WSL1 was supported through Codex 0.114. From Codex 0.115 the Linux sandbox moved to bubblewrap, so WSL1 isn't supported any more. If you're on WSL1, your choice is WSL2 or the native app. The agent and the integrated terminal are separate choices, too: you can run the agent natively and still pick WSL, Git Bash, Command Prompt or PowerShell for the terminal, which only changes new terminal sessions.
Keeping project files in the right place
Where your files live matters more than people expect:
Want AI doing the heavy lifting in your marketing?
I build the systems that handle the boring 80 percent, so you get your week back. Done properly, with the human kept in.
- Using the native agent? Keep projects on your Windows drive and reach them from WSL through the /mnt path. OpenAI calls this more reliable than opening projects straight from the WSL filesystem, and it's also the workaround when Git isn't detected for a project opened through the WSL network share.
- Working in WSL2? Keep repositories under your Linux home folder, not under /mnt/c, for faster file access and fewer symlink and permission problems.
- Adding a WSL project to the app? Select Add new project, type the WSL network share address into the File Explorer window, then pick your Linux distribution and folder.
Two errors you'll probably meet
Scripts are disabled. If you've never run Node.js or npm in PowerShell, you may see an error saying npm.ps1 cannot be loaded because running scripts is disabled on this system. OpenAI's suggested fix is setting PowerShell's execution policy to RemoteSigned. That's a system security setting, so read Microsoft's execution policy guide before you change it, and on a work laptop check with IT first.
The command OpenAI suggests
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
A command needs administrator rights. Codex inherits the app's permission level, so start the app itself with Run as administrator from the Start menu. I'd only do that for the job that needs it, then go back to a normal launch.
Leave the safety switch on
OpenAI's warning is worth repeating in plain words: running Codex in full access mode means it isn't limited to your project folder and might perform unintentional destructive actions that can lead to data loss. Keep the sandbox boundaries in place and make targeted exceptions with rules instead of switching protection off.
My verdict: I'd stay on the native app with Ask for approval on, and skip WSL unless your project already lives there. If you're still choosing a coding agent, I've put Codex and Cursor side by side.
If your team is rolling Codex out across Windows laptops and wants the safety settings right from day one, that's the kind of AI enablement I help with. I run AI training and workshops for teams, and help businesses with AI enablement and workflow automation, so the busywork runs itself and people get time back. Most of that work is with SaaS marketing teams and small businesses. Here's how we can work together.
Frequently asked questions
Does Codex work on Windows?
Yes. The ChatGPT desktop app for Windows runs Codex natively in PowerShell with a Windows sandbox, or you can configure the agent to run in WSL2.
How do I install Codex on Windows?
Download the ChatGPT desktop app for Windows, or run winget install --id 9PLM9XGG6VKS -s msstore in PowerShell.
Do I need WSL to use Codex on Windows?
No. The app uses the Windows-native agent by default. Choose WSL2 when you need Linux-native tooling or your repositories already live there.
Does Codex support WSL1?
No. WSL1 was supported through Codex 0.114. From 0.115 the Linux sandbox moved to bubblewrap, so WSL1 is no longer supported.
How do I fix the running scripts is disabled error in Codex?
OpenAI suggests setting the PowerShell execution policy to RemoteSigned. Read Microsoft's execution policy guide first, because it's a system setting.


