Codex sandbox installation corrupts ACL on AppData

Open 💬 26 comments Opened Mar 25, 2026 by thunderstatic
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

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

26.313.5234

What subscription do you have?

Free

What platform is your computer?

Microsoft Windows NT 10.0.19045.0 x64

What issue are you seeing?

Description

After installing Codex on Windows 10 and subsequently enabling/installing its sandbox component, Opera, Opera GX, and Opera Developer fail to launch entirely. The browsers flash a black screen 2–3 times and silently close. The issue appears specifically after the sandbox setup step, not immediately after the initial Codex installation. Chrome (stable) and Brave are unaffected.

Root Cause

Codex creates a local Windows group CodexSandboxUsers and local users CodexSandboxOffline / CodexSandboxOnline during installation, and modifies ACL permissions on AppData\Local.

This breaks the Chromium sandbox for any browser installed under AppData\Local (Opera, Opera GX, Chrome Canary), because the GPU process requires the ALL APPLICATION PACKAGES (S-1-15-2-1) permission on that path to launch in sandboxed mode.

Browsers installed in Program Files (Chrome stable, Brave, Edge) are unaffected because their AppData\Local path is not involved in the same way.

What steps can reproduce the bug?

  1. Install Codex on Windows 10
  2. Go through the sandbox setup/activation step within Codex
  3. Launch Opera, Opera GX, or Opera Developer → browser closes immediately

What is the expected behavior?

The sandbox installation step should not modify ACL permissions on AppData\Local in a way that affects other applications, or should at minimum restore them on uninstall/rollback.

View original on GitHub ↗

26 Comments

github-actions[bot] contributor · 3 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #15343

Powered by Codex Action

iceweasel-oai contributor · 3 months ago

Hi @thunderstatic

We don’t intentionally remove existing ACLs on $env:LOCALAPPDATA. In the Windows sandbox setup path we read the existing DACL and merge in Codex allow ACEs, so if this is breaking Opera/Chrome Canary, the most helpful next step is to inspect the actual ACLs on the affected paths.

Could you run these in PowerShell and paste the output?

icacls "$env:LOCALAPPDATA"
icacls "$env:LOCALAPPDATA\Programs"
icacls "$env:LOCALAPPDATA\Programs\Opera"
icacls "$env:LOCALAPPDATA\Programs\Opera GX"
icacls "$env:LOCALAPPDATA\Google\Chrome SxS"

paths might vary slightly so skip or replace as needed. We mainly want to check whether ALL APPLICATION PACKAGES / ALL RESTRICTED APPLICATION PACKAGES are actually missing, and whether CodexSandboxUsers was added on those paths.

thunderstatic · 3 months ago

@iceweasel-oai here are the results. Note: I have already uninstalled Codex and ran icacls /reset on AppData\Local to restore permissions before capturing this output, so this reflects the post-fix state.

If you need the ACL state captured while the Codex sandbox is still installed (before the fix), I can reinstall the sandbox component and provide the output. Just let me know.

icacls "$env:LOCALAPPDATA"
C:\Users\Daniil\AppData\Local
    NT AUTHORITY\SYSTEM: (I)(OI)(CI)(F)
    BUILTIN\Administrators: (I)(OI)(CI)(F)
    MyPCName\MyProfileName: (I)(OI)(CI)(F)
icacls "$env:LOCALAPPDATA\Programs"
C:\Users\Daniil\AppData\Local\Programs
    NT AUTHORITY\SYSTEM: (I)(OI)(CI)(F)
    BUILTIN\Administrators: (I)(OI)(CI)(F)
    MyPCName\MyProfileName: (I)(OI)(CI)(F)
icacls "$env:LOCALAPPDATA\Programs\Opera"
C:\Users\Daniil\AppData\Local\Programs\Opera
    S-1-15-3-1024-3424233489-...: (OI)(CI)(RX)
    S-1-15-3-1024-2302894289-...: (OI)(CI)(RX)
    NT AUTHORITY\SYSTEM: (I)(OI)(CI)(F)
    BUILTIN\Administrators: (I)(OI)(CI)(F)
    MyPCName\MyProfileName: (I)(OI)(CI)(F)

The two S-1-15-3-* SIDs visible on the Opera folder are app container SIDs added by Opera's own installer — those are expected and unrelated to the Codex issue, i guess.

thunderstatic · 3 months ago

Update: I reinstalled Codex to reproduce the issue, but it picked up my existing configuration and skipped the sandbox initialization step entirely — the CodexSandboxUsers group and sandbox users were not recreated. Not sure how to force that step at this point.

If you know a way to reset the sandbox setup (a flag, clearing some config, etc.), I'm happy to give it another shot.

Update 2: looks like I'm now in a softlock — every command fails with a sandbox error, for example:

{
  "code": "helper_sid_resolve_failed",
  "message": "resolve SID for offline user CodexSandboxOffline failed: 
              LookupAccountNameW failed for CodexSandboxOffline: 1332"
}

This happens because I deleted the CodexSandboxOffline user as part of the manual fix, and now Codex can't resolve its SID. The app has no obvious way to reinitialize the sandbox from scratch, so there's no way to get back to a clean state without manually recreating the users — which feels like something the app itself should handle.

thunderstatic · 3 months ago

Managed to trigger sandbox reinitialization by deleting .codex\.sandbox\setup_marker.json. Here's the output with sandbox freshly installed:

icacls "$env:LOCALAPPDATA"
C:\Users\Daniil\AppData\Local
    NT AUTHORITY\SYSTEM: (I)(OI)(CI)(F)
    BUILTIN\Administrators: (I)(OI)(CI)(F)
    MyPCName\MyProfileName: (I)(OI)(CI)(F)
icacls "$env:LOCALAPPDATA\Programs"
C:\Users\Daniil\AppData\Local\Programs
    MyPCName\CodexSandboxUsers: (I)(OI)(CI)(RX)
    S-1-15-2-2968813833-...: (I)(F)
    S-1-15-2-2968813833-...: (I)(OI)(CI)(IO)(F)
    MyPCName\MyProfileName: (I)(OI)(CI)(F)
    NT AUTHORITY\SYSTEM: (I)(OI)(CI)(F)
    BUILTIN\Administrators: (I)(OI)(CI)(F)
icacls "$env:LOCALAPPDATA\Programs\Opera"
C:\Users\Daniil\AppData\Local\Programs\Opera
    S-1-15-3-1024-3424233489-...: (OI)(CI)(RX)
    S-1-15-3-1024-2302894289-...: (OI)(CI)(RX)
    MyPCName\CodexSandboxUsers: (I)(OI)(CI)(RX)
    S-1-15-2-2968813833-...: (I)(F)
    S-1-15-2-2968813833-...: (I)(OI)(CI)(IO)(F)
    MyPCName\MyProfileName: (I)(OI)(CI)(F)
    NT AUTHORITY\SYSTEM: (I)(OI)(CI)(F)
    BUILTIN\Administrators: (I)(OI)(CI)(F)

As you can see, sandbox setup adds CodexSandboxUsers and a new app container SID (S-1-15-2-2968813833-...) to AppData\Local\Programs and subdirectories. I don't know what changed but the Opera is broken again.

thunderstatic · 3 months ago

For context: this issue is based on the thread at https://www.reddit.com/r/operabrowser/comments/1rvqlst/ — the root cause, symptoms and fix are taken from there.
The only difference is that instead of the suggested fix:

icacls ... /grant "*S-1-15-2-1:(OI)(CI)(RX)" /T

I used:

icacls "$env:LOCALAPPDATA" /reset /T /C

And it worked fine and the browser works again.

iceweasel-oai contributor · 3 months ago

Interesting. The S-1-15-2-... AppContainer/capability SID with (F) is the kind of ACL we add when the sandbox treats a directory as a writable root, not just a readable one. That makes me suspect C:\Users\Daniil\AppData\Local\Programs may have been used as Codex’s active project/workspace directory at some point. Did you ever run or initialize Codex with AppData, AppData\Local, or AppData\Local\Programs as the project directory?

thunderstatic · 3 months ago

No, my first and last project was at C:\Users\Daniil\source\work

thunderstatic · 3 months ago

I'm not 100% sure though — I don't remember what directory was used for the first test project that Codex suggests on initial setup. I think I just closed it right away.

iceweasel-oai contributor · 3 months ago

would you be willing to send me your sandbox.log file? It's located at %USERPROFILE%\.codex\.sandbox\sandbox.log

thunderstatic · 3 months ago

Sure! I did see that file earlier. I removed a couple of lines containing email addresses, but otherwise it's untouched.
The second attempt to grant permissions was likely interrupted by me, that's when I noticed the browser was broken again (the last line)

sandbox.log

iceweasel-oai contributor · 3 months ago

Thanks for sending this. It’s clear that AppData\Local\Programs and its children have a write ACE for the Codex capability/AppContainer SID, but the sandbox.log we’ve seen does not show anything directly granting write access there, so I’m not yet sure where that ACE is coming from.

It’s also odd that the write ACE on AppData\Local\Programs is marked as inherited, but it doesn’t appear on the parent AppData\Local directory. Under normal NTFS inheritance, that shouldn’t happen.

Could you run these as well?

```
icacls "$env:USERPROFILE\AppData"
Get-Item "$env:LOCALAPPDATA\Programs" | Format-List FullName,Attributes,LinkType,Target

thunderstatic · 3 months ago

For now is:

icacls "$env:USERPROFILE\AppData"
C:\Users\Daniil\AppData NT AUTHORITY\SYSTEM:(I)(OI)(CI)(F)
                        BUILTIN\Administrators:(I)(OI)(CI)(F)
                        MyPcName\Daniil:(I)(OI)(CI)(F)
Get-Item "$env:LOCALAPPDATA\Programs" | Format-List FullName,Attributes,LinkType,Target

FullName   : C:\Users\Daniil\AppData\Local\Programs
Attributes : Directory
LinkType   :
Target     : {}
iceweasel-oai contributor · 3 months ago

Thanks, this rules out Programs being a junction, and it also shows AppData itself doesn’t have the capability SID either. So we still have a contradiction: AppData\Local\Programs shows the bad capability ACE as inherited, but neither AppData nor
AppData\Local show it on the parent chain.

Could you run these too? I appreciate the help debugging this

  Get-Acl "$env:LOCALAPPDATA" | Select-Object -Expand Access | Format-Table IdentityReference, IsInherited, FileSystemRights, InheritanceFlags, PropagationFlags, AccessControlType -Auto
  Get-Acl "$env:LOCALAPPDATA\Programs" | Select-Object -Expand Access | Format-Table IdentityReference, IsInherited, FileSystemRights, InheritanceFlags, PropagationFlags, AccessControlType -Auto
thunderstatic · 3 months ago
Get-Acl "$env:LOCALAPPDATA" | Select-Object -Expand Access | Format-Table IdentityReference, IsInherited, FileSystemRights, InheritanceFlags, PropagationFlags, AccessControlType -Auto

IdentityReference           IsInherited  FileSystemRights  InheritanceFlags                 PropagationFlags  AccessControlType
-----------------           -----------  ----------------  ----------------                 ----------------  -----------------
NT AUTHORITY\SYSTEM         True         FullControl       ContainerInherit, ObjectInherit  None              Allow
BUILTIN\Administrators      True         FullControl       ContainerInherit, ObjectInherit  None              Allow
MyPcName\Daniil             True         FullControl       ContainerInherit, ObjectInherit  None              Allow
Get-Acl "$env:LOCALAPPDATA\Programs" | Select-Object -Expand Access | Format-Table IdentityReference, IsInherited, FileSystemRights, InheritanceFlags, PropagationFlags, AccessControlType -Auto

IdentityReference           IsInherited  FileSystemRights  InheritanceFlags                 PropagationFlags  AccessControlType
-----------------           -----------  ----------------  ----------------                 ----------------  -----------------
NT AUTHORITY\SYSTEM         True         FullControl       ContainerInherit, ObjectInherit  None              Allow
BUILTIN\Administrators      True         FullControl       ContainerInherit, ObjectInherit  None              Allow
MyPcName\Daniil             True         FullControl       ContainerInherit, ObjectInherit  None              Allow
iceweasel-oai contributor · 3 months ago

It’s still not clear why AppData\Local\Programs shows an inherited ACE that its ancestors don’t seem to have.

If you’re up for helping debug it a bit more on your side, the most useful next step would be to reproduce it once from a clean state, confirm which sandbox mode you enabled, and then capture the sandbox.log plus the ACLs for AppData, AppData\Local,
AppData\Local\Programs, and Opera immediately afterward, before anything else changes. If not, no worries — this is already enough for us to keep investigating on our side.

thunderstatic · 3 months ago

I'm ready to proceed. Would deleting the sandbox marker file again be enough to reset it? The app doesn't seem to have any other way to trigger reinitialization from the UI.

iceweasel-oai contributor · 3 months ago

yeah, the app doesn't really support "clearing the sandbox" - I use this locally:

net user CodexSandboxOnline /delete
net user CodexSandboxOffline /delete
net localgroup CodexSandboxUsers /delete
rm ~\.codex\cap_sid
rm ~\.codex\.sandbox\setup_marker.json
rm ~\.codex\.sandbox-secrets\sandbox_users.json

and then update my ~\.codex\config.toml` to remove

[windows]
sandbox = "elevated"
thunderstatic · 3 months ago

My steps

  1. Start the Codex app
  2. Request to read file → expected sandbox-related error
  3. Receive error:

``
execution error: Io(Custom { kind: Other, error: "windows sandbox: setup refresh failed with status exit code: 1" })
``

  1. The UI incorrectly indicates that default permissions are already set
  2. Manually remove setup_marker.json from the .sandbox folder (nothing else was changed; this was done slightly before your advice)
  3. Request to read file again
  4. Codex initializes the sandbox in the background, but this is not reflected in the UI (unlike the initial setup)
  5. File is successfully read
  6. Launch Opera → browser is completely broken (crashes immediately unless --no-sandbox is used)
  7. Inspect ACL permissions

ACL for %LOCALAPPDATA%

Get-Acl "$env:LOCALAPPDATA" | Select-Object -Expand Access | Format-Table IdentityReference, IsInherited, FileSystemRights, InheritanceFlags, PropagationFlags, AccessControlType -Auto

IdentityReference           IsInherited  FileSystemRights  InheritanceFlags                 PropagationFlags  AccessControlType
-----------------           -----------  ----------------  ----------------                 ----------------  -----------------
NT AUTHORITY\SYSTEM         True         FullControl       ContainerInherit, ObjectInherit  None              Allow
BUILTIN\Administrators      True         FullControl       ContainerInherit, ObjectInherit  None              Allow
MyPcName\Daniil             True         FullControl       ContainerInherit, ObjectInherit  None              Allow

ACL for %LOCALAPPDATA%\Programs

Get-Acl "$env:LOCALAPPDATA\Programs" | Select-Object -Expand Access | Format-Table IdentityReference, IsInherited, FileSystemRights, InheritanceFlags, PropagationFlags, AccessControlType -Auto

IdentityReference                                                                    IsInherited  FileSystemRights                InheritanceFlags                 PropagationFlags  AccessControlType
-----------------                                                                    -----------  ----------------                ----------------                 ----------------  -----------------
MyPcName\CodexSandboxUsers                                                           True         ReadAndExecute, Synchronize    ContainerInherit, ObjectInherit  None              Allow
S-1-5-21-705447050-1973844544-3727255925-1007                                        True         ReadAndExecute, Synchronize    ContainerInherit, ObjectInherit  None              Allow
S-1-15-2-2968813833-811790644-2202111208-3784096404-1081847329-2708967783-1438471679 True         FullControl                    None                             None              Allow
S-1-15-2-2968813833-811790644-2202111208-3784096404-1081847329-2708967783-1438471679 True         268435456                      ContainerInherit, ObjectInherit  InheritOnly       Allow
MyPcName\Daniil                                                                      True         FullControl                    ContainerInherit, ObjectInherit  None              Allow
NT AUTHORITY\SYSTEM                                                                  True         FullControl                    ContainerInherit, ObjectInherit  None              Allow
BUILTIN\Administrators                                                               True         FullControl                    ContainerInherit, ObjectInherit  None              Allow

ACL for %LOCALAPPDATA%\Programs\Opera

Get-Acl "$env:LOCALAPPDATA\Programs\Opera" | Select-Object -Expand Access | Format-Table IdentityReference, IsInherited, FileSystemRights, InheritanceFlags, PropagationFlags, AccessControlType -Auto

IdentityReference                                                                                    IsInherited  FileSystemRights                InheritanceFlags                 PropagationFlags  AccessControlType
-----------------                                                                                    -----------  ----------------                ----------------                 ----------------  -----------------
S-1-15-3-1024-2302894289-466761758-1166120688-1039016420-2430351297-4240214049-4028510897-3317428798 False        ReadAndExecute, Synchronize    ContainerInherit, ObjectInherit  None              Allow
S-1-15-3-1024-3424233489-972189580-2057154623-747635277-1604371224-316187997-3786583170-1043257646   False        ReadAndExecute, Synchronize    ContainerInherit, ObjectInherit  None              Allow
MyPcName\CodexSandboxUsers                                                                           True         ReadAndExecute, Synchronize    ContainerInherit, ObjectInherit  None              Allow
S-1-5-21-705447050-1973844544-3727255925-1007                                                        True         ReadAndExecute, Synchronize    ContainerInherit, ObjectInherit  None              Allow
S-1-15-2-2968813833-811790644-2202111208-3784096404-1081847329-2708967783-1438471679                 True         FullControl                    None                             None              Allow
S-1-15-2-2968813833-811790644-2202111208-3784096404-1081847329-2708967783-1438471679                 True         268435456                      ContainerInherit, ObjectInherit  InheritOnly       Allow
MyPcName\Daniil                                                                                      True         FullControl                    ContainerInherit, ObjectInherit  None              Allow
NT AUTHORITY\SYSTEM                                                                                  True         FullControl                    ContainerInherit, ObjectInherit  None              Allow
BUILTIN\Administrators                                                                               True         FullControl                    ContainerInherit, ObjectInherit  None              Allow
thunderstatic · 3 months ago

There were some issues with the log file. :(

It appears that because the file was opened multiple times, I am seeing different sets of logs from the latest run depending on the instance. It looks like the data may have been corrupted due to having multiple open handles to the same file.

Sorry about that, I can try to reproduce the issue again and provide a clean log if the current data is not sufficient.

thunderstatic · 3 months ago
[2026-03-27 01:48:13.928 codex-windows-sandbox-setup.exe] setup binary completed
[2026-03-27 01:48:13.953 codex.exe] helper copy: validating command-runner source=C:\Program Files\WindowsApps\OpenAI.Codex_26.313.5234.0_x64__2p2nqsd0c76g0\app\resources\codex-command-runner.exe destination=C:\Users\Daniil\.codex\.sandbox-bin\codex-command-runner.exe
[2026-03-27 01:48:13.953 codex.exe] helper copy: reused command-runner source=C:\Program Files\WindowsApps\OpenAI.Codex_26.313.5234.0_x64__2p2nqsd0c76g0\app\resources\codex-command-runner.exe destination=C:\Users\Daniil\.codex\.sandbox-bin\codex-command-runner.exe
[2026-03-27 01:48:13.954 codex.exe] helper launch resolution: using copied command-runner path C:\Users\Daniil\.codex\.sandbox-bin\codex-command-runner.exe
[2026-03-27 01:48:13.955 codex.exe] runner launch: exe=C:\Users\Daniil\.codex\.sandbox-bin\codex-command-runner.exe cmdline=C:\Users\Daniil\.codex\.sandbox-bin\codex-command-runner.exe --request-file=C:\Users\Daniil\.codex\.sandbox\requests\request-9cb8bdf254ba071d0f1b2a6232cafbbd.json cwd=C:\Users\Daniil\source\work\MyCodexProject
[2026-03-27 01:48:14.585 codex-command-runner.exe] hide users: profile dir hidden for current user (C:\Users\CodexSandboxOffline.MyPcName.000)
[2026-03-27 01:48:14.586 codex-command-runner.exe] runner start cwd=C:\Users\Daniil\source\work\MyCodexProject cmd=["C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe", "-NoProfile", "-Command", "[Console]::OutputEncoding=[System.Text.Encoding]::UTF8;\nGet-Content src\\MyCodexProject\\Program.cs"] real_codex_home=C:\Users\Daniil\.codex
[2026-03-27 01:48:14.588 codex-command-runner.exe] junction: read ACL helper running; using junction CWD
[2026-03-27 01:48:14.589 codex-command-runner.exe] junction: creating via cmd /c mklink /J "C:\Users\CodexSandboxOffline.MyPcName.000\.codex\.sandbox\cwd\4343772c8767de98" "C:\Users\Daniil\source\work\MyCodexProject"
[2026-03-27 01:48:14.614 codex-command-runner.exe] junction: created C:\Users\CodexSandboxOffline.MyPcName.000\.codex\.sandbox\cwd\4343772c8767de98 -> C:\Users\Daniil\source\work\MyCodexProject
[2026-03-27 01:48:14.615 codex-command-runner.exe] runner: effective cwd=C:\Users\CodexSandboxOffline.MyPcName.000\.codex\.sandbox\cwd\4343772c8767de98 (requested C:\Users\Daniil\source\work\MyCodexProject)
[2026-03-27 01:48:15.049 codex.exe] SUCCESS: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -Command [Console]::OutputEncoding=[System.Text.Encoding]::UTF8;
Get-Content src\MyCodexProject\Program.cs

It’s all that’s left

thunderstatic · 3 months ago

ACL after another fix with icacls /reset:

Get-Acl "$env:LOCALAPPDATA" | Select-Object -Expand Access | Format-Table IdentityReference, IsInherited, FileSystemRights, InheritanceFlags, PropagationFlags, AccessControlType -Auto

IdentityReference        IsInherited  FileSystemRights  InheritanceFlags                 PropagationFlags  AccessControlType
-----------------        -----------  ----------------  ----------------                 ----------------  -----------------
NT AUTHORITY\SYSTEM       True        FullControl       ContainerInherit, ObjectInherit  None              Allow
BUILTIN\Administrators    True        FullControl       ContainerInherit, ObjectInherit  None              Allow
MyPcName\Daniil           True        FullControl       ContainerInherit, ObjectInherit  None              Allow
Get-Acl "$env:LOCALAPPDATA\Programs" | Select-Object -Expand Access | Format-Table IdentityReference, IsInherited, FileSystemRights, InheritanceFlags, PropagationFlags, AccessControlType -Auto

IdentityReference        IsInherited  FileSystemRights  InheritanceFlags                 PropagationFlags  AccessControlType
-----------------        -----------  ----------------  ----------------                 ----------------  -----------------
NT AUTHORITY\SYSTEM       True        FullControl       ContainerInherit, ObjectInherit  None              Allow
BUILTIN\Administrators    True        FullControl       ContainerInherit, ObjectInherit  None              Allow
MyPcName\Daniil           True        FullControl       ContainerInherit, ObjectInherit  None              Allow
Get-Acl "$env:LOCALAPPDATA\Programs\Opera" | Select-Object -Expand Access | Format-Table IdentityReference, IsInherited, FileSystemRights, InheritanceFlags, PropagationFlags, AccessControlType -Auto

IdentityReference                                                                                      IsInherited  FileSystemRights           InheritanceFlags                 PropagationFlags  AccessControlType
-----------------                                                                                      -----------  ----------------           ----------------                 ----------------  -----------------
S-1-15-3-1024-2302894289-466761758-1166120688-1039016420-2430351297-4240214049-4028510897-3317428798    False        ReadAndExecute, Synchronize  ContainerInherit, ObjectInherit  None              Allow
S-1-15-3-1024-3424233489-972189580-2057154623-747635277-1604371224-316187997-3786583170-1043257646      False        ReadAndExecute, Synchronize  ContainerInherit, ObjectInherit  None              Allow
NT AUTHORITY\SYSTEM                                                                                     True         FullControl                ContainerInherit, ObjectInherit  None              Allow
BUILTIN\Administrators                                                                                  True         FullControl                ContainerInherit, ObjectInherit  None              Allow
MyPcName\Daniil                                                                                         True         FullControl                ContainerInherit, ObjectInherit  None              Allow
seh-len · 3 months ago

This is not limited to AppData.

In my case, the Codex-related ACL entries were not confined to AppData\Local; they ended up spread across folders throughout the entire user profile under C:\Users\<USER>. That makes this substantially worse than what the current issue title/body suggests.

See also #12343, especially the teams response here:
https://github.com/openai/codex/issues/12343#issuecomment-4208289855

The suggestion that users can “just remove the ACLs” is frankly an unacceptable response.

Once these entries have been stamped onto a large number of folders across the full profile tree, cleanup is no longer trivial. At that point, users are expected to manually inspect and repair ACLs across a huge number of directories, with real risk of breaking permissions further or missing affected paths. That is not a reasonable workaround for damage caused by installing a developer tool.

More importantly, this is not about whether Codex sandbox users having read access is merely “annoying.” The real problem is that these ACL changes can break unrelated software. In my case, this resulted in third-party applications no longer functioning correctly, including Electron-based software and DRM-protected browser playback.

That is an absolute no-go.

A tool like this must not modify permissions so broadly across the user profile, and it absolutely must not leave users with a large-scale, high-risk ACL cleanup problem afterwards. This should be treated as a serious Windows bug, not brushed off as something users can fix themselves if it “bothers” them.

MarkHelsinki · 2 months ago

Windows 10/11 Codex app sandbox ACL issue confirmed on my machine.

After installing/enabling Codex Windows sandbox, both Opera and Opera GX, as well as other Chromium apps like Obsidian, failed to launch normally. They showed a black window, closed, retried several times, then stopped. Fresh reinstall of Opera did not help.

Codex Windows sandbox ACL regression / AppData Local permissions broke at least Opera, Opera GX, and Obsidian.

Diagnostics:

  • Opera failed with a fresh temporary profile.
  • Opera failed with --disable-gpu.
  • Opera opened successfully with --no-sandbox.
  • Obsidian also failed to open.
  • Security permissions showed CodexSandboxUsers and orphaned unknown SIDs remaining after uninstall of CODEX.

Repair:

  • Repairing permissions / restoring ALL APPLICATION PACKAGES read-execute access on %LOCALAPPDATA% restored Opera and Obsidian.
  • Powershell repair command: icacls "$env:LOCALAPPDATA" /grant "*S-1-15-2-1:(RX)" /C
  • set toml sandbox at \.codex\config.toml to:
[windows]
sandbox = "unelevated"

This appears to affect Chromium/Electron app sandbox startup under %LOCALAPPDATA%, not just Opera.

IceTrooper · 2 months ago

Hi guys, I think this is a critical issue. I was curious to try out Codex in my Unity projects. I installed it two days ago, and everything was working fine right after installation and yesterday, but today... it’s a different story. I spent three hours trying to figure out why the Discord, Signal, and Notion apps stopped launching.

In my opinion, it is unacceptable that installing one application causes others to break WITHOUT THE ABILITY TO REVERSE IT! Because running icacls /grant ... does indeed fix the problem, but it is a fix, not a reversal of the harmful changes introduced by Codex app.

A tool like this must not modify permissions so broadly across the user profile, and it absolutely must not leave users with a large-scale, high-risk ACL cleanup problem afterwards. This should be treated as a serious Windows bug, not brushed off as something users can fix themselves if it “bothers” them.

Definitely!

I was excited to test Codex, but now I'm really discouraged.

supraxylon · 1 month ago

Additional Windows 11 reproduction: Codex sandbox/user ACL state caused %LOCALAPPDATA%\Packages to lose inherited SYSTEM access, breaking Codex and Windows packaged applications (or how I learned to stop worrying and love loosing 3 hours of my life)

I appear to be encountering the same class of problem described in this issue, but with broader impact across Windows packaged applications. I captured the ACL state before repairing it, along with AppModel Runtime events and a Process Monitor trace.

Codex version

OpenAI.Codex_26.611.7849.0_x64__2p2nqsd0c76g0

This is the package version reported by Windows. The application initially could not launch, so I could not open the About dialog before repair.

Subscription

ChatGPT Plus

Platform

Official Codex issue-template command output:

```text id="platform_official"
Microsoft Windows NT 10.0.26200.0 x64


Additional Windows build information:

```text id="platform_extra"
WindowsProductName : Windows 10 Pro
WindowsVersion     : 2009
OsBuildNumber      : 26200
OsArchitecture     : 64-bit

Although Get-ComputerInfo reports Windows 10 Pro, this is a Windows 11 system reporting the NT version family as 10.0.

What issue am I seeing?

After restarting Windows on June 16, 2026, the following began occurring:

  • A popup appeared during sign-in stating that Windows could not access a protected system-app path under MicrosoftWindows.Client.CBS, including CrossDeviceResume.
  • Codex could no longer launch.
  • Explorer and other Windows shell functionality initially behaved incorrectly.
  • Other unrelated packaged applications also generated launch failures.

Windows Event Viewer recorded repeated AppModel Runtime Event 208 errors:

```text id="codex_event_208"
0x80070005: Cannot create the process for package
OpenAI.Codex_26.611.7849.0_x64__2p2nqsd0c76g0
because an error was encountered while configuring runtime.
[LaunchProcess]


The same Event 208 / `0x80070005` failure was recorded for:

```text id="other_event_208_packages"
MicrosoftWindows.CrossDevice_1.26042.110.0_x64__cw5n1h2txyewy
Microsoft.CommandPalette_0.9.10852.0_x64__8wekyb3d8bbwe
MicrosoftWindows.Client.CBS_1000.26100.315.0_x64__cw5n1h2txyewy

This indicates that the failure was not limited to the Codex executable. It affected the shared Windows packaged-app runtime environment.

Process Monitor evidence

During a Codex launch attempt, Process Monitor captured ACCESS DENIED from a Windows runtime service while trying to access Codex’s package data directory:

```text id="procmon_denied"
Process: svchost.exe
Operation: CreateFile
Path: %USERPROFILE%\AppData\Local\Packages\
OpenAI.Codex_2p2nqsd0c76g0\SystemAppData\Helium
Result: ACCESS DENIED
Desired access: Read Attributes
Options: Open Reparse Point


The corresponding AppModel Runtime Event 208 was generated immediately after the denied operation.

### ACL state captured before repair

The parent directory had inheritance enabled and contained the Codex sandbox group:

```text id="local_appdata_before"
%USERPROFILE%\AppData\Local

Inheritance disabled: False

<HOST>\CodexSandboxUsers    ReadAndExecute    Allow
NT AUTHORITY\SYSTEM         FullControl       Allow
BUILTIN\Administrators      FullControl       Allow
<HOST>\<USER>               FullControl       Allow

However, the packaged-app data directory had inheritance disabled and only my user account was present:

```text id="packages_before"
%USERPROFILE%\AppData\Local\Packages

Owner: <HOST>\<USER>
Inheritance disabled: True

<HOST>\<USER> FullControl Allow


`NT AUTHORITY\SYSTEM` and `BUILTIN\Administrators` were absent from `%LOCALAPPDATA%\Packages`.

I also observed a similar suspicious ACL state on:

```text id="local_microsoft_before"
%USERPROFILE%\AppData\Local\Microsoft

Owner: <HOST>\<USER>
Inheritance disabled: True

<HOST>\<USER>    FullControl    Allow

I did not modify %LOCALAPPDATA%\Microsoft because the Process Monitor evidence specifically implicated %LOCALAPPDATA%\Packages.

The following Codex-created identities were present on the system:

```text id="codex_identities"
<HOST>\CodexSandboxUsers
<HOST>\CodexSandboxOnline
<HOST>\CodexSandboxOffline


### Repair performed

Before repairing, I exported the current ACL/SDDL state for:

```text id="acl_backup_targets"
%LOCALAPPDATA%
%LOCALAPPDATA%\Packages
%LOCALAPPDATA%\Packages\OpenAI.Codex_2p2nqsd0c76g0
%LOCALAPPDATA%\Packages\OpenAI.Codex_2p2nqsd0c76g0\SystemAppData
%LOCALAPPDATA%\Packages\OpenAI.Codex_2p2nqsd0c76g0\SystemAppData\Helium
%LOCALAPPDATA%\Microsoft
%LOCALAPPDATA%\Microsoft\WindowsApps

I then made two changes before restarting, so I cannot isolate which change was necessary or sufficient:

  1. Changed Codex’s Windows sandbox configuration to unelevated:

```toml id="unelevated_config"
[windows]
sandbox = "unelevated"


2. Re-enabled inherited permissions, while preserving existing explicit access rules, on:

```text id="repair_targets"
%LOCALAPPDATA%\Packages
%LOCALAPPDATA%\Packages\OpenAI.Codex_2p2nqsd0c76g0
%LOCALAPPDATA%\Packages\OpenAI.Codex_2p2nqsd0c76g0\SystemAppData
%LOCALAPPDATA%\Packages\OpenAI.Codex_2p2nqsd0c76g0\SystemAppData\Helium

%LOCALAPPDATA%\Packages\MicrosoftWindows.CrossDevice_cw5n1h2txyewy
%LOCALAPPDATA%\Packages\MicrosoftWindows.CrossDevice_cw5n1h2txyewy\SystemAppData
%LOCALAPPDATA%\Packages\MicrosoftWindows.CrossDevice_cw5n1h2txyewy\SystemAppData\Helium

%LOCALAPPDATA%\Packages\Microsoft.CommandPalette_8wekyb3d8bbwe
%LOCALAPPDATA%\Packages\Microsoft.CommandPalette_8wekyb3d8bbwe\SystemAppData
%LOCALAPPDATA%\Packages\Microsoft.CommandPalette_8wekyb3d8bbwe\SystemAppData\Helium

%LOCALAPPDATA%\Packages\MicrosoftWindows.Client.CBS_cw5n1h2txyewy
%LOCALAPPDATA%\Packages\MicrosoftWindows.Client.CBS_cw5n1h2txyewy\SystemAppData
%LOCALAPPDATA%\Packages\MicrosoftWindows.Client.CBS_cw5n1h2txyewy\SystemAppData\Helium

The repair was performed by calling:

```powershell id="repair_method"
$acl.SetAccessRuleProtection($false, $true)
Set-Acl -LiteralPath $path -AclObject $acl


where `$false` re-enabled inheritance and `$true` preserved existing explicit rules.

### ACL state after repair

After the repair, `%LOCALAPPDATA%\Packages` showed inheritance enabled again:

```text id="packages_after_root"
%USERPROFILE%\AppData\Local\Packages

Owner: <HOST>\<USER>
Inheritance disabled: False

<HOST>\<USER>               FullControl
<HOST>\CodexSandboxUsers    ReadAndExecute    Inherited
NT AUTHORITY\SYSTEM         FullControl       Inherited
BUILTIN\Administrators      FullControl       Inherited
<HOST>\<USER>               FullControl       Inherited

I also verified that the Codex package-data paths had inherited SYSTEM access:

```text id="codex_acl_after"
%LOCALAPPDATA%\Packages
InheritanceDisabled: False
SystemRights: FullControl

%LOCALAPPDATA%\Packages\OpenAI.Codex_2p2nqsd0c76g0
InheritanceDisabled: False
SystemRights: FullControl

%LOCALAPPDATA%\Packages\OpenAI.Codex_2p2nqsd0c76g0\SystemAppData
InheritanceDisabled: False
SystemRights: FullControl

%LOCALAPPDATA%\Packages\OpenAI.Codex_2p2nqsd0c76g0\SystemAppData\Helium
InheritanceDisabled: False
SystemRights: FullControl


### Result after repair and restart

After changing Codex to use the unelevated Windows sandbox, restoring inheritance on the affected package directories, and restarting Windows:

* The startup permission popup no longer appeared.
* Codex launched successfully.
* Codex was able to execute a test command.
* `Get-Date` executed successfully through Codex and returned:

```text id="codex_get_date_result"
Thursday, June 18, 2026 9:44:58 PM
  • I checked AppModel Runtime events since boot and found no matching Event ID 208 failures after the repair.
  • Instead of Event ID 208 failures, Codex showed successful launch/container events:

```text id="codex_success_events"
Id 201: Created process for application OpenAI.Codex_2p2nqsd0c76g0!App
Id 210: Created Desktop AppX container for package OpenAI.Codex_26.611.7849.0_x64__2p2nqsd0c76g0
Id 211: Added process to Desktop AppX container for package OpenAI.Codex_26.611.7849.0_x64__2p2nqsd0c76g0


* CrossDevice also showed successful launch/container events:

```text id="crossdevice_success_events"
Id 201: Created process for application MicrosoftWindows.CrossDevice_cw5n1h2txyewy!App
Id 201: Created process for application MicrosoftWindows.Client.CBS_cw5n1h2txyewy!CrossDeviceResumeApp
Id 210: Created Desktop AppX container
Id 211: Added process to Desktop AppX container
  • Command Palette also showed successful launch/container events:

```text id="commandpalette_success_events"
Id 201: Created process for application Microsoft.CommandPalette_8wekyb3d8bbwe!App
Id 210: Created Desktop AppX container
Id 211: Added process to Desktop AppX container


This strongly suggests that the launch failures were caused by missing inherited permissions under `%LOCALAPPDATA%\Packages`. Because the Codex sandbox was also changed to `unelevated` before testing, I cannot determine whether the elevated Codex sandbox would reintroduce the ACL problem.

### Other integrity checks

Before identifying the ACL issue, I performed the following diagnostics:

```text id="integrity_checks"
DISM /ScanHealth:
The component store is repairable.

DISM /RestoreHealth:
Completed successfully.

SFC /scannow:
Found corrupt files and successfully repaired them.

CHKDSK C: /scan:
No filesystem problems and zero bad sectors.

Physical disk status:
All disks report Healthy / OK.

The machine-wide registry permission for:

```text id="hklm_control"
HKLM\SYSTEM\CurrentControlSet\Control


was also normal. Inheritance was enabled and `ALL APPLICATION PACKAGES` had inherited `ReadKey` permission.

### Reproduction steps on the affected system

1. Use the Codex Windows application with the Windows sandbox configuration installed.
2. Restart Windows.
3. Observe a sign-in popup related to a Windows system-app directory.
4. Attempt to launch Codex.
5. Observe AppModel Runtime Event 208 with `0x80070005`.
6. Inspect `%LOCALAPPDATA%\Packages` with `Get-Acl`.
7. Observe that inheritance is disabled and SYSTEM/Administrators are missing.
8. Capture the Codex launch with Process Monitor.
9. Observe `svchost.exe` receiving `ACCESS DENIED` while reading the Codex `SystemAppData\Helium` path.
10. Change Codex to `sandbox = "unelevated"`, restore inheritance on the affected package directories, and restart.
11. Observe that Codex and the affected Windows packaged applications launch successfully, with no new Event ID 208 failures found.

I have not reproduced the ACL transition from a clean Windows virtual machine, so I cannot conclusively identify which Codex installation, update, or sandbox operation changed the ACL. However, the observed ACL state, Codex sandbox identities, affected paths, and existing reports make the Codex sandbox setup or upgrade path the leading hypothesis.

### Post-repair verification

After applying the workaround and rebooting, I launched Codex and verified that it could respond and execute a test command:

```text
Get-Date output:
Thursday, June 18, 2026 9:44:58 PM

I then queried AppModel Runtime events since boot for Codex, CrossDevice, Command Palette, Client.CBS, and 0x80070005.

The only matching event IDs after repair were informational success events:

Count Name
----- ----
    4 201, Information
    4 210, Information
  195 211, Information

A follow-up query for Event ID 208, warnings, errors, 0x80070005, or Access is denied returned no results.

I also verified that the Codex package data paths retained inherited SYSTEM access after repair:

%LOCALAPPDATA%\Packages
InheritanceDisabled: False
SystemRights: FullControl

%LOCALAPPDATA%\Packages\OpenAI.Codex_2p2nqsd0c76g0
InheritanceDisabled: False
SystemRights: FullControl

%LOCALAPPDATA%\Packages\OpenAI.Codex_2p2nqsd0c76g0\SystemAppData
InheritanceDisabled: False
SystemRights: FullControl

%LOCALAPPDATA%\Packages\OpenAI.Codex_2p2nqsd0c76g0\SystemAppData\Helium
InheritanceDisabled: False
SystemRights: FullControl

This indicates that restoring inherited ACLs and switching Codex to sandbox = "unelevated" resolved the observed launch failures on my system. Because both changes were applied before rebooting, I cannot determine which change was individually necessary or sufficient.

Expected behavior

Codex sandbox setup should merge any required Codex ACEs into the existing ACL without:

  • Disabling inheritance on %LOCALAPPDATA%\Packages
  • Removing inherited SYSTEM or Administrators access
  • Preventing unrelated MSIX/AppX packages from launching
  • Breaking Windows shell packages
  • Leaving the system without a supported rollback or sandbox reset procedure

The installer, updater, and uninstaller should validate and preserve existing ACLs and roll back partially applied permission changes if setup fails.

Suggested safeguards

Potential safeguards could include:

  1. Capture the original security descriptor before modifying a directory.
  2. Merge Codex-specific ACEs without changing the protected/inheritance flag.
  3. Verify that SYSTEM, Administrators, and the profile owner retain effective access.
  4. Abort and restore the original descriptor when validation fails.
  5. Provide a supported sandbox repair/reset/uninstall operation.
  6. Log every modified path and its before/after SDDL.
  7. Add an automated test ensuring that unrelated packaged applications still launch after sandbox initialization.

I can provide sanitized copies of:

  • The pre-repair and post-repair ACL/SDDL export
  • The filtered Process Monitor CSV
  • AppModel Runtime Event 208 output
  • Post-repair AppModel Runtime success events
  • AppX deployment errors
  • The relevant SFC/DISM/CHKDSK summary

Workaround that resolved the issue on my machine

This is not an official fix, but the following steps resolved the issue on my affected Windows profile.

First, I changed Codex to use the unelevated Windows sandbox by editing:

%USERPROFILE%\.codex\config.toml

and setting:

[windows]
sandbox = "unelevated"

Then I backed up the current ACL state:

$stamp = Get-Date -Format "yyyyMMdd-HHmmss"
$backup = "$env:USERPROFILE\Desktop\appx-acls-$stamp.csv"

$targets = @(
    "$env:LOCALAPPDATA",
    "$env:LOCALAPPDATA\Packages",
    "$env:LOCALAPPDATA\Packages\OpenAI.Codex_2p2nqsd0c76g0",
    "$env:LOCALAPPDATA\Packages\OpenAI.Codex_2p2nqsd0c76g0\SystemAppData",
    "$env:LOCALAPPDATA\Packages\OpenAI.Codex_2p2nqsd0c76g0\SystemAppData\Helium",
    "$env:LOCALAPPDATA\Microsoft",
    "$env:LOCALAPPDATA\Microsoft\WindowsApps"
)

$targets |
    Where-Object { Test-Path -LiteralPath $_ } |
    ForEach-Object {
        $acl = Get-Acl -LiteralPath $_

        [pscustomobject]@{
            Path                = $_
            Owner               = $acl.Owner
            InheritanceDisabled = $acl.AreAccessRulesProtected
            Sddl                = $acl.Sddl
        }
    } |
    Export-Csv -Path $backup -NoTypeInformation

Write-Host "ACL backup written to $backup"

Then I re-enabled inheritance, while preserving existing explicit ACL rules, on %LOCALAPPDATA%\Packages and the package-data directories that were failing:

$packageRoot = "$env:LOCALAPPDATA\Packages"

$affectedPackageNames = @(
    "OpenAI.Codex",
    "MicrosoftWindows.CrossDevice",
    "Microsoft.CommandPalette",
    "MicrosoftWindows.Client.CBS"
)

$pathsToRepair = [System.Collections.Generic.List[string]]::new()
$pathsToRepair.Add($packageRoot)

foreach ($name in $affectedPackageNames) {
    $packages = Get-AppxPackage -Name $name -ErrorAction SilentlyContinue

    foreach ($package in $packages) {
        $dataRoot = Join-Path $packageRoot $package.PackageFamilyName

        $pathsToRepair.Add($dataRoot)
        $pathsToRepair.Add((Join-Path $dataRoot "SystemAppData"))
        $pathsToRepair.Add((Join-Path $dataRoot "SystemAppData\Helium"))
    }
}

$pathsToRepair |
    Select-Object -Unique |
    Where-Object { Test-Path -LiteralPath $_ } |
    ForEach-Object {
        $path = $_
        $acl = Get-Acl -LiteralPath $path

        Write-Host "Enabling inheritance on: $path"

        # False = inheritance enabled.
        # True = preserve existing explicit rules.
        $acl.SetAccessRuleProtection($false, $true)
        Set-Acl -LiteralPath $path -AclObject $acl
    }

Finally, I rebooted Windows. After reboot, the startup permission popup disappeared, Codex launched successfully, and no new AppModel Runtime Event 208 / 0x80070005 launch failures were found.