Skip to content

Windows Codex app: approval policy does not match config.toml, and write_stdin cannot display an approval prompt #50768

Open

Description

@w9g255gtv9-del

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

26.930.31730

What subscription do you have?

ChatGPT Pro

What platform is your computer?

"$([Environment]::OSVersion | ForEach-Object VersionString) $(if ([Environment]::Is64BitOperatingSystem) { "x64" } else { "x86" })"

What issue are you seeing?

Operating system: Windows
Date: October 4, 2026 (UTC+8)

Problem:
When using Sites to synchronize website source code, write_stdin is rejected without displaying an approval prompt. This prevents me from completing and deploying a website update.

My config.toml contains:

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

I confirmed that these settings were saved, fully closed and restarted Codex, and granted the requested network permission.

However, the operation still fails with:

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

Steps to reproduce:

  1. Save the settings above in config.toml.
  2. Fully close and restart the Codex app.
  3. Ask Codex to update an existing Sites website.
  4. Grant the requested network permission.
  5. The source synchronization workflow starts, but write_stdin is rejected with the error above.

Expected behavior:
When an operation requires approval, the app should display a prompt allowing me to approve or deny it.

Actual behavior:
The operation is rejected before an approval prompt appears. The error indicates that sandbox_approval is false despite approval_policy being set to "on-request".

Please help determine whether a startup override, managed policy, or session setting is overriding config.toml, and how to restore manual approval prompts.

Feedback / Session ID:
01a104a9-9362-71e3-ae46-b6555c248d4d

What steps can reproduce the bug?

  1. On Windows, configure C:\Users\User.codex\config.toml with:

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

  1. Save the file, fully exit the Codex app, and restart it.
  2. Ask Codex to modify an existing Sites website.
  3. Codex starts site-workflow.mjs in a terminal session to synchronize the website source code.
  4. Grant the requested network permission.
  5. When Codex uses write_stdin to send the workflow input, the operation is rejected with:

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

No approval prompt appears, so I cannot approve the operation. The website update and deployment remain blocked.

The saved config.toml settings were verified, but the runtime error still reports sandbox_approval = false.

Codex App version: 26.930.31730 (build 12947)
Feedback / Session ID: 01a104a9-9362-71e3-ae46-b6555c248d4d

What is the expected behavior?

No response

Additional information

The issue persisted after multiple full app restarts.

The request_permissions tool successfully displayed a network permission prompt, which I approved. However, write_stdin was subsequently rejected without displaying an approval prompt.

Please help identify which configuration or runtime policy is setting sandbox_approval to false despite approval_policy = "on-request".

Feedback / Session ID:
01a104a9-9362-71e3-ae46-b6555c248d4d

Activity

  1. added
    app
    on Oct 4, 2026
  2. added
    bug
    windows-os
    sandbox
    tool-calls
    config
    on Oct 4, 2026
  3. chrichuang218 commented on Oct 8, 2026

    @chrichuang218

    same, cant delete useless files wtf

  4. song476258323-lgtm commented on Oct 11, 2026

    @song476258323-lgtm

    Independent Windows reproduction on 2026-10-11.

    Environment verified: bundled codex-cli 0.162.0-alpha.17.2; Node v24.19.0. Desktop UI shows Ask for approval. Exact About-dialog version was not collected.

    The official Sites site-workflow.mjs starts through exec_command(tty: true) and prints "Ready for Site workflow JSON on stdin (input is hidden)." write_stdin with its required credential-bearing JSON is rejected before execution:

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

    request_permissions successfully granted network and project-scoped filesystem permissions, both separately and together. Starting a fresh helper after the combined grant did not fix it. The user reported restarting the application before retrying.

    Additional discriminating test in the same conversation: a fresh trivial Node process receiving only "probe" through write_stdin succeeded and printed STDIN_OK. A subsequent fresh official Sites helper still rejected its required JSON. Therefore this is not a blanket failure of every non-empty stdin call. We have not established whether payload classification, process state, or another factor explains the difference.

    Expected: supported source synchronization within granted permissions, or an actionable approval prompt. Actual: the publication workflow is denied without a prompt.

    Separate local build failure matches #52593 (native realpath EPERM). No shared cause is established. No private project data, local paths, account information, credential values or session logs included. Please provide a supported correction that preserves permission boundaries.

    Update later on 2026-10-11: the conversation's effective approval configuration changed so that narrowly scoped require_escalated execution could be reviewed and approved. With that supported approval, the official helper accepted its stdin input and source synchronization succeeded. The production build also succeeded outside the ordinary sandbox, and the Site update was successfully deployed. This completed the user task but does not establish a durable fix for the original granular policy or native path-resolution behavior inside the ordinary sandbox. We did not disable the sandbox or modify security policy files.

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

    appbugconfigsandboxtool-callswindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions