Windows sandbox ACL setup sets the Archive attribute on every workspace file

Open 💬 0 comments Opened Jun 19, 2026 by DanielKulfi

Summary

On Windows, codex-windows-sandbox-setup.exe recursively changed file metadata while granting sandbox ACLs to a writable workspace. As a side effect, FILE_ATTRIBUTE_ARCHIVE was set on essentially every file in the repository.

This caused a differential backup application (Cobian Reflector) to treat the entire repository as changed on every subsequent backup.

Environment

  • Codex Desktop package: OpenAI.Codex_26.616.3309.0_x64
  • Codex CLI: 0.142.0-alpha.1
  • OS: Windows
  • Workspace filesystem: NTFS with NTFS compression enabled
  • Sandbox mode: workspace-write

What happened

After Codex Desktop unexpectedly closed and was restarted, the first shell command triggered a sandbox setup refresh for the workspace.

The sandbox log contains:

08:15:57.282 setup refresh: spawning ...\codex-windows-sandbox-setup.exe
06:15:57.648Z granting write ACE to <workspace> for sandbox group and capability SID
06:15:57.667Z read-acl-only mode: applying read ACLs
06:16:00.413Z applied deny ACE to protect <workspace>\.git
06:16:00.415Z setup refresh: processed 2 write roots; errors=[]

NTFS ChangeTime values show the metadata modifications occurred during exactly the same interval:

08:15:57  1,181 files
08:15:58  3,737 files
08:15:59  3,505 files
08:16:00    261 files

In total, 8,684 pre-existing files were changed in four seconds. Their content timestamps were preserved, but all acquired the Archive attribute. A scan after the incident found 8,689/8,689 non-.git files with FILE_ATTRIBUTE_ARCHIVE set. Comparable sibling repositories had the attribute set only on genuinely modified files.

The timing initially appeared correlated with rtk git status, because it was the first command after restart. A separate isolated repository test showed that rtk git status, rtk git diff, and recursive file enumeration do not set the Archive attribute. The sandbox log and NTFS ChangeTime distribution instead align precisely with recursive ACL setup.

Expected behavior

Applying or refreshing sandbox ACLs should preserve unrelated DOS/NTFS file attributes, especially FILE_ATTRIBUTE_ARCHIVE.

Actual behavior

Recursive sandbox ACL setup sets FILE_ATTRIBUTE_ARCHIVE on every processed workspace file. Backup software that relies on this attribute then repeatedly backs up the entire workspace.

Impact

The affected differential backup grew from approximately 1.94 MB to 46.41 MB per run. Since it is written to two destinations, the disk usage increase was approximately 92.82 MB per scheduled run until the backup baseline is reset.

Suggested investigation

Please inspect the Windows sandbox ACL application path in codex-windows-sandbox-setup.exe, especially whether file attributes are reconstructed or written back while recursively applying security descriptors. The original attribute mask should be preserved exactly.

View original on GitHub ↗