Skip to content

Windows sandbox: elevated runner request files are left on disk #9315

@MaxMiksa

Description

@MaxMiksa

What version of Codex is running?

OpenAI Codex (v0.80.0)

  • VS Code plugin "Codex - OpenAI's coding agent" (0.4.60)
  • Codex CLI (v0.80.0)

What subscription do you have?

Via API.

Which model were you using?

gpt-5.2-codex xhigh

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

What terminal emulator and version are you using (if applicable)?

PowerShell 5.x

What issue are you seeing?

The elevated Windows runner reads a JSON request file from sandbox_base/requests/request-*.json but does not delete it afterward. These request files can contain command arguments, env maps, and paths, and are left on disk longer than necessary.

What steps can reproduce the bug?

  1. Run Codex on Windows so it invokes the elevated runner (WorkspaceWrite policy).
  2. Inspect ...\\.codex\\sandbox\\requests\\ after the command completes.
  3. Observe request-*.json files remain on disk.

What is the expected behavior?

Request files should be removed after they are read (best-effort cleanup, including error paths).

Additional information

Relevant code: codex-rs/windows-sandbox-rs/src/command_runner_win.rs reads the request file but never deletes it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLIIssues related to the Codex CLIbugSomething isn't workingsandboxIssues related to permissions or sandboxingwindows-osIssues related to Codex on Windows systems

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions