Codex Desktop Windows sandbox hangs on Google Drive virtual filesystem — SetNamedSecurityInfoW failed: 87
What version of the Codex App are you using (From “About Codex” dialog)?
Codex Desktop app: 26.721.4979.0
What subscription do you have?
Pro
What platform is your computer?
Windows 11 x64
What issue are you seeing?
Codex version
Codex Desktop app: 26.721.4979.0
Bundled codex CLI: 0.146.0-alpha.3.1
Separate npm CLI installed: 0.146.0, but Codex Desktop is confirmed to use
the bundled WindowsApps binary, not the npm installation.
Platform
Windows 11 x64
Google Drive for Desktop virtual drive mounted as G:
Problem
Native file-writing tools such as apply_patch hang for approximately 2–6
minutes when the workspace is inside the Google Drive virtual filesystem.
The same workspace is writable normally by the Windows user. This is not a
general Google Drive permission failure.
Codex Desktop launches:
codex-windows-sandbox-setup.exe
The helper attempts to grant a Windows write ACE to the Google Drive workspace
root. Google Drive's virtual filesystem rejects that operation.
Exact error
From:
C:\Users\<user>\.codex\.sandbox\setup_error.json
{
"code": "helper_unknown_error",
"message": "setup refresh had errors"
}
From sandbox.2026-07-29.log:
write ACE grant failed on G:\Mi unidad\...\Vault-Claude:
SetNamedSecurityInfoW failed: 87
setup refresh completed with errors:
["write ACE failed on G:\\Mi unidad\\...\\Vault-Claude:
SetNamedSecurityInfoW failed: 87"]
setup error: setup refresh had errors
What steps can reproduce the bug?
Reproduction
- Open Codex Desktop on Windows.
- Select a workspace located under a Google Drive for Desktop virtual drive.
- Ask Codex to create a one-line file using native apply_patch.
- The tool remains pending for several minutes with no feedback.
- Stop the task manually.
- Check ~/.codex/.sandbox/setup_error.json and the daily sandbox log.
- Observe SetNamedSecurityInfoW failed: 87.
This reproduced repeatedly, including after restarting Codex and with
apply_patch invoked natively outside Code Mode/node_repl.
What is the expected behavior?
Expected behavior
Codex should either:
- support filesystems that do not implement Windows ACL operations;
- detect that the filesystem does not support SetNamedSecurityInfoW and avoid
the ACE operation;
- or fail immediately with an actionable error recommending a local NTFS
workspace.
The helper should not wait for several minutes.
Actual behavior
The sandbox setup helper hangs for minutes, returns helper_unknown_error, and
blocks native file-writing tools.
Repeated attempts waste significant task time and can contribute to unnecessary
usage.
Ruled out
- The npm Codex CLI is not used by Desktop.
- node_repl/Code Mode is not required to reproduce it.
- The files are writable by the normal Windows user.
- OpenAI service status was operational during reproduction.
- The problem occurs specifically while Codex grants an ACL to the Google Drive
virtual filesystem.
Additional information
Related issues
#31620
#18821
Those issues show the same Windows sandbox ACL/setup family, but with error 5
on NTFS. This report concerns error 87 on a Google Drive virtual filesystem.
Current workaround
Use a local NTFS workspace and synchronize it with Google Drive, or perform
writes outside the Codex Desktop sandbox.
4 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
I can confirm the same issue on a Google Drive for Desktop mounted G: drive.
Environment:
The underlying sandbox log provides a more specific error:
write ACE grant failed on G:\Mi unidad\...\Vault-Claude:
SetNamedSecurityInfoW failed: 87
setup refresh completed with errors:
["write ACE failed on G:\\Mi unidad\\...\\Vault-Claude:
SetNamedSecurityInfoW failed: 87"]
setup error: setup refresh had errors
Native apply_patch calls remain pending for approximately 2–6 minutes before
the sandbox helper exits. The same workspace is normally writable by the
Windows user.
Desktop is confirmed to use its bundled WindowsApps codex.exe, not the
separately installed npm CLI.
This suggests that the sandbox helper is attempting to apply a Windows ACL to
the Google Drive virtual filesystem, which rejects SetNamedSecurityInfoW with
ERROR_INVALID_PARAMETER (87).
Changing elevated/unelevated sandbox mode does not resolve it.
Closing as duplicate of #35353. I added the Google Drive ACL error 87 diagnostics there.
I reproduced this on Windows with Google Drive for Desktop mounted as G:.
Workspace:
G:\Drive'ım\asistan_io_personel
The drive is reported by Windows as:
File System Name: FAT32
Codex config originally had:
[windows]
sandbox = "elevated"
and Codex Desktop failed with:
helper_unknown_error: setup refresh had errors
Changing only the setting to:
[windows]
sandbox = "unelevated"
and fully restarting Codex Desktop resolved the problem. The same Google Drive workspace now works normally.
The apostrophe in "Drive'ım" was not the cause; Codex already recognized the project path correctly as a trusted project.
This may be useful as a workaround for Google Drive virtual-drive / Windows ACL sandbox failures.