Description
What version of Codex CLI is running?
0.101.0
What subscription do you have?
Bring Your Own Key
Which model were you using?
gpt-5.2-codex
What platform is your computer?
Windows 11 Pro
What terminal emulator and version are you using (if applicable)?
PowerShell
What issue are you seeing?
On Windows 11, Codex’s experimental sandbox creates two local users (CodexSandboxOffline and CodexSandboxOnline) that belong to the CodexSandboxUsers group.
These users are granted permissions on the project folders (and subfolders) where Codex-CLI is executed.
While this is understandable (the goal is to add an extra security layer when running commands), what I find unacceptable is that these users are also granted access to C:\Users\<USER> and—indiscriminately—to ALL subfolders under that directory. Aside from the fact that this approach dirties the environment (after uninstalling codex-cli and removing the Windows users, stale/unreferenced user SIDs can still remain on ACLs), it looks like a potential attack surface in the event of malicious commands executed via codex-cli.
The same behavior can be observed when using the IDE extension (which effectively downloads precompiled Windows binaries, but ultimately codex-windows-sandbox.exe mirrors the same behavior).
Other than using WSL, is there any way to avoid this pollution? And why isn’t this explicitly stated in the documentation? (It wouldn’t fix the issue, but at least users would be aware of it.)
What steps can reproduce the bug?
Install codex-cli on Windows and choose to setup the default sandbox when asked.
What is the expected behavior?
No response
Additional information
No response
Activity
rayjasson98 commentedon Feb 27, 2026
It might also pollute your SSH configuration in
~/.ssh, as mentioned here: #12226686d7066 commentedon Mar 6, 2026
I just noticed the same problem. I have Windows 11 Controlled Folder Access active, meaning every application trying to access my user folder needs to be given explicit permission to do so.
I just installed the latest Codex extension for VS Code and started a conversation about reading and understanding the code of a simple test project and am getting absolutely swamped by Windows Notification about how Codex tries to access all kinds of files in my user directory, causing a new security notification every 2-3 seconds.
Why is it constantly trying to access my favorites? What is its deal trying to access my documents? The simple task I have given it does not warrant the try to read through my personal profile at all.
I see no reason why it should have any business inside my user profile at all.
debovis commentedon Mar 9, 2026
I am having the same problem as 686d7066, IT messaged me pretty quickly.
JackTrapper commentedon Mar 18, 2026
Two other issues where Codex granted itself NTFS permissions:
In my case it added CodexSandboxOffline (or CodexSandboxOnline; i didn't realize there were two) to
D:\.And it removed all other ACLs that were present (blocking all users from the
D:drive).mvdbosch commentedon Mar 18, 2026
I noticed the same and got swamped by security warnings. This is really ugly and dangerous behaviour.
PatentiaPistorius commentedon Mar 23, 2026
How has no one from Open AI replied to this? How is this still an ongoing issue? This also affects VSCode Codex extension users.
Does anyone know how to broadly and easily remove the ACL permissions for CodexSandboxUsers? Why the hell does Codex need read access for basically my entire computer?
Seems like a massive invasion of privacy and a serious screw up that Codex now has read access to basically my whole computer. And the weirdest thing is, I never had any issues before using Codex with VSCode, it was restricted to the project folder, it worked fine, and there was no invasive privacy problems. Then I was forced to accept this sandbox option 2-3 weeks ago and not only did it break functionality, it seems it's also a major privacy invasion whether intentional or not.
JackTrapper commentedon Mar 23, 2026
In my case it was correctly getting access denied. So it probably ran a powershell script call to
icaclsto try to resolve it. I assume it was running as me; who hasWRITE_DACLpermission on theD:\folder. I didn't notice any such call. And when i asked it to review the chat conversataion: it couldn't find any call either.In order to protect against this, i removed my
WRITE_DACLpermission fromD:\.wmcbtech30 commentedon Apr 3, 2026
I got hit by this issue after trying to SSH using private key but gave me an error to remove the SID first that has access to my SSH private key, that SID is associated to Codex users and I'm as surprised it assigned to every directory even AppData with Codex SIDs
I think I managed to resolve this though not sure if this is the broad solution, by removing two users from lusrmgr (for Windows Pro, home must use net comamnd) then on the user profile directory, on file explorer you need to click Give Access To > "Remove Access" which would take time
I believe you can also do this via icacls command though I don't fully use it
IMO unprivileged sandbox is more than enough, or just use WSL2
rwalle commentedon Apr 8, 2026
My biggest issue is that the modifications to user system are invasive but very poorly documented.
The Windows page only says,
IT cannot possibly make decisions just based on this sentence alone.
Fortunately, codex is open source, and I figured out what
codex-command-runner.exedoes (implemented incodex-rs/windows-sandbox-rs) and was able to provide more details for IT to review. But the fact that this process is opaque is very concerning.P.S. Plus there is no easy way to undo all of this, it seems.
I created a GitHub Gist that lists all changes to user system. I was not able to verify every detail but could confirm some of the most impactful changes.
iceweasel-oai commentedon Apr 8, 2026
thanks for reporting this. For now we likely won't change this, but if it bothers you for the codex sandbox users to have broad read access, you can change your sandbox (in
config.toml) toand remove the ACLs. The
unelevatedsandbox will not recreate them.seh-len commentedon Apr 18, 2026
This response misses the point entirely.
The problem is not that “Codex sandbox users have broad read access” and that this might merely “bother” someone. The real issue is that Codex appears to modify ACLs in a way that can break unrelated third-party applications on Windows, and that those effects can persist even after Codex has been uninstalled.
In my case, this was not theoretical and not cosmetic:
That is a serious regression, not a matter of preference about Codex having read access.
Saying “we likely won't change this” and suggesting users switch to
sandbox = "unelevated"is not an acceptable answer to a bug report like this. Users should not have to weaken or reconfigure sandboxing, manually inspect ACLs across their user profile, and repair broken third-party applications after installing or uninstalling a developer tool.Even worse, this is not limited to Codex being installed. The damage can remain after uninstall, which makes it substantially more severe. A tool must not leave behind deeply inherited ACL changes in sensitive per-user paths if those changes can interfere with Electron apps, browser DRM, or other software that relies on sandboxed subprocesses.
This needs to be treated as an actual Windows bug:
Right now, the response reads as though the issue is being dismissed as a minor annoyance. It is not. Breaking unrelated applications and DRM playback on a user system is an absolute no-go.
wmcbtech30 commentedon Apr 19, 2026
joshleblanc commentedon Apr 20, 2026
Just popping in to mention that this particular feature breaks windows built in ssh client, as it introduces bad permissions on ~/.ssh/config
686d7066 commentedon Apr 20, 2026
Man, reading all this I feel lucky that Controlled Folder Access prevented this shit show for me and the worst of my problems was the constant notifications from Windows Security about Codex TRYING to apply this mess.
I really cant understand how the Codex team seemingly is simply brushing this of as nothing serious.
debovis commentedon Apr 20, 2026
Open code app is a better alternative...
joshleblanc commentedon Apr 21, 2026
For anyone who has run into this problem and wants a quick fix, you can do the following in powershell, and then stop using codex
seh-len commentedon Apr 21, 2026
This is not a solution for this case, because the unwanted ACL entries were not only present on the profile root but had been stamped explicitly onto many individual subfolders throughout the user profile. Removing the ACE from
%USERPROFILE%alone only changes that single directory and does nothing to clean up the large number of separate child-folder ACLs that were already written.joshleblanc commentedon Apr 21, 2026
@seh-len I'm not super familiar with windows permissions, but it did in fact remove all of the entries from subdirectories and files when I ran it.
All of the subdirectories and files inherit the permission from the root due to inheritance, so when you remove the root, all the children lose it as well.
seh-len commentedon Apr 21, 2026
In my case, it wasn't inherited from the root folder, but was set separately for each individual subfolder.
tanishqsrivastavaa commentedon Apr 22, 2026
so we have found temporary solutions by removing the permissions of lets say the 'home' directory but what about the sub folders in the ACL entries? Why is no OpenAI employee solving this major issue?
So in short what this thread is trying to say is that my windows machine is now cooked and I will have to boot up a fresh install?
Mogriffs01 commentedon Apr 30, 2026
a bunch of my scripts for SSH just stopped working because ssh refused to accept the private keys after Codex gave itself permissions to the key files.
sagisar1 commentedon May 11, 2026
This happens also on windows 10, just discovered it a while ago accidently. Codex definitely shouldn't create other users, even if they are labled as "Sandboxed users"; I don't see any reason for that to happen, and yes, opposed to what some of you may think, it is a security risk. Also if OpenAI doesn't want to change that behavior, the minimum is to alert the user that this is going to happen when installing the sandbox environment.