Repository navigation
Description
Summary
Codex Desktop on Windows repeatedly rejects an explicitly authorized, read-only database health-check launch through exec_command with only:
exec_command failed: CreateProcess { message: "Rejected(... rejected: blocked by policy)" }
The tool reports a wall time of 0.0 seconds. The health-check process does not start, so there is no Python/SQLite exception or query result explaining the rejection.
Please identify the enforcing policy/rule and the supported resolution. We are not requesting a bypass or a blanket allow rule.
Environment
- Windows desktop package:
OpenAI.Codex 26.901.4073.0(read from Get-AppxPackage). - OS: Microsoft Windows NT
10.0.26220.0. - PowerShell:
7.6.5. - Python:
3.12.10, verified by a successful hidden-process version probe. - Incident and diagnostics: September 8, 2026, Asia/Taipei (UTC+08).
- Existing local Git project, canonical Windows working directory.
- Actual task logs record
approval_policy=Neverandsandbox_policy=DangerFullAccess. - User config defaults differ:
sandbox_mode="read-only",approval_policy="on-request". The task log is reported separately from those defaults, not assumed to inherit them.
Observed reproduction in the affected task
- Obtain the existing local dashboard's data-root path using a read-only HTTP health request.
- Prepare a hidden Python child with
System.Diagnostics.ProcessStartInfo,UseShellExecute=false,CreateNoWindow=true, and redirected stdout/stderr. - Pass arguments separately with
ArgumentList:
-B system/tools/dashboard_data_lifecycle.py health --data-root <existing-data-root>. - Submit through
exec_command. - Receive the above pre-execution policy rejection.
The script's health branch was inspected: it opens source SQLite databases with mode=ro and PRAGMA query_only=ON, and inspects schema/index/query plans. No migration, maintenance, deletion, deep-integrity scan, or equipment command was requested. The rejected retry omitted --output, so no report-file write was requested either. The same script contains other maintenance subcommands, but none was invoked; whether that matters to the rejection is unknown.
This is a repeated failure in the existing workspace/task, not a verified clean-project or universally reproducible minimal example. Private database files and application source are not attached.
Diagnostic controls and limits
- Hidden Python launch with only
--version: succeeded, exit 0. - A separate hidden Python diagnostic reading the local Codex log database with SQLite
mode=roandPRAGMA query_only=ON: succeeded. The bounded query used the existing thread/time index. Thus, Python child creation and SQLite reads are not universally blocked. - User
default.rules: 32 allow entries, zero prompt/forbidden entries. codex execpolicy checkagainst that user rule file and the inner Python argument list returned{"matchedRules":[]}, exit 0. This does not establish the decision for the full shell wrapper or all effective policy layers.- A later attempt to evaluate the full rejected shell command as data with
execpolicy check(not execute the health check) was itself rejected by the execution tool. Therefore, no complete-wrapper policy-check result is available. - No extra rules were found in the project/ancestor and common ProgramData locations inspected. This is not proof that no remotely managed policy exists.
- Accessible application/task logs confirmed effective task permissions, but did not expose the specific denying rule, reason code, or actionable approval item.
No security rules were modified, and the blocked health-check operation was not rerouted through another execution channel.
Impact
An authorized nightly data-quality/indexing workflow cannot verify its source databases. It must leave its completion checkpoint unchanged and report partial coverage. A generic rejection provides no way to distinguish intended protection, a command-shape limitation, or a false positive.
Requested clarification
- Which component made this rejection, and which rule/reason code applies?
- Can the error expose a safe diagnostic/correlation ID and the relevant reason without disclosing internal policy?
- Why can the non-executing rule diagnostic containing the command text also be rejected?
- What supported, narrowly scoped approval or remediation is available for this read-only operation?
- If this is expected behavior, please document it; if it is a false positive, please advise how to provide a privacy-safe minimal reproduction.
Related reports: #41779 and #43629. Similar symptoms do not establish the same root cause.
Privacy
This report omits internal IPs, share names, user paths, task/session identifiers, credentials, resident/guest data, raw database contents, and full conversation/log uploads.
Activity
ucanfamly commentedon Sep 8, 2026
Additional source-level narrowing (not yet a confirmed runtime verdict):
The executable used by the running desktop app-server reports
codex-cli 0.153.1. I inspected the matching public tag:https://github.com/openai/codex/blob/rust-v0.153.1/codex-rs/shell-command/src/command_safety/windows_dangerous_commands.rs
In
is_dangerous_powershell_words, one branch returns true when the flattened script tokens contain both an HTTP(S) URL and any substringshellexecute(orshell.application). That branch does not distinguish aUseShellExecute = $falseassignment from an actual ShellExecute invocation.Our rejected command contains an unrelated loopback HTTP health read and the explicit safety setting
UseShellExecute = $falsefor a local Python process. The successful version-only probe lacks the HTTP URL. This is consistent with the whole-script heuristic and is a more specific candidate than a generic Python or SQLite restriction.This may be related to #40060, with a UseShellExecute=false substring variation rather than a Start-Process URL launch.
Please confirm whether this branch actually generated our rejection and whether the full-wrapper non-executing diagnostic is being classified by its stored command text. The exact running binary has not been mapped to a source commit beyond its reported version, and no runtime rule ID is available. We have not split/rephrased the rejected operation to avoid the detector, changed any policy, or installed a patched safety engine.
Requested product fix: preserve protection for real URL/ShellExecute launches while recognizing command boundaries and explicit false assignments, and expose an actionable denial reason. A regression test should cover a loopback health read plus a local ProcessStartInfo configured with UseShellExecute=false.
github-actions commentedon Sep 8, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
garykong-ux commentedon Sep 21, 2026
Additional independent report from Codex Desktop on Windows, observed on September 21, 2026. The symptom is similar to this issue; the same root cause has not been established.
Environment
OpenAI.Codex 26.915.4065.0(verified withGet-AppxPackage).10.0.26200, build26200.7.6.5.danger-full-access, approval policynever.approval_policy = "never",approvals_reviewer = "user", andsandbox_mode = "danger-full-access".Observed failure
A read-only diagnostic submitted through
exec_commandwas rejected with this error shape:The tool truncated the expanded command and provided no rule ID or actionable reason. The same command was submitted unchanged once after a user-requested Windows reboot; it was rejected again. The reboot was at 09:35:55 UTC+08 and the repeated rejection was around 09:41 UTC+08.
The diagnostic reads two local deployment text files, opens an existing Codex JSONL session log with
FileAccess.Read/FileShare.ReadWrite, filters two timestamps and tool-call event types, and emits only timestamps, tool names, property names, and matching marker names. It does not execute any stored command.Below is the script structure with private paths replaced by placeholders. This describes the observed affected-task failure, not a verified standalone or clean-machine minimal reproduction:
The potentially sensitive command names above are string data used for matching, not invoked operations. A keyword false positive is a hypothesis, not an established diagnosis. No string-obfuscation workaround, policy changes, allow rules, or rerouting of the rejected operation through another tool were used.
Independent controls
git statussucceed.openai/codexrepository viagit ls-remotesucceeds. This does not verify authenticated/private-repository operations.~/.codex/rules, project.codex/rules, and app-subdirectory.codex/rulesdirectories do not exist. This is not a complete inventory of all managed/system/server policy layers.Requested clarification
Could maintainers identify which component/rule can reject this read-only diagnostic, provide a supported narrowly scoped remedy or diagnostic procedure, and expose a useful denial reason/correlation ID? We are not requesting that safety controls be disabled or bypassed.
Private project names, usernames/paths, domains, IPs, email addresses, session identifiers, credentials, source-file contents, and full transcripts are intentionally omitted. No attached logs.
yuxiuou commentedon Sep 21, 2026
Additional Windows Desktop report observed on September 21, 2026: a local PAPER-only configuration activation is rejected before execution with no actionable reason. A later, explicitly requested reduction from a 10x model to 5x produced the same error. Similar symptoms do not establish the same root cause as the original report.
Environment observed
OpenAI.Codex 26.915.4065.0(rechecked withGet-AppxPackage).7.6.5.codex-cli 0.155.0-alpha.9.2; older task-creation metadata:0.155.0-alpha.2.6. These do not identify the exact rejecting component/build.danger-full-access, approval policynever.sandbox_mode="danger-full-access",approval_policy="never",approvals_reviewer="user".Observed operation and result
The affected project is a local cryptocurrency paper simulation, with no real exchange orders. The user authorized the changes. The submitted PowerShell command was intended to:
The execution tool rejected the command before any of those steps ran:
The tool reported 0.0 seconds, no rule/reason code, and no actionable review reference.
The attempts were not all the same configuration:
2026-09-21T04:47:50.839Z(initial rejection:04:24:28.178Z).The 5x candidate passed 86 Python tests and 88 JavaScript tests during preparation. Independent read-only checks afterward confirmed the engine still running at 10x and both the requested activation file and pre-change summary absent. No accounting reset occurred. Tests passing do not prove the combined operation should be allowed.
Diagnostic limits
/approveaction. We cannot attribute this generic rejection to the documented interactive Auto-review mechanism.This is an affected-task observation, not a verified clean-machine minimal reproduction.
Requested maintainer guidance
Could maintainers identify the enforcing layer and provide a supported diagnostic or narrowly scoped review path? An actionable denial reason or safe correlation ID would help distinguish expected protection from a false positive. If more evidence is needed, please specify a privacy-safe reproduction procedure. We are not requesting removal of safety controls.
Private account names, project paths, site URLs, credentials, balances, session identifiers, application source, and full logs/transcripts are omitted. No attachments.
catchingstarssocialclub commentedon Sep 30, 2026
Adding a bounded documentation question to this existing report rather than opening a duplicate. AI-assisted, posted with the account owner's authorization.
On native Windows 11 build 26200, a local disposable PostgreSQL 17.11 test previously ran. After a clean stop, a later compound PowerShell request containing a public documentation read and a local database start was rejected before execution with
rejected: blocked by policy. Retained diagnostics report CLI 0.155.0-alpha.16 / desktop 26.917.6896.0. The exact-command check against the supplied user rules returnedmatchedRules: []; that is not an allow verdict for all layers. The inspected local requirements locations did not identify a constraint. Cloud-managed policy and the incident-bound enforcing component remain unverified.No retry, command splitting, alternate executor or control change is being requested. Private Support is handling the incident; this comment asks only for reusable public guidance:
Is there a supported, non-executing way to obtain the effective denying layer/reason for a historical desktop tool call, beyond checking supplied rule files? If not, which minimum redacted diagnostic should Support request? Similar symptoms here do not establish a common cause or a PostgreSQL-wide restriction.
No project/account identifiers, private source, command payload, credentials or logs are included.
lgoklgok-lee commentedon Oct 10, 2026
Current-version minimal reproduction: ordinary string output is rejected
Observed on 2026-10-10 with Codex Desktop 26.1007.2314.0 on Windows, bundled backend 0.162.0-alpha.17.2, and PowerShell 7. The effective task settings were
approval_policy=neverandsandbox_mode=danger-full-access.This narrows the
UseShellExecute=falsevariation discussed above: no process launch, COM object, database, application code, or network request is needed. Each row below was submitted as a separate ordinary nativeexec_commandrequest.Write-Output 'UseShellExecute=$false'Write-Output 'https://example.invalid/policy-diagnostic'Write-Output 'UseShellExecute=$false https://example.invalid/policy-diagnostic'The third request returned
exec_command failed: CreateProcesswith aRejectedmessage ending inrejected: blocked by policy. No process exit code was returned. The text is single-quoted PowerShell output data;$falseis not expanded and the reserved example.invalid address is not accessed. Testing stopped at that rejection, with no alternate encoding, spelling, wrapper, interpreter, or allow rule used to execute it.Expected: printing the combined literal should succeed just as printing either literal separately does. Text containing the property name and a URL is not an actual ShellExecute invocation or URL launch.
This confirms the harmless-output false positive in the current installed version. It is consistent with the substring heuristic discussed in this issue, but an internal runtime rule ID/branch decision was not available, so this is not a claim that the exact internal branch was captured.
Please distinguish actual PowerShell invocation semantics from string data while preserving the existing handling of genuine dangerous URL-launching operations. Regression coverage should include these literals, unrelated URL metadata alongside a false UseShellExecute assignment, and real or mixed dangerous operations evaluated only as classifier tests. A concrete rejection reason/classifier identifier would also help.
This comment contains only fixed synthetic text and version/behavior details. No private paths, original business payloads, task/session identifiers, credentials, configuration dump, or raw logs are attached. This is a bug report, not a request for a blanket allow rule or security bypass.
JeffersonWFH commentedon Oct 15, 2026
Additional independent report for this existing issue, posted with the account owner's authorization. The October 10 comment already describes a minimal reproduction of the same string combination; the observations below concern a separate actual wrapper and a later desktop update. No duplicate issue is being opened.
Observed behavior
In the Codex Windows desktop app, an owner-authorized PowerShell wrapper was refused by exec_command before child execution with "rejected: blocked by policy". The wrapper configured ProcessStartInfo.UseShellExecute=false and included an HTTP address as output receipt data. It did not invoke ShellExecute or launch a browser. The session had approval_policy=never and sandbox_mode=danger-full-access; no escalation was requested. Owner authorization does not override a deny rule, and no protection bypass is requested.
The rejection happened before the app update described below. The blocked invocation has NOT been retried after that update. This report does not establish a post-update execution failure. No minimal reproduction has been executed; the observations concern the original wrapper. Project identifiers, local paths, receipt addresses, email, and raw session logs are omitted from this public report.
Source-based diagnosis and uncertainty
In official source revision 740e5af, codex-rs/shell-command/src/command_safety/windows_dangerous_commands.rs lines 57-63 checks for URL presence plus a token containing shellexecute. That appears to match the false property assignment as well as a real launch. This is source-based attribution, not an exposed internal enforcement trace.
Source:
codex/codex-rs/shell-command/src/command_safety/windows_dangerous_commands.rs
Lines 57 to 63 in 740e5af
The published tag for bundled backend version 0.162.0-alpha.17.2 still maps to this source revision. The app executable differs from the standalone release digest, so the exact installed source revision and whether the installed detector changed are unproved.
Environment and update
Requested resolution
Please investigate whether the Windows dangerous-command detector incorrectly treats UseShellExecute=false as URL execution, and provide a supported correction or a read-only diagnostic that exercises this exact detector without launching the rejected command. Retain protection against actual dangerous URL-launch operations.
The installed
codex execpolicy check --helpdescribes checking supplied rule files and requires --rules. Help Center AI support acknowledged that this is not a reliable diagnostic for the built-in Windows detector by itself. That chat received the private prepared report but explicitly said human escalation and case creation were unavailable there, directing us to this tracker. No support case reference was issued.Impact
Publication of an independently reviewed backup-verification fix is blocked. An already completed backup and its saved checkpoint are preserved; verification remains incomplete. No new production backup, policy change, or denied-command retry has been performed as a workaround.
Mercurluto commentedon Oct 16, 2026
Additional report: read-only execpolicy diagnostic rejected before launch (2026-10-16)
Posted with the account owner's authorization. This adds a separate observed diagnostic failure and successful checker controls. Similar symptoms do not establish the same root cause as the other reports here.
Verified environment
26.1007.71326, build20398, production channel.codex-cli 0.162.0-alpha.17.2.approval_policy=never,sandbox_policy.type=danger-full-access.Observed failure
A PowerShell
exec_commandrequest combined a filename-onlyrg --fileslookup with this read-only diagnostic:The actual engine and rules paths are omitted. The diagnostic target above was an inert, nonexistent path. The deletion-like arguments were input to the rule checker, not an executed deletion.
The compound request was rejected before PowerShell startup, with wall time 0.0 seconds and this error shape:
No rule identifier, process output, or diagnostic decision was returned. The standalone command above has not been independently reproduced; compound-wrapper parsing remains a possible factor. The denied request was not reformulated or rerouted to evade the rejection.
Independent controls
The same engine successfully evaluated the existing user rules against benign
git status --shortarguments: exit 0,{"matchedRules":[]}. This is not an allow verdict for all execution layers.A separate offline fixture, outside all live rules directories, contained:
execpolicy checkcorrectly returned the matching prefix andallow/forbiddendecision for those two argument vectors, exit 0 in both cases.codex-policy-probewas a nonexistent command name, and the checker did not execute it. Thus the checker can launch, parse rules, and return decisions; the failure concerns the outer launch of the particular diagnostic request.Requested clarification
Is there a supported non-executing diagnostic for the actual rejecting component when the rule-checker's own command text is rejected? Please expose a policy source/stage or useful reason identifier, or specify the minimum privacy-safe evidence needed to distinguish intended enforcement from command-argument classification errors.
The exact rejection component and any relationship to auto-review remain unconfirmed. No live rules, approval settings, sandbox settings, antivirus settings, or permissions were changed. No deletion was performed for these diagnostics. No private paths, credentials, account/session identifiers, raw rules or logs are attached. This report does not request a blanket allow rule or protection bypass.
jronaldi0509 commentedon Oct 18, 2026
Additional Windows Desktop observation, AI-assisted and posted with the account owner's authorization. Reusing this issue rather than opening a duplicate.
Observed failure and scope
On October 17, 2026 (America/Los_Angeles), an owner-authorized compound Git fetch and managed lane creation request was rejected by
exec_commandbefore child startup:CreateProcess ... Rejected(... rejected: blocked by policy), wall time 0.0 seconds.Its PowerShell transport configured
ProcessStartInfo.UseShellExecute=false; the enclosed script also contained an unrelated literal HTTPS Git remote identity. A later non-executing supplied-rule diagnostic containing the complete rejected representation was itself refused before launch. Neither yielded a deciding-rule identifier. The first operation included mutations; it is not being described as a read-only health check.Version and diagnostic limits
0.162.0-alpha.17.2.26.1013.40934, build20770, production channel, updater reportedup_to_date; running core0.163.0-alpha.10.2, Windows 11 x64.doctor --jsonsucceeds. It reports invocation policyNever/unrestricted, while explicitly saying active-thread overrides were not inspected.disabled, sandboxnone/danger-full-access,auto_review_enabled=falseandnode_repl_auto_review_required=true. This is request metadata, not the original shell decision trace.Could maintainers confirm whether any shipped correction might be relevant to this observation, or provide a supported non-executing diagnostic/reason identifier for this enforcing layer? The source-level hypothesis remains unconfirmed for our exact incident.
No denied-command replay/rephrasing, alternate executor, allow rule, policy relaxation, patched safety engine or antivirus exclusion was used. No private command payload, repository identity, local path, account/session/call identifiers, credentials, configuration dump or raw log is included. No additional minimal reproduction was executed.
judeschneck-debug commentedon Oct 23, 2026
Additional incident-correlated Windows report, AI-assisted and submitted with the account owner's explicit authorization under an existing production-closure work order. Reusing this issue rather than opening a duplicate; a common root cause remains unproven.
Observed operation: a create-only publication of an independently reviewed local QA-receipt addendum. The command reads/hashes fixed reviewed inputs and exclusively creates one new JSON file at its original governed destination. It does not execute the native qualification fixture, restart services, select a release, place trades, or launch a URL.
Historical correlation
call_d4d73390906f4bc6960a491c8ac798be2026-10-23T03:20:25.540Z; rejection response:03:20:25.710Zad12a85990d9348166cfc427288b10dd3f9eb5db5b7736614864de732e212804approval_policy=never,approvals_reviewer=user,danger-full-accessexec_command failed: CreateProcess ... Rejected ... blocked by policy, before the shell/Python publication executed. The target remains absent.The command contains public Microsoft documentation URLs and
UseShellExecute=falseas QA-report text. Those strings do not demonstrate an actual URL/process-launch operation. The URL-plus-ShellExecute substring classifier in published source is a hypothesis for this invocation, not an exposed runtime verdict. Exact rejecting backend source/build binding and deciding rule remain unavailable.Independent local diagnostic QA verified 263 checks, including the original records and command fingerprint; 195 candidate payload hashes and 42 retained evidence hashes match. These checks establish diagnostic/candidate integrity, not native or production acceptance. Bounded retained execution-host logs identify tool dispatch/completion but expose no incident-specific matched-rule or reviewer-decision record. Static Guardian feature flags are not a review decision; automatic-review attribution is unsupported.
Requested runtime-owner determination
Publication, native Math/Options qualification and governed promotion remain held; the frozen candidate and incumbent release are preserved. No denied-command replay, obfuscation, alternate executor/destination, local security patch, allow rule, permission relaxation, or blanket disablement has been used.
Only this redacted summary and correlation metadata are submitted. No raw command payload, session transcript, application source, credentials, account data or local paths are attached. Please advise if a private diagnostic channel is needed.
judeschneck-debug commentedon Oct 23, 2026
Follow-up with a second distinct pre-execution rejection during the same authorized investigation. This was not a retry or alternate execution of the original QA-receipt publication.
A local reporting command attempted to exclusively create a consolidated closure-state/evidence-index JSON. It reads/hashes existing reports and release markers; it does not execute stored commands, native qualification, source adoption, service/pointer changes or trading. The tool rejected it before Python started, and the new index remains absent.
Correlation:
call_2c740e3b52bb4ae2be58313bcc9e7e9d2026-10-23T10:36:33.657Z; rejection:10:36:33.780Z466c705a9884527b55716a7cb62a1e646e721085eb460194ca818a0065389d00CreateProcess ... Rejected ... blocked by policy, with no exposed deciding rule.The reporting payload again includes public source URLs and the ShellExecute classifier name as diagnostic data. The association is a hypothesis, not incident-specific proof of the enforcing branch.
Additional historical correlation: the original publisher-agent session header reports
cli_version=0.163.0-alpha.11.2at session creation. The corresponding published tag still has the discussed substring predicate. This is not a verified binary/source binding or captured classifier decision for either rejection.No retry, splitting, rephrasing, alternate executor/destination or policy modification has been used to complete either denied publication. The already-written report, independent QA matrix and release-dependency record remain preserved. The supported runtime-owner determination/authorization requested in the preceding comment is still required.
Only this redacted metadata is posted; no raw command, private source, local path, credentials or transcript is attached.