Skip to content

Windows: official Sites workflow starts a PTY but required write_stdin and Ctrl-C are rejected under granular policy #49636

Open

Description

@anastasiou210979-jpg

Environment

  • Windows, Codex desktop app 26.928.21956, build 12404, prod channel; update check reports up_to_date.
  • Bundled codex-cli 0.159.2.
  • Sites plugin 0.1.75.
  • Managed workspace-write permission profile with granular approvals. sandbox_approval is false; request_permissions is available.
  • Date observed: 2026-09-30.

Problem

An official Sites workflow starts successfully in a workspace directory with tty:true and asks for its supported hidden JSON stdin input. The subsequent write_stdin is rejected by the approval layer, including Ctrl-C cleanup sent through the same tool.

The policy rejection itself may be intentional. The integration problem is that the official workflow reaches a waiting PTY even though its required input and cancellation cannot be delivered under the enforced profile.

Steps observed

  1. Obtain a short-lived credential through the native Sites source-repository credential tool for an existing project.
  2. Launch node <Sites-plugin>/scripts/site-workflow.mjs --project-id <existing-project-id> in an empty workspace subdirectory, with tty:true.
  3. Observe Ready for Site workflow JSON on stdin (input is hidden).
  4. Send the documented credential JSON with write_stdin to that returned exec session.
  5. Observe the rejection below.
  6. Sending Ctrl-C via write_stdin is rejected with the same error.

This occurred for two separate existing Sites. A turn-scoped network grant had already been approved via request_permissions.

Exact error

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

Expected behavior

Either provide a policy-compatible supported path for the official workflow, or reject the incompatible workflow before launching a waiting process with a clear diagnostic. Please also investigate whether cancellation of an already-started PTY can be supported without granting broader access.

I am not requesting a bypass or removal of managed protections.

Impact and evidence limits

Source opening/fetch, push, version save and deployment did not take place. Credentials were not delivered after the rejection, nor placed in argv or files. Process termination was not confirmed because Ctrl-C was also rejected.

The suggested $CODEX_HOME/.sandbox/sandbox.log was checked and was absent. No raw session transcript is attached because it can contain private application data and credentials. This report intentionally omits private project IDs, account email, tokens and production data.

OpenAI Help Center's automated support directed this report to the Codex GitHub issue tracker and could not issue a support ticket.

Activity

  1. added
    bug
    app
    windows-os
    sandbox
    tool-calls
    skills
    on Sep 30, 2026
  2. github-actions commented on Sep 30, 2026

    @github-actions
    Contributor

    Potential duplicates detected. Please review them and close your issue if it is a duplicate.

    Powered by Codex Action

  3. pemdes-hub commented on Sep 30, 2026

    @pemdes-hub

    Also reproduced on Windows on October 1, 2026 while publishing an existing Site through the official Sites workflow.

    Feedback ID: 01a0f37e-04af-7b10-8ad9-55406699feb0

    The UI shows “Ask for approval”. Network and Git-directory permissions were granted, but write_stdin is rejected with:

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

    Restarting the app and laptop did not resolve the issue. The workflow starts and waits for hidden JSON input, but authentication input cannot be delivered. Publication remains blocked.

  4. anbangligang1234-ops commented on Oct 1, 2026

    @anbangligang1234-ops

    Additional reproduction while publishing an existing ChatGPT Site from the Codex desktop app on Windows.

    The failed publish attempt was on September 30, 2026; the effective session restrictions were still present when checked on October 1 (Asia/Shanghai).

    Observed environment and steps

    • The session reports a read-only sandbox and a managed, restricted filesystem profile.
    • Granular approvals have sandbox_approval=false; request_permissions is available.
    • Scoped project-directory write and network requests were approved, but did not remove the blocker.
    • The local static build and output checks passed.
    • The official site-workflow.mjs was launched in the existing checkout with tty:true and reported:
      Ready for Site workflow JSON on stdin (input is hidden).
    • Sending the documented newline-terminated workflow input through write_stdin was rejected before execution:
    write_stdin rejected: approval required by policy, but AskForApproval::Granular.sandbox_approval is false
    

    Separately, Git staging failed to create .git/index.lock with Permission denied, despite a scoped write grant. Restarting the desktop app did not resolve the publish failure. The runtime policy's origin has not been established, so this report does not attribute it to an organization administrator or claim that the denial itself is unintended.

    Requested guidance

    Please provide a supported, policy-compatible way to complete the official Sites publishing workflow, or fail clearly before starting a workflow that cannot receive its required input. We are not requesting a bypass, ACL changes, relocation of protected Git metadata, or removal of managed safeguards.

    The prepared source changes remain local and have not been published. No credential was delivered after the blocked input action. This comment intentionally excludes the website domain, project/account identifiers, email, personal filesystem paths, credentials, raw logs, and session transcripts. No independently verified desktop-app build number is being asserted.

  5. aetherxeg-source commented on Oct 2, 2026

    @aetherxeg-source

    A lifecycle-authority invariant seems useful here:

    authorized process creation != authorized process stewardship

    For an interactive PTY, starting the process is only one edge of the lifecycle. If the workflow necessarily requires stdin delivery and a cancellation path, the runtime should establish those bounded capabilities before process creation, or reject the launch as incompatible with the current policy.

    Conceptually:

    workflow requirements
    -> process-start authority
    -> session-input authority
    -> cancellation/termination authority
    -> launch
    

    The important part is that input/control authority can be scoped to the exact returned process/session generation; it need not imply a broader sandbox approval or arbitrary shell control.

    A strong regression would cover both supported designs:

    1. policy cannot grant a bounded PTY-control capability -> preflight fails and no waiting process is created;
    2. policy can grant it -> the caller may write only to that exact PTY generation and cancel it, without gaining wider filesystem/network authority.

    Then add a stale-session test: process A exits, process B reuses an internal slot/identifier, and delayed control for A must never reach B.

    That separates "this process may exist" from "this principal may safely steward this process through the rest of its required lifecycle."

  6. takohachi88 commented on Oct 2, 2026

    @takohachi88

    Additional reproduction on Windows with the Codex desktop app and Sites plugin 0.1.75.

    The user reports that the permission selector is already set to Ask for approval. The active session nevertheless exposes a granular approval policy with sandbox_approval=false. The source of that effective policy is unknown; I cannot establish whether this is a UI/session mismatch or an intentional higher-priority restriction.

    Observed sequence:

    1. Obtain a short-lived source-repository credential through the native Sites connector.
    2. Explicitly request network access and write access to the publication checkout's .git using request_permissions. Both are returned as granted for the session.
    3. Launch the official site-workflow.mjs with exec_command(tty: true).
    4. The process starts and displays Ready for Site workflow JSON on stdin (input is hidden).
    5. Attempt the documented newline-terminated JSON input through write_stdin.
    6. The tool call is rejected before the workflow receives the input:
    write_stdin rejected: approval required by policy, but AskForApproval::Granular.sandbox_approval is false
    

    The user completely restarted Codex and the same sequence still failed. Read-only Sites calls remain available, but source synchronization and publication have not completed.

    A targeted read of the user config.toml found no explicit approval_policy, sandbox_approval, or approvals_reviewer setting at that point. A configuration change was suggested afterward, but was not confirmed applied or tested, so it is not evidence of a workaround.

    Please clarify the supported permission path for the official stdin-based Sites workflow under this effective policy, and whether explicit request_permissions grants are intended to carry over to write_stdin. If the workflow cannot proceed under the profile, an actionable rejection before launching the waiting PTY would help.

    Exact desktop-app version and Windows build were not verified. No credential values, account identifiers, local user paths, private Site IDs, production URLs, or raw transcripts are included.

  7. takohachi88 commented on Oct 2, 2026

    @takohachi88

    Follow-up to the reproduction above: a targeted read now confirms that the user-level config.toml contains approval_policy = { granular = { sandbox_approval = true, rules = false, mcp_elicitations = true, request_permissions = true, skill_approval = false } } and approvals_reviewer = "user". A newly launched official Sites workflow in the current conversation still has its write_stdin input rejected with AskForApproval::Granular.sandbox_approval is false. This confirms that the saved user setting differs from the effective policy reported for this session. A restart after this latest configuration edit has not been confirmed, so this does not establish that the mismatch persists in a fresh session loaded from the edited config. No publication took place.

  8. takohachi88 commented on Oct 2, 2026

    @takohachi88

    Further diagnostic from a user-requested retry: before renewing explicit permissions, write_stdin was able to deliver the documented JSON and the Sites workflow exited with a generic preparation failure. A diagnostic copy that only expands the exception message identified Error: spawn EPERM at the Node child_process.spawn call used to start Git, during selectCheckout. Then request_permissions returned session-scoped network access and write access to the publication checkout's .git as granted. A fresh run of the unchanged official workflow reached its stdin prompt, but write_stdin was again rejected with AskForApproval::Granular.sandbox_approval is false. These are observations of different permission states, not proof that request_permissions caused the change. Neither run completed source synchronization or publication. This may help distinguish the child-process startup failure from the separate stdin approval rejection.

  9. asadullaabdurahimov-cloud commented on Oct 21, 2026

    @asadullaabdurahimov-cloud

    Additional reproduction on Windows on 2026-10-21 with Sites 1.1.0. Feedback submission completed successfully in the desktop app.

    Feedback ID: 01a15cec-44a7-7812-9439-0f4fa534e745

    The official Sites helper starts through exec_command with tty=true and displays Ready for Site workflow JSON on stdin (input is hidden). The required write_stdin call, and subsequently Ctrl-C through the same tool, are rejected before execution:

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

    A separate minimal test also reproduces this: start a Node process waiting for stdin, then send only probe\n through write_stdin. No credentials, network activity, or website code are needed; the test process exits automatically after 25 seconds. A session-scoped network grant through request_permissions did not resolve the Sites workflow rejection.

    Additional diagnostic data:

    • Installed standalone CLI: 0.163.0-alpha.10.2; Windows build 26300.9711.
    • codex doctor reports installed desktop-app version 26.1013.4894.0; the running app version was not independently verified.
    • A separate codex features list invocation reports unified_exec=true and unified_exec_tty=true. codex doctor explicitly says active thread overrides were not inspected, so these CLI results do not establish the live desktop thread policy.

    The website update remains blocked. The effective restriction's origin is still unknown. Please investigate the supported stdin/cancellation path for an already-started process, or an actionable rejection before an incompatible workflow starts. This comment excludes credentials, personal local paths, account email, private Site identifiers, production domains, and raw logs.

  10. ausmeek-spec commented on Oct 21, 2026

    @ausmeek-spec

    Additional reproduction on Windows on 2026-10-21, with a comparison between the agent sandbox and normal owner PowerShell.

    Feedback ID from the app's issue link: 01a15d6e-b0f0-7e40-8b5f-3da1f5a9b386

    Environment:

    • Running-app native update check: 26.1016.51333, build 21161, production channel, up_to_date.
    • Official CLI used for both diagnostic runs: 0.163.0-alpha.11.
    • Windows 11 Professional x64, build 26300.9711; Sites plugin 1.1.0.
    • An existing local project is selected, independently confirmed through task metadata.
    • The owner confirmed Ask for approval is selected in this chat's permissions control.

    The supported request_permissions network grant succeeds. The unchanged official site-workflow.mjs starts with tty:true and waits for its hidden JSON input. The required write_stdin, and a subsequent Ctrl-C to that same waiting process, are both rejected before delivery:

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

    The effective chat policy is workspace-write with granular sandbox_approval=false, rules=false, skill_approval=false, request_permissions=true, and mcp_elicitations=true. No source credential reached the waiting helper and publication did not occur.

    New diagnostic comparison, using codex doctor --json from the same executable:

    Check Normal owner PowerShell Agent sandbox
    Configuration/home Loaded and resolved Config load fails (entity not found); home/CODEX_HOME unresolved
    Approval policy OnRequest Live tool rejection reports granular sandbox_approval=false
    Provider reachability HTTP and WebSocket checks pass TLS/certificate reachability check fails

    The normal diagnostic has no failed checks, but explicitly says active thread overrides were not inspected. It does not establish the live desktop thread's effective policy. Likewise, the sandbox-only home/TLS findings are observations, not an established root cause or a reason to weaken TLS or Windows protections.

    Read-only checks found no explicit approval-policy keys in the user config and none of the checked user, system, or workspace requirements/config override files. Earlier mode-selection/restart attempts had not resolved the recurrence. The running app's update check found no eligible update.

    Please investigate which layer supplies the different effective chat policy and provide a supported bounded stdin/cancellation path, or reject the incompatible workflow before starting a waiting PTY. Redacted diagnostic comparison and selected setup-log excerpts are retained locally and can be provided privately if useful. This public comment includes no credentials, personal filesystem paths, account email, private Site/project identifiers, customer records, or raw session transcripts.

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

    appbugsandboxskillstool-callswindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions