You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Windows: exec_command rejected as “blocked by policy” without an actionable explanation #50884
appIssues related to the Codex desktop appbugSomething isn't workingsandboxIssues related to permissions or sandboxingtool-callsIssues related to tool callingwindows-osIssues related to Codex on Windows systems
What version of the Codex App are you using (From “About Codex” dialog)?
26.930.31730
What subscription do you have?
ChatGPT Pro.Unknown — I could not locate “About Codex” in the Windows app.
What platform is your computer?
Windows, PowerShell
What issue are you seeing?
Feedback ID: 01a10741-9273-77a2-89a7-b5b928e53419
On Windows, exec_command rejected an explicitly authorized local model test before execution with:
“Rejected: blocked by policy”
No specific blocking rule or actionable explanation was provided. The app displayed unrestricted access. Read-only commands continued to work.
The planned test used an existing local model, a loopback-only endpoint at 127.0.0.1:11445, and an isolated test directory. No downloads or production changes were planned.
The rejected test did not start.
Please clarify which rule blocked this operation and the supported way to perform this authorized local test without bypassing safeguards.
What steps can reproduce the bug?
Feedback ID: 01a10741-9273-77a2-89a7-b5b928e53419
What is the expected behavior?
Execute the operation if permitted. If it is prohibited, provide a specific, actionable explanation of the blocking rule and the supported next step.
Additional information
The rejected test did not start. No downloads or production changes were planned. The test was restricted to an isolated directory and a loopback-only endpoint.
No attempt was made to bypass the rejection.
Feedback ID: 01a10741-9273-77a2-89a7-b5b928e53419. In the Codex Windows app with unrestricted access displayed, explicitly authorize an isolated local model test using an existing model at 127.0.0.1:11445. Ask Codex to execute it through exec_command using PowerShell and an inline Python driver. The command is rejected before execution with “Rejected: blocked by policy”, while read-only commands work. The exact invocation is in the submitted feedback/session; no minimal reproducer is available yet.
Additional Windows desktop occurrence, 2026-10-06. This is a sanitized diagnostic report, not a request to bypass safeguards.
Bundled CLI reports codex-cli 0.160.1; desktop app version not verified.
A user explicitly authorized removal of one obsolete project directory within the selected workspace.
The attempted tool call was functions.exec -> tools.exec_command, using PowerShell Resolve-Path, an exact-target comparison, and Remove-Item -LiteralPath $target -Recurse -Force.
The tool returned exec_command failed: CreateProcess ... Rejected(... rejected: blocked by policy) before a PowerShell process started. No Windows permission error or matching policy identifier was provided.
Session permissions were reported as danger-full-access, approval policy never, and unrestricted filesystem access.
Read-only diagnostics succeeded. Get-Acl showed FullControl for the current Windows user on the target directory.
Inspection of the local user default.rules found no deny entries. A read-only codex execpolicy check against that file for the bundled pwsh executable and -Command Remove-Item returned { "matchedRules": [] }. This only tests that local rule file, not any other review layer.
Searches in the available desktop log files and SQLite log store did not reveal the specific rejection reason.
The directory has not been removed. No alternate execution method or permission change was used to bypass the rejection.
Please expose the rejecting layer and concrete reason/rule ID in the tool result, and provide a supported review or approval path for explicitly authorized workspace cleanup. Generic blocked by policy provides no actionable diagnosis even when ordinary filesystem permissions and the inspected local rules are not the cause.
A further usability problem: the assistant repeatedly explained the rejection without a solution and initially asserted an unverified cause. The user spent substantial time repeating the authorized request. Rejections should carry an actionable explanation so this failure loop can be avoided.
No session transcript, private project names, absolute personal paths, credentials, or raw logs are attached.
Additional occurrence on Windows desktop, 8 October 2026 (NZDT), with Codex MSIX version 26.1002.6548.0.
An explicitly requested action to open an existing HTTPS page in Brave was rejected before PowerShell started. The command checked standard Brave installation paths with Test-Path, selected the installed executable, then used Start-Process with the URL. The target URL and personal paths are omitted for privacy.
Observed error: exec_command failed: CreateProcess ... Rejected(... rejected: blocked by policy). No policy ID, rule source, rationale, or actionable approval route was returned.
Verified configuration:
sandbox_mode = "danger-full-access"
approval_policy = "never"
The same settings were present in a 24 September configuration backup.
The inspected user default.rules file contained six allow rules and no prompt/forbidden rules; this does not rule out other enforcement layers.
A second read-only diagnostic command was also rejected with the identical message. It listed installed Codex package directories and fetched public release notes to search for relevant terms. Other read-only commands succeeded. No denied operation was retried through an alternative shell.
Windows deployment events confirm the package changed from 26.930.7945.0 to 26.1002.6548.0 on 7 October at approximately 15:26-15:27 NZDT. This is update timing only, not proof that the update introduced the behavior. No prior-version reproduction has been performed.
The supported Brave browser connection subsequently worked for opening GitHub. Thus this report concerns the unexplained shell-command rejection, not a claim that all Brave/browser access is unavailable.
Expected: if the requested operation is permitted, execute it; otherwise identify the rejecting layer and specific reason, and provide the supported next step. Full Access plus a generic "blocked by policy" message leaves the user unable to diagnose or resolve the failure. Please investigate possible false-positive classification of these commands and improve denial diagnostics.
No customer information, private URLs, credentials, session transcript, or raw logs are attached.
Additional Windows desktop occurrence, observed on 8 October 2026 (America/Sao_Paulo). This matches the unexplained pre-execution rejection described here; a shared root cause has not been established.
Feedback ID (submitted through the app and shared with the user's authorization):01a0e902-d659-7d50-a1eb-b1bb52de8d78
Environment
Codex desktop 26.1002.52244, build 13536, production channel. The built-in update check returned up_to_date.
Effective session diagnostics report DangerFullAccess and approval policy Never; the UI shows Full Access.
Authorized operation and actual result
Start an existing local Next.js dashboard. The compound PowerShell command reads Supabase CLI 2.118.0 status as JSON into memory, validates that its API URL is the expected loopback address, sets process-local application configuration, enters the dashboard directory, and invokes:
npm.cmd run start -- --hostname 127.0.0.1 --port 3400
This is only the final command fragment, not the complete rejected invocation. Project-specific identifiers, configuration values and personal paths are omitted. The operation does not request deletion, production deployment or remote database changes.
The execution tool rejects the invocation before process creation with:
exec_command failed: CreateProcess ... Rejected(... rejected: blocked by policy)
No rule ID, enforcing layer, rationale or actionable approval path is returned.
Read-only checks
Docker/local stack checks and Supabase CLI help succeed; the dashboard did not start.
The inspected user rule file contains 22 allow rules, no prompt or forbidden rules.
A read-only codex execpolicy check of the exact wrapped PowerShell invocation against that file returns {"matchedRules":[]}. This tests only that file, not all enforcement layers.
Thread-scoped diagnostics contain the generic rejection but no specific policy reason.
The user restarted the app and tested the documented permission UI; the block persisted. No alternate shell or execution route was used to bypass the rejected operation.
Expected: execute the operation if permitted; otherwise expose the rejecting layer and concrete reason, with a supported diagnostic or approval route. Please investigate this local-development case alongside the other reports.
No private source code, repository names, credentials, personal filesystem paths, raw logs or session transcript are attached.
Additional Windows desktop diagnostic evidence, 2026-10-10. Marker: POLICY-ATTRIBUTION-WIN-DESKTOP-20261010-C2.
An explicitly authorized controlled release operation was rejected by functions.exec -> tools.exec_command before process creation:
exec_command failed: CreateProcess ... Rejected(... rejected: blocked by policy)
The original invocation occurred at 2026-10-10T02:40:53.020Z and was rejected at .158Z. The effective recorded session used approval_policy=never, approvals_reviewer=user, a disabled filesystem permission profile, and active profile :danger-full-access. No escalation, execution-policy change or bypass was requested.
Read-only evidence:
The original PowerShell source parses with zero syntax errors. Its content is private and is not included here.
A pure execpolicy check of the exact shell/command tokens against the inspected user rule file returned matchedRules:[] with no decision. This is not a clearance of other enforcement layers.
Read-only commands continue to work. The denied operation has not been retried via another executor, altered to bypass the rejection, or deployed.
The actual current shell parent is the desktop-bundled codex.exe, reporting 0.159.2, under ChatGPT.exe from desktop package 26.928.4866.0. The separate npm CLI is 0.149.0; its checks must not be assumed equivalent to the desktop executor.
Doctor was run once for each of those two distinct binaries. Both report the desktop app as not running, despite the observed live shell -> bundled codex.exe -> ChatGPT.exe parent chain. Both report no locally visible recent security enforcement. The 0.159.2 report does not inspect active-thread overrides, so those doctor results do not explain or clear the rejection.
Doctor also reports low system-volume space (~812 MiB). No evidence links that finding, Defender's generic warning, or any local rule to this particular policy rejection.
Please identify the rejecting execution/policy layer and expose its reason or rule identifier, plus a supported review/remediation path. This is not a request to disable safeguards. No raw transcript, command, user paths, secrets, application data or private report is attached.
Additional occurrence on Windows desktop, observed 2026-10-11 at 05:19:26 UTC (14:19:26 Asia/Seoul). The user explicitly asked me to submit this feedback.
Verified environment
Installed MSIX package: OpenAI.Codex 26.1007.2314.0 (queried with Get-AppxPackage; this is the package version, not a separately verified About-dialog build).
Windows: Microsoft Windows NT 10.0.26200.0, x64.
Bundled PowerShell reports 7.6.5.
Effective session instructions and the current user configuration specify sandbox_mode = "danger-full-access" and approval_policy = "never".
Attempted operation and actual result
The user authorized work on an existing isolated demo environment. A compound PowerShell command was submitted through functions.exec -> tools.exec_command. It would acquire temporary AWS Lightsail SSH access details, write the temporary private key to an OS-temp file, restrict its file ACL, run docker ps --format "{{.Names}}" over SSH with BatchMode=yes and StrictHostKeyChecking=yes, and clean up that exact temporary key file in finally.
The invocation was rejected before process creation with:
No specific rejecting rule, enforcement layer, rationale, or supported review route was returned. This was a server-inspection command; it did not contain a deployment or database-write command. The diagnostic command was not retried via another shell, script, SSH library, or browser terminal.
Read-only diagnostic findings
Routine local commands and AWS instance metadata reads succeed.
The current user default.rules contains 94 allow rules and no prompt/deny/forbidden rules.
An offline codex execpolicy check of the recorded PowerShell source against that explicitly supplied local rules file returned {"matchedRules": []}. This does not establish clearance from other enforcement layers and does not explain the historical rejection.
The accessible session record contains the generic rejection; a timestamp-scoped search of the desktop log did not reveal a specific rationale.
The user reports that /approve is unavailable in this desktop app. We have no evidence that this denial came from Auto-review, and are not asserting that it did.
Impact and requested improvement
The authorized demo deployment remains incomplete. The assistant initially mislabeled the generic policy block as an Auto-review denial and repeatedly asked the user for authorization or an alternative deployment pipeline. The user had already authorized the work. A generic denial without attribution or a supported next step produced a lengthy, confusing loop.
Please identify the rejecting layer and provide a supported diagnostic/review path for this case. Ideally, the tool result should include a reason or rule identifier and indicate whether review is possible in the current desktop surface. If this command is intentionally prohibited, an actionable explanation would prevent the assistant from inventing a cause or suggesting unavailable commands.
This public report contains no private server addresses, cloud account IDs, project identifiers, credentials, personal file paths, raw logs, or session transcript. No security settings were weakened.
Resolution update (2026-10-11): the blocking condition for this invocation was identified.
The actual desktop child executable reports codex-cli 0.162.0-alpha.17.2. In the matching public release source (740e5af33c71225640e0c1c1555c514c2c93ab74), shell-command/src/command_safety/windows_dangerous_commands.rs classifies PowerShell Remove-Item combined with -Force as dangerous. core/src/exec_policy.rs maps a dangerous command with AskForApproval::Never to Forbidden and reports the generic blocked by policy reason.
The original compound command contained exactly that force-delete form in its temporary-file cleanup. We replaced only the unnecessary force-delete behavior with ordinary, non-recursive removal of the exact temporary files created by the operation. The same execution tool then ran the command normally. No permission setting, command allow rule, policy, executor, or shell was changed to disable the protection. This confirms a concrete safer remediation for this reported invocation; it does not establish the cause of other reports in this issue.
Subsequent ordinary SSH diagnostics exposed separate source-IP firewall and temporary-certificate configuration issues. Those were corrected using the authorized deployment procedure. The deployment and user-visible verification then completed, and temporary access was cleaned up.
The remaining product feedback is diagnostic clarity: identify the force-delete subcommand and approval-policy interaction in the rejection so users and assistants can choose ordinary exact-file cleanup without a long, misleading troubleshooting loop. The earlier claim that no cause had been identified is superseded by this update.
Follow-up to my diagnostic report #50884 (comment). Marker: POLICY-URL-LAUNCH-20261017-C2.
The controlled release remains blocked. The user has already authorized the work. Repeated diagnostic/coordination cycles have consumed substantial paid credits and time; no reliable amount attributable to this issue has been measured. Please provide an actionable supported diagnostic/remediation route rather than requiring repeated authorization.
New read-only evidence:
The session segment containing the rejected invocation declares cli_version 0.159.2. This is session-start metadata, not a verified historical executable hash at rejection time.
The original script was recovered as data and matched its previously recorded UTF-8 SHA-256. Native PowerShell parsing reports zero errors.
Its two Remove-Item commands do not have -Force. It contains two local Start-Process commands and separate HTTP health-check URL literals. Neither Start-Process directly receives a URL.
Public rust-v0.159.2 source at codex-rs/shell-command/src/command_safety/windows_dangerous_commands.rs checks URL presence plus launch-command words in the input word set. core/src/exec_policy.rs falls back to the whole argv if literal PowerShell lowering fails. The original script contains assignments, a function, try and if blocks, outside the documented literal subset.
This suggests a possible unrelated-URL/local-launch false positive, but historical shlex/lowering output and the actual matched classifier rule are NOT confirmed.
The installed binary's execpolicy check covers rule files; debug/execpolicy help exposes no command to inspect this internal classifier. No test replay or production retry has been performed.
Please confirm or rule out this hypothesis and identify a supported way to inspect the classifier decision offline, without running the production operation, changing approval policy or adding allow rules. If this is intentional rejection, please identify the relevant rule and supported next step.
No private source, paths, URLs, credentials, business data or raw transcripts are attached. No protection has been disabled and no alternative executor has been used.
appIssues related to the Codex desktop appbugSomething isn't workingsandboxIssues related to permissions or sandboxingtool-callsIssues related to tool callingwindows-osIssues related to Codex on Windows systems
Activity
github-actions commentedon Oct 4, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
wernerharms-cmd commentedon Oct 4, 2026
Wo und wann bekomme ich eine Antwort?
sebastiansossa-educatic commentedon Oct 7, 2026
Additional Windows desktop occurrence, 2026-10-06. This is a sanitized diagnostic report, not a request to bypass safeguards.
codex-cli 0.160.1; desktop app version not verified.functions.exec->tools.exec_command, using PowerShellResolve-Path, an exact-target comparison, andRemove-Item -LiteralPath $target -Recurse -Force.exec_command failed: CreateProcess ... Rejected(... rejected: blocked by policy)before a PowerShell process started. No Windows permission error or matching policy identifier was provided.danger-full-access, approval policynever, and unrestricted filesystem access.Get-Aclshowed FullControl for the current Windows user on the target directory.default.rulesfound no deny entries. A read-onlycodex execpolicy checkagainst that file for the bundled pwsh executable and-Command Remove-Itemreturned{ "matchedRules": [] }. This only tests that local rule file, not any other review layer.Please expose the rejecting layer and concrete reason/rule ID in the tool result, and provide a supported review or approval path for explicitly authorized workspace cleanup. Generic
blocked by policyprovides no actionable diagnosis even when ordinary filesystem permissions and the inspected local rules are not the cause.A further usability problem: the assistant repeatedly explained the rejection without a solution and initially asserted an unverified cause. The user spent substantial time repeating the authorized request. Rejections should carry an actionable explanation so this failure loop can be avoided.
No session transcript, private project names, absolute personal paths, credentials, or raw logs are attached.
demonslay677 commentedon Oct 7, 2026
Additional occurrence on Windows desktop, 8 October 2026 (NZDT), with Codex MSIX version 26.1002.6548.0.
An explicitly requested action to open an existing HTTPS page in Brave was rejected before PowerShell started. The command checked standard Brave installation paths with Test-Path, selected the installed executable, then used Start-Process with the URL. The target URL and personal paths are omitted for privacy.
Observed error:
exec_command failed: CreateProcess ... Rejected(... rejected: blocked by policy). No policy ID, rule source, rationale, or actionable approval route was returned.Verified configuration:
sandbox_mode = "danger-full-access"approval_policy = "never"A second read-only diagnostic command was also rejected with the identical message. It listed installed Codex package directories and fetched public release notes to search for relevant terms. Other read-only commands succeeded. No denied operation was retried through an alternative shell.
Windows deployment events confirm the package changed from 26.930.7945.0 to 26.1002.6548.0 on 7 October at approximately 15:26-15:27 NZDT. This is update timing only, not proof that the update introduced the behavior. No prior-version reproduction has been performed.
The supported Brave browser connection subsequently worked for opening GitHub. Thus this report concerns the unexplained shell-command rejection, not a claim that all Brave/browser access is unavailable.
Expected: if the requested operation is permitted, execute it; otherwise identify the rejecting layer and specific reason, and provide the supported next step. Full Access plus a generic "blocked by policy" message leaves the user unable to diagnose or resolve the failure. Please investigate possible false-positive classification of these commands and improve denial diagnostics.
No customer information, private URLs, credentials, session transcript, or raw logs are attached.
rafaeldantasfsa commentedon Oct 8, 2026
Additional Windows desktop occurrence, observed on 8 October 2026 (America/Sao_Paulo). This matches the unexplained pre-execution rejection described here; a shared root cause has not been established.
Feedback ID (submitted through the app and shared with the user's authorization):
01a0e902-d659-7d50-a1eb-b1bb52de8d78Environment
26.1002.52244, build13536, production channel. The built-in update check returnedup_to_date.codex-cli 0.162.0-alpha.2.DangerFullAccessand approval policyNever; the UI shows Full Access.Authorized operation and actual result
Start an existing local Next.js dashboard. The compound PowerShell command reads Supabase CLI
2.118.0status as JSON into memory, validates that its API URL is the expected loopback address, sets process-local application configuration, enters the dashboard directory, and invokes:This is only the final command fragment, not the complete rejected invocation. Project-specific identifiers, configuration values and personal paths are omitted. The operation does not request deletion, production deployment or remote database changes.
The execution tool rejects the invocation before process creation with:
No rule ID, enforcing layer, rationale or actionable approval path is returned.
Read-only checks
codex execpolicy checkof the exact wrapped PowerShell invocation against that file returns{"matchedRules":[]}. This tests only that file, not all enforcement layers.Expected: execute the operation if permitted; otherwise expose the rejecting layer and concrete reason, with a supported diagnostic or approval route. Please investigate this local-development case alongside the other reports.
No private source code, repository names, credentials, personal filesystem paths, raw logs or session transcript are attached.
faridadarrab commentedon Oct 10, 2026
Additional Windows desktop diagnostic evidence, 2026-10-10. Marker: POLICY-ATTRIBUTION-WIN-DESKTOP-20261010-C2.
An explicitly authorized controlled release operation was rejected by functions.exec -> tools.exec_command before process creation:
The original invocation occurred at 2026-10-10T02:40:53.020Z and was rejected at .158Z. The effective recorded session used approval_policy=never, approvals_reviewer=user, a disabled filesystem permission profile, and active profile :danger-full-access. No escalation, execution-policy change or bypass was requested.
Read-only evidence:
Please identify the rejecting execution/policy layer and expose its reason or rule identifier, plus a supported review/remediation path. This is not a request to disable safeguards. No raw transcript, command, user paths, secrets, application data or private report is attached.
yangmin9704188-max commentedon Oct 11, 2026
Additional occurrence on Windows desktop, observed 2026-10-11 at 05:19:26 UTC (14:19:26 Asia/Seoul). The user explicitly asked me to submit this feedback.
Verified environment
OpenAI.Codex 26.1007.2314.0(queried withGet-AppxPackage; this is the package version, not a separately verified About-dialog build).Microsoft Windows NT 10.0.26200.0, x64.7.6.5.sandbox_mode = "danger-full-access"andapproval_policy = "never".Attempted operation and actual result
The user authorized work on an existing isolated demo environment. A compound PowerShell command was submitted through
functions.exec->tools.exec_command. It would acquire temporary AWS Lightsail SSH access details, write the temporary private key to an OS-temp file, restrict its file ACL, rundocker ps --format "{{.Names}}"over SSH withBatchMode=yesandStrictHostKeyChecking=yes, and clean up that exact temporary key file infinally.The invocation was rejected before process creation with:
No specific rejecting rule, enforcement layer, rationale, or supported review route was returned. This was a server-inspection command; it did not contain a deployment or database-write command. The diagnostic command was not retried via another shell, script, SSH library, or browser terminal.
Read-only diagnostic findings
default.rulescontains 94 allow rules and no prompt/deny/forbidden rules.codex execpolicy checkof the recorded PowerShell source against that explicitly supplied local rules file returned{"matchedRules": []}. This does not establish clearance from other enforcement layers and does not explain the historical rejection./approveis unavailable in this desktop app. We have no evidence that this denial came from Auto-review, and are not asserting that it did.Impact and requested improvement
The authorized demo deployment remains incomplete. The assistant initially mislabeled the generic policy block as an Auto-review denial and repeatedly asked the user for authorization or an alternative deployment pipeline. The user had already authorized the work. A generic denial without attribution or a supported next step produced a lengthy, confusing loop.
Please identify the rejecting layer and provide a supported diagnostic/review path for this case. Ideally, the tool result should include a reason or rule identifier and indicate whether review is possible in the current desktop surface. If this command is intentionally prohibited, an actionable explanation would prevent the assistant from inventing a cause or suggesting unavailable commands.
This public report contains no private server addresses, cloud account IDs, project identifiers, credentials, personal file paths, raw logs, or session transcript. No security settings were weakened.
Resolution update (2026-10-11): the blocking condition for this invocation was identified.
The actual desktop child executable reports
codex-cli 0.162.0-alpha.17.2. In the matching public release source (740e5af33c71225640e0c1c1555c514c2c93ab74),shell-command/src/command_safety/windows_dangerous_commands.rsclassifies PowerShellRemove-Itemcombined with-Forceas dangerous.core/src/exec_policy.rsmaps a dangerous command withAskForApproval::Neverto Forbidden and reports the genericblocked by policyreason.The original compound command contained exactly that force-delete form in its temporary-file cleanup. We replaced only the unnecessary force-delete behavior with ordinary, non-recursive removal of the exact temporary files created by the operation. The same execution tool then ran the command normally. No permission setting, command allow rule, policy, executor, or shell was changed to disable the protection. This confirms a concrete safer remediation for this reported invocation; it does not establish the cause of other reports in this issue.
Subsequent ordinary SSH diagnostics exposed separate source-IP firewall and temporary-certificate configuration issues. Those were corrected using the authorized deployment procedure. The deployment and user-visible verification then completed, and temporary access was cleaned up.
The remaining product feedback is diagnostic clarity: identify the force-delete subcommand and approval-policy interaction in the rejection so users and assistants can choose ordinary exact-file cleanup without a long, misleading troubleshooting loop. The earlier claim that no cause had been identified is superseded by this update.
faridadarrab commentedon Oct 16, 2026
Follow-up to my diagnostic report #50884 (comment). Marker: POLICY-URL-LAUNCH-20261017-C2.
The controlled release remains blocked. The user has already authorized the work. Repeated diagnostic/coordination cycles have consumed substantial paid credits and time; no reliable amount attributable to this issue has been measured. Please provide an actionable supported diagnostic/remediation route rather than requiring repeated authorization.
New read-only evidence:
Please confirm or rule out this hypothesis and identify a supported way to inspect the classifier decision offline, without running the production operation, changing approval policy or adding allow rules. If this is intentional rejection, please identify the relevant rule and supported next step.
No private source, paths, URLs, credentials, business data or raw transcripts are attached. No protection has been disabled and no alternative executor has been used.