Skip to content

Codex Windows: CreateProcess Rejected blocked by policy despite Full Access #54746

Open

Description

@2ynh2b5skk-ui

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

1.2026.190.0

What subscription do you have?

ChatGPT Plus

What platform is your computer?

Windows 11 Home, version 25H2, build 26200.9711, x64

What issue are you seeing?

Codex on Windows fails to execute a local security repair command with the following error:

exec_command failed: CreateProcess
Rejected(...)
rejected: blocked by policy

Full Access is enabled.

The session configuration previously reported:

sandbox_mode = danger-full-access
approval_policy = never

No approval request is generated. /approve shows no available commands, and /debug-config is interpreted as plain text.

The operation was intended to restart only a local web dashboard and rotate a compromised password.

The available sandbox logs do not contain the rejection message. They show both mxc and elevated selections, but neither has been conclusively linked to the failed command.

What steps can reproduce the bug?

Feedback ID: 01a14589-8e19-7c10-8514-a5d29e26326e

What is the expected behavior?

Codex should either execute an authorized operation within the effective sandbox policy or provide a specific, actionable explanation of which policy prevents it.

If an approval is required, the application should expose an appropriate approval workflow.

The user should be able to apply a narrowly scoped security repair without disabling general protections or affecting unrelated processes.

Additional information

Windows: 11 Home 25H2, build 26200.9711, x64.

ChatGPT Windows application version: 1.2026.190.0.

Sandbox log entries include:

Windows sandbox selection: mxc
MXC availability: true
Windows sandbox selection: elevated

The effective sandbox mode at the moment of rejection remains unconfirmed.

CODEX_HOME was not defined in the inspected shell.

The default .codex/.sandbox/sandbox.log was absent, but two other sandbox log files existed.

Feedback ID:
01a14589-8e19-7c10-8514-a5d29e26326e

No security settings were changed, and the blocked command was not retried.

Please advise how to identify the effective blocking policy and resolve this issue safely.

Activity

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

    @PowerBIIT

    Additional bounded diagnostic evidence from Windows desktop:

    • Installed desktop package: 26.1013.4894.0; local Codex executable: 0.163.0-alpha.10.2.
    • A tool invocation was rejected before process creation with CreateProcess: Rejected(... rejected: blocked by policy).
    • Unlike the unconfirmed-at-rejection configuration in the original report, the recorded turn context for this failure already had approval_policy=never, sandbox_policy.type=danger-full-access, and permission_profile.type=disabled.
    • The invocation did not request escalation. There was no child-process output or downstream HTTP response.
    • Read-only follow-up checks found no matching local exec rule/hook in the inspected standard locations. A fresh diagnostic app-server resolved the same approval/sandbox settings and returned null for configRequirements/read. This current diagnostic server is not proof of which historical policy decision caused the rejection.
    • Parsing the original PowerShell command as data produced zero syntax errors. Other ordinary local commands work.

    Could maintainers clarify which supported diagnostic exposes the deciding policy/reason for this pre-process rejection, and the supported resolution if the operation should be permitted? Full Access alone has not explained the denial. We have not disabled security settings or retried the rejected effect through an alternative executor.

    No project name, source code, command contents, logs, conversation history, session identifiers, credentials, or account details are included.

  4. bry-gif commented on Oct 18, 2026

    @bry-gif

    Additional file-deletion reproduction and approval-path result, 18 October 2026 (Windows desktop).

    Environment: the bundled executable reports codex-cli 0.163.0-alpha.10.2. The desktop application version was not independently established for this reproduction.

    An owner-authorized cleanup of one obsolete project-owned JPEG (85,878 bytes), inside the active project workspace, was rejected before PowerShell process creation:

    exec_command failed: CreateProcess
    Rejected(... rejected: blocked by policy)
    

    The attempted PowerShell command verified the exact resolved file path and checked for reparse points before using non-recursive Remove-Item -LiteralPath ... -Force. The observed error was a tool/runtime admission refusal, with no PowerShell output or Windows access-denied error.

    At that rejection, the chat supplied Full access settings (danger-full-access, approval policy never). Read-only inspection of the user configuration also found approvals_reviewer = "user". The inspected user rules file contained 12 allow rules and no prompt/forbidden rules. A read-only execpolicy check for a simplified single-file removal returned matchedRules: []; this checks only the supplied rules file and is not evidence that every runtime or managed policy permits the action. Inspected current-thread and desktop logs did not expose a deciding rule or rationale. The source of the refusal remains unresolved.

    The owner then explicitly changed this chat to Ask for approval. The supplied runtime permissions changed to workspace-write, and an exact-file request was submitted through the supported require_escalated approval route. It revalidated the directory/file types, resolved target, byte length and SHA-256 before removal. After approval, PowerShell returned exit code 0:

    {"RemovedFiles":1,"LogicalBytesRemoved":85878,"StillExists":false}

    This establishes a working approved route for that single action after the owner-controlled permission change. It does not establish the cause of the original Full access refusal, prove that all deletions are fixed, or test any recursive dependency cleanup.

    Please expose the deciding policy and an actionable review path for this class of pre-process rejection. If non-recursive, authorized workspace cleanup is intentionally blocked under Full access/never, the UI/error should explain that restriction and the supported next step. Users should not need to diagnose an unexplained denial or manually approve every routine project action.

    This report contains no private project paths, account details, credentials, raw logs, screenshots or session transcript.

  5. Zeusnee0316 commented on Oct 21, 2026

    @Zeusnee0316

    Additional Windows desktop incident: a local source edit was rejected before execution (2026-10-20).

    This is a separate incident from the read-only diagnostic described in #53977; I am not asserting an identical root cause.

    Observed result

    • At 2026-10-20T14:22:13.100Z, exec_command returned CreateProcess / Rejected / blocked by policy.
    • The requested operation was an edit to an existing local PowerShell startup script. The submitted edit itself did not start the service. The tool rejected the call before PowerShell/process creation; the edit did not execute.
    • The response supplied no specific enforcing rule, matched span, reason, or actionable review path. Ordinary independent reads, writes and isolated tests can run, so this is not a blanket inability to execute commands.
    • The affected task reported Full Access (danger-full-access) with approval policy never. These settings do not establish permission from every enforcement layer.

    Version and evidence limits

    • The exact historical enforcing backend/build has not been established. Do not infer it from the later app version.
    • After a user-performed restart, the app update checker reported desktop 26.1016.51333, build 21161, prod, up_to_date. A separate environment investigation reported bundled executor 0.163.0-alpha.11. These are follow-up observations, not incident-time component identities.
    • The rejected effect has NOT been retried, split, delegated, or routed through another tool after the update, so neither persistence nor repair of this exact rejection has been demonstrated. No security configuration was weakened.
    • The original application's earlier startup failure and this later edit rejection are separate unresolved events; the policy message does not diagnose the earlier startup failure.
    • In-app feedback logs reported body acceptance with incomplete attachment upload and no visible feedback ID. This is not evidence of a human support response or repair.

    Requested supported resolution

    1. Which supported diagnostic can identify the actual deciding component/rule and safe triggering span for a pre-process rejection, without publishing the full private command or session?
    2. If the operation is intentionally restricted under Never, what is the supported action-specific review procedure in the Windows desktop app? Auto-review is not active in Never mode, so this should not be labeled an automatic-reviewer decision without evidence.
    3. Does merged PR Avoid false URL-launch detections in literal PowerShell commands #54076 cover this class of source-edit request, and which desktop/executor release contains the applicable correction? The PR is a candidate reference, not a confirmed cause or fix for this incident.

    No project name, private paths, full command, source files, database contents, credentials, account identifiers, session/call identifiers, or raw logs are attached. The original incident is preserved locally; please specify an appropriate private correlation channel if needed. This report requests diagnosis and a supported resolution, not a bypass.

  6. robineverswift commented on Oct 25, 2026

    @robineverswift

    Additional successful approval-path comparison from Windows desktop, observed 2026-10-25. Consolidating #56826 here because the core behavior and supported recovery overlap with the earlier file-deletion report.

    • The affected task reported Full Access (danger-full-access, approval_policy=never). Explicitly authorized removal of identified application diagnostics/cache files was rejected before PowerShell started with CreateProcess ... rejected: blocked by policy; those rejected attempts deleted nothing.
    • Read-only follow-up found 43 explicit allow entries and no forbidden/prompt entries in the inspected user rules. A representative static execpolicy check against that file returned matchedRules: []. This does not cover every enforcement layer or identify the cause.
    • The user changed the same task to Ask for approval. The new context reported workspace-write; the normal require_escalated request with a specific cleanup justification was then approved and succeeded.
    • Actual result: 18 files removed, 0 skipped, 513,839,013 logical bytes removed, with a measured free-space increase of 513,875,968 bytes. A subsequent read-only check confirmed the target diagnostics/pipeline cache were absent and saved-game/configuration directories remained.

    The bundled CLI queried during diagnosis reported 0.164.0-alpha.11.1; this is not an independently verified desktop app version. The scripts had the same bounded purpose and checks, but the successful version tolerated missing directories, so this was not a byte-identical controlled experiment. The original enforcing rule remains unknown.

    This adds a successful multi-file result through the supported human-approval route, not proof of a universal deletion fix. Closing #56826 as a duplicate to keep the discussion together.

    No private paths, usernames, credentials, session identifiers, raw logs or conversation transcripts are included.

  7. tmaslancev108-ui commented on Oct 25, 2026

    @tmaslancev108-ui

    I am experiencing a similar issue in the Codex desktop environment on Windows.

    Incident: October 25, 2026, 14:45:26 Moscow time.

    Environment:

    • Full Access was enabled.
    • Effective session settings: approval_policy=never, sandbox_policy=danger-full-access.
    • Execution tool: exec_command, launching PowerShell.

    Observed behavior:

    The command was rejected before PowerShell started:

    CreateProcess ... rejected: blocked by policy

    No actionable policy explanation, rule identifier, or approval prompt was provided. The intended local development changes and tests were not executed.

    The command involved local application code and synthetic tests. No production services or physical devices were affected.

    I have already submitted feedback through the application. The exact call ID and command have been preserved for private investigation.

    I have not bypassed the restriction, disabled security protections, or retried the blocked operation through another execution method.

    Could the maintainers please clarify:

    1. Which policy or component caused this rejection?
    2. Is there an official way to request review of this specific blocked action?
    3. How can the user safely resolve this situation without disabling security protections?
    4. Is there a private channel for providing the exact call ID and sanitized diagnostic details?

    Thank you.

  8. zhangzz3 commented on Oct 26, 2026

    @zhangzz3

    I’m experiencing a similar issue in the Codex desktop app on Windows.

    Observed: October 26, 2026, UTC+8.

    Environment and authorization

    • The app UI shows Full Access.
    • The session reports sandbox_mode = "danger-full-access" and approval_policy = "never".
    • Chrome, Node.js, and Playwright are installed.
    • I explicitly authorized launching a separate browser and reusing my own saved login session for a development test.

    What happened

    I asked Codex to launch a fresh browser process with an isolated temporary profile to investigate a publishing-result detection bug.

    The launch attempt was rejected before the command ran. A simpler attempt to open Chrome with a new temporary profile—without injecting cookies or submitting any content—was also rejected.

    The tool returned:

    exec_command failed: CreateProcess {
      message: "Rejected(\"... rejected: blocked by policy\")"
    }
    

    Read-only shell commands continued to work, but the browser-launch commands did not execute. Reconfirming my authorization did not resolve the issue.

    Diagnostics performed

    • The inspected local execution-rule file contained no explicit forbidden rules.
    • The current session’s local approval-feedback table contained no records.
    • No actionable approval details or matching policy rule were found in the inspected session records.
    • The app still displayed Full Access.

    These checks do not cover every enforcement layer, so I cannot identify the policy responsible. The assistant initially described this as an automatic approval rejection, but that attribution was not verified; the confirmed error is only blocked by policy.

    Expected behavior

    An explicitly authorized browser-launch operation should either execute or return a specific denial reason and a supported recovery path.

    Actual behavior

    The operation is rejected without an actionable explanation or an approval prompt. The independent-browser test remains incomplete.

    Similar browser tests work on my other computers, although I have not established a version-matched comparison.

    Could the maintainers clarify which enforcement layer can produce this error under Full Access, where its decision details can be inspected, and how users should recover through the supported approval flow?

  9. demonslay677 commented on Oct 26, 2026

    @demonslay677

    Additional verified recovery on Windows desktop, 26 October 2026: switching the affected chat from Full Access to Ask for approval, then approving the specific restart request, resolved this incident.

    Environment and diagnosis

    • Desktop: 26.1021.31345, build 21828, production channel; the app update checker reported up to date.
    • Bundled executor: 0.164.0-alpha.11.1.
    • The recorded context at rejection had approval_policy=never and sandbox_policy=danger-full-access. Desktop logs resolved the reviewer as user.
    • The inspected user rules contained six allow rules and no deny/prompt rules. A fresh bundled app-server configuration lookup reported no managed requirements override. That fresh lookup does not reconstruct the historical decision.
    • No automatic-review records were present for this chat. Calling the original rejection an “automatic approval review” denial was therefore not supported by the evidence.

    The rejected operation was a bounded restart of one idle, owned localhost dashboard after identity and activity checks. It failed before execution with CreateProcess … rejected: blocked by policy.

    Recovery that worked

    1. In the affected chat, open the permissions control below the composer and change Full Access to Ask for approval.
    2. Ask Codex to request approval for the specific operation.
    3. Review and approve that request.

    After the switch, the context reported workspace-write. Codex submitted the restart using sandbox_permissions=require_escalated with an explicit justification. It completed with exit code 0 and a new server process. A sandboxed follow-up check stalled; a separately approved read-only localhost verification then succeeded.

    The running dashboard loaded the intended fix: all 131 history runs remained, the 33 false skipped-record warnings fell to zero, and the running-version endpoint reported no pending restart.

    No execution-rule overrides, Codex configuration-file edits, or binary patches were applied. This verifies recovery through the supported human-approval workflow for this operation, not a universal fix or a byte-identical controlled experiment.

    Remaining issue

    The exact original classifier match is still unconfirmed. The compound script included localhost HTTP checks and a separate process launch, making the Windows URL-launch heuristic a plausible explanation. #54076 addresses related false positives for independent literal commands but retains conservative handling for pipelines and script state; we have not established that it fixes this case.

    It would help if the rejection identified the deciding rule and, when applicable, explained that an interactive approval mode is needed instead of returning only “blocked by policy.”

  10. maxitaaaa commented on Oct 26, 2026

    @maxitaaaa

    Additional authorized static-deployment case observed on 2026-10-26 (UTC+8), in Codex Desktop for Windows.

    This adds a deployment example to the local-repair/deletion cases above. It is one observed incident, not a deterministic minimal reproduction or proof of a shared root cause.

    Observed operation and error

    • The user explicitly authorized a text-only update to a small, independent static information site, separate from the production dashboard.
    • A PowerShell exec_command intended to launch the installed Node/Wrangler CLI was rejected before process creation with CreateProcess ... rejected: blocked by policy.
    • The wrapper would use existing configured authentication in the child process environment, inherit the current Windows system proxy, launch with ProcessStartInfo/CreateNoWindow, and capture sanitized output. No secret values or complete private command are included here.
    • No process exit code, downstream deployment response, deciding rule ID, detailed rationale, or actionable per-operation approval entry was returned. The update was not deployed.

    Verified settings and limits

    • The rejection-time task context reported approval_policy=never and sandbox_mode=danger-full-access.
    • Desktop logs resolved the reviewer as user. Auto-review was not enabled.
    • The inspected local default.rules had no explicit forbid rules. This does not establish that other enforcement layers permitted the action.
    • The Desktop/executor build responsible for this rejection has not been independently established in this report.
    • The assistant initially called this an automatic-review rejection without sufficient evidence, then corrected that attribution. Please do not classify this incident as a confirmed Auto-review denial.
    • The user subsequently selected Ask for approval, and a later turn received workspace-write/restricted-network permissions. The original deployment has not been retried under that new context, so no claim is made that the permission selector failed or that this particular deployment is fixed.

    Impact and requested clarification
    The opaque error left the assistant unable to distinguish an intentional non-overridable restriction from an eligible operation requiring a different approval path. It also initially paused unrelated authorized backup work unnecessarily; that independent work was subsequently resumed.

    Please expose a privacy-safe enforcement-layer identifier and denial reason, and explain the supported action-specific review procedure when one exists. Legitimate safety denials should remain enforced; this is not a request to disable protections or permit policy circumvention.

    No raw logs, session history/identifiers, screenshots, credentials, account details, server addresses, private paths, repository names, or source files are attached.

  11. kadones70-svg commented on Nov 5, 2026

    @kadones70-svg

    Additional Windows incident, observed 5 November 2026: an explicitly authorized deletion of two generated renderer build directories was rejected before PowerShell started.

    Observed rejection and effective context

    • Error: exec_command failed: CreateProcess { message: "Rejected(... rejected: blocked by policy)" }.
    • Recorded rejection time: 2026-11-05T02:36:46.046Z.
    • Tool call ID: call_613cbcb00c1f417bb9e0853542e93280.
    • The recorded turn context had approval_policy="never" and sandbox_policy={"type":"danger-full-access"}.
    • No child-process output or Windows access-denied error was returned. The response did not identify the deciding policy or an actionable review route.

    The command used native PowerShell: resolve the explicitly named project temporary directory and two explicitly named child directories; verify containment and reparse-point constraints; then use Remove-Item -LiteralPath with -Recurse -Force -ErrorAction Stop. Private absolute paths are omitted.

    Read-only diagnosis

    • The inspected user rules file contained 10 allow rules, zero prompt rules, and zero forbidden rules.
    • A non-executing codex execpolicy check against the original command returned {"matchedRules":[]}. This checks the supplied local rules, not every runtime enforcement layer.
    • A fresh diagnostic app-server reported configRequirements.requirements=null. This does not reconstruct the historical decision.
    • Current CLI version is 0.166.0; the exact executable/backend version handling the historical rejection has not been independently established.
    • Available local diagnostic records did not establish the deciding rule or an Auto-review denial.

    Subsequent result

    A later codex doctor run found a stale/unreachable app-server control socket. The supported codex app-server daemon start restored that connection; daemon status then reported running (managed server 0.164.0, CLI 0.166.0).

    After the owner explicitly requested a fresh deletion attempt, one attempt through the same execution tool and native PowerShell route was again rejected before process creation with blocked by policy. Read-only follow-up confirmed both target directories remained, with 263 files in each. Thus the daemon connection repair did not resolve the deletion rejection.

    No alternate executor, security-setting change, or policy bypass was used. This submission performs no further deletion attempt.

    Requested clarification

    Please identify the deciding enforcement layer and reason, and explain the supported action-specific review/remediation procedure if this is a false positive. The successful Ask for approval examples above may be relevant, but that mode change has not been tested for this incident. This report does not establish a shared root cause with the other cases.

    The owner authorized posting this bounded diagnostic report. No source files, credentials, personal files, private absolute paths, screenshots, or full conversation logs are attached.

  12. Chris-Booth commented on Nov 7, 2026

    @Chris-Booth

    Additional bounded Windows desktop reproduction, observed 7 November 2026. This has the same rejection text as this issue; a shared root cause has not been established.

    Environment

    • Running desktop package: OpenAI.Codex_26.1029.7803.0_x64 (observed in the running app's executable path, not read from About).
    • Running desktop executor binary reports codex-cli 0.166.0-alpha.6.
    • Windows 11 Home, version 10.0.26300, x64.
    • PowerShell 7.6.5.
    • Recorded task context: sandbox_mode=danger-full-access, approval_policy=never, filesystem permission profile unrestricted. The owner explicitly confirmed Full Access and authorized the exact cleanup, including again after the first rejection.

    Minimal observed action
    A generated coverage-inventory text file in the owner's task output under Documents was verified to exist: 10,375 bytes, Archive attribute, not read-only. Its parent and contents had no reparse points. Read/list/hash commands and ordinary file creation work in this session.

    The following is the actual single-file command shape, with the personal/task path redacted:

    Remove-Item -LiteralPath 'C:/Users/REDACTED/Documents/REDACTED/generated-coverage/classes.txt' -Force -ErrorAction Stop
    

    It was rejected by exec_command with:

    exec_command failed: CreateProcess { message: "Rejected(\"...pwsh.exe -Command ... rejected: blocked by policy\")" }
    

    The tool returned a launch rejection rather than PowerShell stdout/stderr or a filesystem access error. The target remains present. An approved batch of obsolete generated test/coverage folders and a literal single-folder recursive removal were rejected in the same way before this narrower file-only test. No deletion succeeded.

    Expected / request
    Please identify which policy/reviewer layer is enforcing this denial and why the narrow explicitly authorized generated-file cleanup is rejected under the recorded Full Access / never configuration. If a mandatory restriction intentionally applies, return an actionable reason and supported owner-review/recovery path rather than only blocked by policy.

    No blanket safety bypass is requested. Further execution attempts have stopped. No security settings were changed during these checks, and no alternative execution mechanism was used to evade the rejection.

    Submitted with AI assistance at the owner's explicit request. No credentials, project identity, personal paths, brokerage/trade data, account identifiers, raw logs or session transcript are attached.

  13. karinekullman commented on Nov 17, 2026

    @karinekullman

    I have a similar issue: sandbox_approval = false blocks Git operations despite “on-request” configuration, observed 17 nov 2026

    On Windows, “Approve for me” is missing from both the settings and the permissions control below the message box. The app is up to date, and Standard permissions is enabled. The local configuration specifies approval_policy = "on-request" and approvals_reviewer = "user". No explicit guardian_approval = false setting was found. However, requests for elevated access are rejected with sandbox_approval = false. Git cannot create .git/index.lock. The problem persists in new chats and after restarting and reinstalling the app.

  14. Anfet commented on Nov 23, 2026

    @Anfet

    Additional Windows VS Code incident observed on 24 November 2026. The session reported sandbox_mode=danger-full-access, approval_policy=never, and unrestricted filesystem access. An explicitly requested Android test link was rejected by exec_command before PowerShell started with CreateProcess ... rejected: blocked by policy. No deciding rule or rationale was returned; ordinary adb devices and device input commands worked.

    The rejected command had the shape adb -s <device> shell am start -a android.intent.action.VIEW -d 'https://<host>/<path>' <package>. The inspected user rules had no prompt or forbidden entries, and the project shell guard only restricts shared ADB server operations. This does not exclude another policy layer.

    After the user changed the session to an approval-enabled, workspace-restricted mode, an escalation for a different, explicitly approved test link executed and reached Android. A narrowly scoped allow rule was saved for that exact command. Returning to Full Access/never and requesting another URL again produced the generic rejection. This establishes an approved path for the test link, not the cause of the later denial.

    Source-level hypothesis: the extension-bundled binary reports 0.171.0-alpha.13 (the currently configured local CLI reports 0.171.0; the executor version at the earlier rejection was not independently established). In the matching tagged Windows command classifier, opaque PowerShell command analysis can classify a start token combined with a URL as a URL launch. Our start belongs to Android's am start, not PowerShell Start-Process. Depending on the parsing path, this may explain the match; the available runtime log does not identify the branch, so this remains a hypothesis rather than a confirmed root cause.

    Could the error expose the actual decision source and matched heuristic or rule, along with an actionable review path when Full Access is active? No private addresses, project identifiers, account details, credentials, or raw logs are included.

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