Skip to content

Windows: “Ask for approval” selected, but runtime disables sandbox approval requests #50738

Open

Description

@mrunal028

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

Unknown — unable to retrieve the installed desktop app version.

What subscription do you have?

ChatGPT Plus

What platform is your computer?

No response

What issue are you seeing?

The Windows desktop app shows “Ask for approval” selected, but approval requests are automatically rejected without presenting an approval prompt. This blocks publishing an updated private Site.

The session reports:

CODEX_PERMISSION_PROFILE=:workspace

GranularApprovalConfig { sandbox_approval: false, rules: false, skill_approval: false, request_permissions: true, mcp_elicitations: true }

The supported Sites workflow fails during the hidden credential stdin handoff with:

“write_stdin rejected: approval required by policy, but AskForApproval::Granular.sandbox_approval is false”

A separate harmless escalation probe returned:

“reject command — you cannot ask for escalated permissions if the approval policy is Granular(... sandbox_approval: false ...)”

A Git checkpoint attempt also reported:

“.git/index.lock: Permission denied”

I cannot determine whether the selected permission mode is failing to reach the runtime or whether a managed policy is overriding it without clearly explaining the restriction.

What steps can reproduce the bug?

Feedback ID: 01a10271-7af8-7293-b90e-289fb5c5504c

What is the expected behavior?

The permission control should accurately reflect the effective session policy.

When an operation is permitted by workspace policy but requires consent, “Ask for approval” should present a scoped approval prompt.

If a managed policy prohibits sandbox approvals, the interface should clearly explain that restriction and indicate that the selected mode cannot enable those requests.

Additional information

In-app feedback has already been submitted.

Feedback ID:
01a10271-7af8-7293-b90e-289fb5c5504c

The updated project source and a recovery archive are preserved locally. Publishing did not complete, and the previous hosted version remains unchanged.

Please investigate the difference between the selected UI permission mode and the reported effective runtime policy, and provide the supported resolution.

Activity

  1. added
    app
    on Oct 3, 2026
  2. added
    bug
    windows-os
    sandbox
    on Oct 3, 2026
  3. mrunal028 commented on Oct 3, 2026

    @mrunal028
    Author

    #50604 appears to describe the same symptoms: Windows desktop, “Ask for approval” selected, and write_stdin rejected because sandbox_approval=false.

    My diagnostic feedback ID is 01a10271-7af8-7293-b90e-289fb5c5504c.

    Please confirm whether this should be tracked under #50604. Publishing remains blocked.

  4. juye8899 commented on Oct 17, 2026

    @juye8899

    Same issue on Windows, Codex desktop app, ChatGPT Work.

    • Version 26.1013.3656: new Work conversations had full access (approval never, dangerFullAccess) and worked fine.
    • After the update to 26.1013.4894 (the sandbox log now shows the new MXC sandbox selected), new conversations are created with workspaceWrite, writableRoots ["/tmp"], and approvalPolicy granular with sandbox_approval=false.
    • The UI shows "Full access" selected, "Full access" is enabled in Settings > General, global agent-mode is full-access, and config.toml has sandbox_mode = "danger-full-access". The runtime still rejects commands with:
      Rejected("approval required by policy, but AskForApproval::Granular.sandbox_approval is false")
    • Without a project selected, "Ask for approval" is greyed out. With a project selected it becomes selectable and works (one approval prompt, then the commands succeed).
    • Existing conversations also get the restricted policy when a new turn is sent.
  5. Maciej26code commented on Oct 29, 2026

    @Maciej26code

    Additional Windows evidence: “Approve for me” selected, but Cloud Work escalation rejected before process launch

    I have additional diagnostic evidence from an existing ChatGPT Cloud Work session using a connected local Windows executor on October 29, 2026. The account owner explicitly confirms that “Approve for me” was selected throughout and is their usual permission mode. This UI selection is user-reported; no independent raw Cloud backend trace or screenshot of the setting was recovered.

    Observed Cloud Work behavior

    • Ordinary local command context: Windows Session 1, LOW integrity (RID 4096), AppContainer=true, not administratively elevated.
    • Exactly one exec_command request with sandbox_permissions="require_escalated" and a justification, without a persistent prefix_rule.
    • Intended operation: a bounded, read-only diagnostic of process identity and access rights to existing local application-state files; no file-content changes.
    • Rejected before process launch, with no approval prompt or automated approval outcome. The retained structured evidence records native_attempts: 1, native_process_started: false, and authorized_medium_tests: NOT_RUN.
    • Observation window: 2026-10-29 21:09:10–21:09:51 UTC (the precise rejection second is not preserved).

    Exact reported rejection:

    approval policy is Granular(GranularApprovalConfig { sandbox_approval: false, rules: false, skill_approval: false, request_permissions: false, mcp_elicitations: true }); reject command — you cannot ask for escalated permissions if the approval policy is Granular(GranularApprovalConfig { sandbox_approval: false, rules: false, skill_approval: false, request_permissions: false, mcp_elicitations: true })
    

    Controlled comparison on the same Windows computer

    A separate Local Work task used approval_policy="on-request" and sandbox_policy="workspace-write". Its raw session transcript records a successful require_escalated diagnostic at 2026-10-29 20:50:35 UTC. The resulting process ran as MEDIUM integrity (RID 8192), AppContainer=false, elevated=false; existing-object access checks passed without writing contents. This demonstrates a non-administrative authorized execution context is sufficient for the tested resources.

    Local Work transcript metadata identifies originator=codex_work_desktop and cli_version=0.166.0-alpha.5.1. That version is for the Local Work harness only, not a verified Cloud Work runtime or desktop frontend version; those remain unknown.

    Impact and limits

    An earlier PermissionError 13 opening a local state-lock file in append/write mode blocked the workflow, while read-only inspection succeeded. That access failure and the subsequent policy rejection are distinct observations; their common root cause is not proven. The Cloud report and structured JSON agree, but an independent raw Cloud backend trace was not recovered. There is evidence of one escalation attempt, not repeated identical rejections. Protected state hashes were unchanged before/after. This is related evidence, not a claim of identical root cause to the issue above.

    Questions for maintainers

    1. When “Approve for me” is selected, is sandbox_approval=false and request_permissions=false intentional for Cloud Work using a connected Windows executor?
    2. If not, which policy layer is supplying this effective configuration, and could the selected mode fail to propagate to the executor?
    3. What supported, narrowly scoped authorization path exists for non-admin MEDIUM execution of trusted local operations, ideally without requiring unrestricted access?
    4. Can the UI expose the effective policy and explain when the selected mode cannot authorize a requested command?

    No ACLs, sandbox policies, credentials, system services, or production code were changed during these diagnostics. We can provide sanitized excerpts privately if useful.

  6. Maciej26code commented on Oct 29, 2026

    @Maciej26code

    Environment follow-up: verified Windows 11 build and ChatGPT/Codex desktop package versions

    A short correction/addendum to my earlier diagnostic comment: I have now verified the host OS and installed Windows desktop package directly on the affected computer.

    Verified Windows environment (read-only, October 29, 2026):

    • Microsoft Windows 11 Pro, 64-bit
    • DisplayVersion: 26H2
    • OS build: 26300.9711 (Win32_OperatingSystem.Version: 10.0.26300, BuildNumber: 26300, registry UBR 9711).
    • The OS name was independently confirmed from Win32_OperatingSystem.Caption and Get-ComputerInfo.OsName; the legacy ProductName registry key alone was not used to identify Windows 11.

    Verified installed ChatGPT/Codex Windows app package:

    • OpenAI.Codex 26.1027.3384.0 (x64), confirmed via Get-AppxPackage.
    • Separately, previously captured application logs identified an internal app build 26.1027.30824. This is a different versioning field, not an OS build or verified Cloud Work executor version.

    Two successful desktop package updates recorded October 29 (Europe/Warsaw):

    1. 19:48:23–19:48:26 — OpenAI.Codex 26.1023.6123.0 → 26.1023.6621.0.
    2. 20:43:26–20:43:28 — 26.1023.6621.0 → 26.1027.3384.0.

    These transition times come from earlier read-only inspection of Microsoft-Windows-AppXDeploymentServer/Operational records (Event IDs 855/400). They establish installation/update timing, not which update, if any, caused the approval-policy behavior.

    Important scope distinction: the affected Cloud Work executor/backend build remains unknown. The independently observed Local Work CLI version 0.166.0-alpha.5.1 must not be attributed to the Cloud Work executor or desktop frontend.

  7. Meena-Sathiya commented on Nov 1, 2026

    @Meena-Sathiya

    Additional Windows evidence: read-only CIM monitoring unavailable while command escalation is disabled with Ask for approval selected.

    Observed on November 1, 2026 in an existing desktop chat using local Windows execution. This is related evidence, not a claim that the root cause is identical to the Sites workflow in this issue.

    Environment and permission evidence:

    • Windows registry build fields: DisplayVersion 26H2, CurrentBuildNumber 26300, UBR 9457. The OS edition was not independently verified.

    • The user supplied a screenshot showing Ask for approval selected. The visible menu offered Ask for approval and Approve for me; no Custom option was shown.

    • Local sandbox logs reported MXC availability=true and Windows sandbox selection=mxc.

    • The desktop startup log reported app-server version 0.166.0-alpha.5.1. This is not a verified desktop frontend version or cloud-backend version.

    • Session submission records after an application restart explicitly supplied approvals_reviewer=User together with:

      sandbox_approval=false
      rules=false
      skill_approval=false
      request_permissions=true
      mcp_elicitations=true

    Observed behavior:

    1. A read-only collector queried two exact existing/planned application-specific scheduled-task names and the relevant local Python processes. It never invoked task registration or start/stop methods.
    2. The task queries returned MethodInvocationException (HResult -2146233087); process queries returned HResult -2146233088. The captured task error was: "Access to a CIM resource was not available to the client."
    3. Earlier narrowly scoped command-escalation attempts were rejected by the runtime policy before execution because granular.sandbox_approval=false. No approval prompt appeared.
    4. The user selected Ask for approval, then fully quit and reopened the app. A fresh bounded read-only probe at 12:34 UTC returned the same unavailable task/process results. We did not repeat prohibited escalation probes after that.
    5. The same collector previously ran successfully in the user's normal PowerShell context at 11:38 UTC on the same date. Later direct file/database reads through Codex also succeeded. Those are separate access paths; neither establishes a repair of CIM permissions or current process liveness.

    Selected local config and known system-requirement paths did not reveal an explicit matching approval override. This does not rule out other app, account, cloud, or managed-policy sources. The saved legacy windows.sandbox=elevated value did not identify the actual selected implementation; the runtime log showed MXC.

    The CIM restriction itself may be intentional sandbox isolation. Please clarify the supported path for obtaining consent for a narrowly scoped, read-only host task/process query when Ask for approval is selected but sandbox_approval remains false. If such access is intentionally unsupported, the UI should explain that boundary and identify the authoritative policy source.

    No security settings, Windows ACLs, services, installed application code, credentials, or scheduled tasks were changed during these diagnostics. Private paths, task names, account identifiers, session IDs, screenshots, and raw logs are omitted from this public comment.

  8. pbnpbnbkx1 commented on Nov 20, 2026

    @pbnpbnbkx1

    [Windows][Codex App / Work Local] Sandbox escalation denied before user approval prompt — sandbox_approval=false

    Environment

    • OS: Windows 11
    • Codex App version: 26.1111.9664.0 (x64)
    • Codex CLI version: 0.171.0 (separately tested)
    • SQL Server: Local SQL Server named instance
    • Authentication: Windows Integrated Authentication
    • Date observed: November 20, 2026

    Problem

    When using Codex App / Work Local on Windows, the agent cannot request permission to execute commands outside the sandbox.

    The permission request is automatically rejected before any approval dialog appears.

    The effective runtime configuration reports:

    sandbox_approval: false
    request_permissions: false
    reject command — you cannot ask for escalated permissions
    

    The UI shows three permission options:

    • Ask for approval — disabled / greyed out
    • Approve for me — selected
    • Full access — available but not selected

    The user wants to manually approve individual elevated commands without granting unrestricted access.

    Steps to Reproduce

    1. Open Codex App on Windows.
    2. Start a local workspace session.
    3. Keep "Approve for me" selected.
    4. Ask the agent to run a read-only sqlcmd command against a local SQL Server instance outside the sandbox.
    5. The agent requests sandbox escalation.
    6. The request is rejected before reaching the user approval UI.
    7. Repeat with curl.exe — the same permission rejection occurs.

    Expected Behavior

    The user should be able to select "Ask for approval" and receive an interactive approval prompt for commands requiring sandbox escalation.

    If manual approval is unavailable in this environment, the UI should explain the restriction.

    Actual Behavior

    No approval prompt appears.

    Both sqlcmd and curl.exe escalation requests are rejected immediately.

    Troubleshooting Performed

    Test A — Normal PowerShell

    The read-only sqlcmd connectivity query succeeds when executed in a normal Windows PowerShell session outside Codex.

    Expected result: One row is returned containing the SQL Server instance name and current database name.

    Actual result: Query completed successfully and returned one row.

    The raw output is intentionally omitted because it contains local environment identifiers.

    This confirms that the local SQL Server instance is accessible from the normal Windows user environment.

    Test B — Codex App configuration

    The original config.toml contains:

    [windows]
    sandbox = "unelevated"

    The following settings were temporarily added:

    approval_policy = "on-request"
    sandbox_mode = "workspace-write"

    After restarting the App, an error notification briefly appeared, but its content could not be captured.

    Repeated escalation requests still reported:

    sandbox_approval: false
    request_permissions: false
    

    The precise reason the modified configuration did not enable manual approval is unknown.

    Test C — Codex CLI 0.171.0

    The same SQL connectivity query was tested in Codex CLI.

    The command was executed but failed to establish the SQL Server connection. ODBC Driver 17 reported connection and SSL/security-provider errors.

    This is a separate observation and does not establish that CLI permission escalation is broken.

    Questions for Maintainers

    1. Is "Ask for approval" intentionally unavailable in Windows Codex App / Work Local sessions?
    2. Why are both sandbox_approval and request_permissions set to false despite the user wanting manual approval?
    3. Does Work Local override approval_policy = "on-request" from config.toml?
    4. Is there a supported way to allow per-command sandbox escalation without enabling Full access?

    Related Issues

  9. owenneuber commented on Nov 24, 2026

    @owenneuber

    Related reproduction from November 24, 2026. A Windows-hosted Codex Work chat targeting a project in Ubuntu’s WSL filesystem rejected two read-only workspace command attempts using exec_command with sandbox_permissions: "require_escalated" and the wsl -d Ubuntu -- prefix. A minimal equivalent command is wsl -d Ubuntu -- pwd.

    The tool returned GranularApprovalConfig { sandbox_approval: false, rules: false, skill_approval: false, request_permissions: false, mcp_elicitations: true } with you cannot ask for escalated permissions if the approval policy is Granular. The tool rejected the request before WSL launched, and no approval prompt appeared. The account holder reports the same Windows-to-WSL approval workflow works in other existing Codex chats for the same project. Their effective policy was not independently verified.

    Could you clarify which session or workspace setting accounts for this difference, and which supported Windows-to-WSL route should be available in an affected chat? If sandbox approvals are intentionally disabled, surfacing that in the chat’s permission controls would help diagnose it.

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