Skip to content

Windows desktop: /sandbox-add-read-dir missing while persistent MCP worker gets EPERM on user-profile ancestor #52111

Open

Description

@b-aricha

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

App version not verified. Bundled CLI: codex-cli 0.160.1.

What subscription do you have?

Windows 11 x64, build 10.0.26300.9550

What platform is your computer?

No response

What issue are you seeing?

Summary

In a local project chat in the ChatGPT Windows desktop app, a persistent MCP node_repl worker can read specific files inside the workspace, but resolving the user-profile ancestor fails with EPERM. The documented /sandbox-add-read-dir command is unavailable in that chat's command picker.

I cannot tell whether this is a desktop command-availability issue, an MCP permission-scope issue, or a documentation mismatch.

Environment

  • Windows 11; CMD reports 10.0.26300.9550.
  • Running --version on the configured bundled executable returned codex-cli 0.160.1.
  • Sanitized executable path: C:\Users\<user>\AppData\Local\OpenAI\Codex\bin\<bundle-id>\codex.exe.
  • Desktop app version: not independently verified; the CLI result above is not an app-version measurement.
  • Composer permission control showed Ask for approval.
  • The affected session reported workspace-write, managed/restricted execution; config contains [windows] sandbox = "elevated".
  • The Agent environment native/WSL setting was not located or verified in the app UI.

Observed sequence

  1. A read-only preflight using node:fs/promises in the existing persistent worker reached realpath on the user-profile directory.
  2. It failed with the following error (username redacted):
    EPERM: operation not permitted, realpath 'C:\Users\<user>'
    
  3. Specific workspace files could be read and hashed. The failure occurred before the planned test process was launched.
  4. In the same project chat, / opens the command picker, but /sandbox displays No commands.
  5. Entering /sandbox-add-read-dir C:\Users\<user> was treated as an ordinary chat message. No access-grant confirmation was received.

These are prior observations, not a fresh test performed for this report.

Expected behavior / clarification requested

The Windows sandbox documentation describes a directory-scoped read grant for later sandboxed commands in the current session:
https://learn.chatgpt.com/docs/windows/windows-sandbox#grant-sandbox-read-access

Please clarify:

  1. Is this command supported in this desktop surface/build? If not, what supported narrow read-grant mechanism should be used?
  2. Does a successful grant apply to an already-running persistent MCP worker, or only to newly started sandboxed commands?
  3. What diagnostic or recovery procedure is recommended before restarting a worker with state that must be preserved?

I am seeking a supported scoped permission path, without switching to Full access. No successful grant or resolved cause has been established. Project code, full configuration, session identifiers and unredacted logs are intentionally excluded from this public report.

What steps can reproduce the bug?

  1. Open a local project chat in the Windows desktop app with an existing persistent MCP node_repl worker.
  2. A read-only preflight using node:fs/promises fails when resolving C:\Users<user> with EPERM, although specific workspace files can be read.
  3. Type / in the chat composer: the command picker appears.
  4. Type /sandbox: the picker displays "No commands".
  5. Entering /sandbox-add-read-dir C:\Users<user> is treated as an ordinary chat message, with no permission-grant confirmation.

These describe prior observations; no additional test was launched.

What is the expected behavior?

No response

Additional information

No response

Activity

  1. added
    app
    on Oct 8, 2026
  2. added
    bug
    windows-os
    mcp
    sandbox
    on Oct 8, 2026
  3. b-aricha commented on Oct 8, 2026

    @b-aricha
    Author

    Correction to the form fields:

    • Subscription: ChatGPT Pro.
    • Platform: Windows 11 x64, build 10.0.26300.9550.

    The Windows version was accidentally entered in the subscription field.

    Expected behavior: the documented directory-scoped read-grant command should be available, or a supported alternative should be provided. Please clarify whether a grant applies to an already-running persistent MCP worker.

    The sanitized path in the reproduction steps is C:\Users\<user>.

  4. b-aricha commented on Oct 8, 2026

    @b-aricha
    Author

    The documented directory-scoped read-grant command should be available, or the app should provide a supported alternative without requiring Full access. Please clarify whether a successful grant applies to an already-running persistent MCP worker or requires a new worker.

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

    appbugmcpsandboxwindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions