Skip to content

Codex App for Windows times out after submitting a prompt when the enterprise requirements policy contains permissions.filesystem.deny_read. #40831

Open

Description

@MicyToy

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

26.820

What subscription do you have?

Enterprise

What platform is your computer?

Windows 11 Windows sandbox requirement: elevated

What issue are you seeing?

Observed:

  • Codex App opens normally.
  • Model selector works.
  • A new chat can be created.
  • After submitting a prompt, the turn waits and eventually times out.
  • No codex-windows-sandbox-setup process remains.
  • No .codex/.sandbox/setup_error.json or sandbox.log is generated.

Control:
Removing only permissions.filesystem.deny_read restores normal operation.

The same behavior occurs with tilde paths and absolute Windows glob paths.

What steps can reproduce the bug?

Minimal requirement:

[permissions.filesystem]
deny_read = [
"C:/Users/*/.ssh/**"
]

start new chat after requirments.toml loaded.

What is the expected behavior?

No response

Additional information

#36087

#34842

Activity

  1. added
    app
    on Aug 26, 2026
  2. added
    bug
    windows-os
    sandbox
    on Aug 26, 2026
  3. mantasaudickas commented on Aug 31, 2026

    @mantasaudickas

    Our report #41809 was marked as a duplicate of this issue, so adding the root-cause analysis here — it explains this hang and several sibling reports.

    Mechanism (code refs in #41809): Windows ACLs can't express globs, so every deny_read glob is snapshot-expanded by scanning the filesystem (windows-sandbox-rs/src/deny_read_resolver.rs); every concrete match is then (a) JSON-serialized into a single argv element for the sandbox wrapper and (b) given an individual deny ACE. Nothing bounds the match count, so one defect produces three symptoms:

    Why per-file expansion is unnecessary: deny ACEs are applied with CONTAINER_INHERIT_ACE | OBJECT_INHERIT_ACE, so an ACE on a directory already covers its whole subtree — dir/** could resolve to the directory's immediate children with no scan at all, and any match beneath an already-denied directory is redundant.

    Verified workaround for enterprise admins: in permissions.filesystem.deny_read, use exact directory paths instead of recursive globs — e.g. "~/.ssh" instead of "C:/Users/*/.ssh/**" (also avoids the wildcard-prefix scan of C:\Users), "~/AppData/Local/Google/Chrome" instead of .../Chrome/**. Exact roots pass through without expansion, and a directory deny covers its subtree. After redeploying the policy, sessions start normally.

  4. MicyToy commented on Sep 2, 2026

    @MicyToy
    Author

    @mantasaudickas, thanks for your explanation.
    If I want to deny reading .env files, like .env/.env.developement/.env.production, can I add [".env", ".env.*"] to the requirements file?

  5. mantasaudickas commented on Sep 2, 2026

    @mantasaudickas

    @mantasaudickas, thanks for your explanation. If I want to deny reading .env files, like .env/.env.developement/.env.production, can I add [".env", ".env.*"] to the requirements file?

    In my opinion - it should work, but I am not an expert here.. :)

  6. MicyToy commented on Oct 29, 2026

    @MicyToy
    Author

    It fails on Windows even when I added glob_scan_max_depth.
    Will the glob directory be supported for permissions.filesystem.deny_read on Windows?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appbugsandboxwindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions