Repository navigation
Description
Summary
Codex Desktop on Windows rejects an explicitly authorized restart of a local, loopback-only development API before PowerShell executes. The tool returns only:
exec_command failed: CreateProcess {
message: "Rejected(... rejected: blocked by policy)"
}
The affected command first queries local application state over HTTP, verifies that no work is running and that the target PID belongs to the expected service, then stops and restarts that service with a separately installed newer model executor. The user explicitly approved this exact restart after the first rejection; the retry was rejected in the same way.
There is a specific source-level hypothesis: the Windows URL-launch heuristic scans flattened PowerShell tokens for a URL and a launch command anywhere in the script. Our HTTP preflight and later Start-Process can satisfy those conditions even though the launched executable receives no URL. The generic rejection hides whether this was actually the matched rule.
This report adds an observation on Windows App package 26.908.9136.0 and links it to existing reports. It is not a claim of a newly introduced regression, a clean-machine reproduction, or a confirmed identification of the exact classifier bundled in this App version.
Codex App version
- Installed Windows package: OpenAI.Codex 26.908.9136.0.
- Verified using
Get-AppxPackage -Name OpenAI.Codex; the About dialog was not inspected. - The App's bundled execution-component version has not been independently identified. The standalone CLI versions below must not be treated as the App's bundled version.
Subscription
Not included in this public report. No account identifiers, credentials, usage headers, or private logs are attached.
Platform and runtime
| Component | Observed value |
|---|---|
| OS | Windows 11 Home, Chinese-language edition, 64-bit |
| Windows version/build | 10.0.26200, build 26200 |
| PowerShell | 7.6.6 (pwsh.exe) |
| Node.js | v24.14.1 |
| Existing standalone Codex CLI | 0.144.1 |
| Separately installed replacement CLI | 0.155.0 |
| Current task's effective sandbox setting | DangerFullAccess / danger-full-access |
| Current task's approval policy | Never / never |
| Local service | Node.js API bound to 127.0.0.1:4310 |
| Observation date | September 18, 2026, Asia/Shanghai (UTC+08:00) |
The permission values above are task-level values observed in the active task configuration/logs, not an assumption based only on a user configuration file. I am not assuming that full filesystem access disables other command-safety controls, or that natural-language approval automatically changes an execution policy.
What the user was trying to do
The user asked Codex to run an existing design application's native processing pipeline against already uploaded product-design documents. The application has its own conversation, work, execution, validation, and result storage flow. The integration only forwards requests to that application; it does not replace the application's processing with a separate implementation.
An earlier application request had failed with a separate, explicit model-provider error:
The 'gpt-6-astra' model requires a newer version of Codex.
Please upgrade to the latest app or CLI and try again.
The application had been using standalone CLI 0.144.1. Codex installed @openai/[email protected] in a dedicated local runtime directory and successfully ran that executable's --version. It did not replace the user's global CLI installation. The service startup adapter had been prepared to select that executable while retaining the application's original processing and model selection.
Switching the executor required restarting the local API. This is the operation blocked by the tool. The CLI/model compatibility error and the command-policy rejection are separate failures. Successful installation and --version do not establish that a full model request with 0.155.0 would succeed; that remains untested because the service has not switched executors.
Observed sequence
- Confirm the existing API is healthy on loopback.
- Read the current product state using the application's original API. It has uploaded evidence, no running work, and no candidate results.
- Identify the process listening on port 4310 and verify its command line belongs to this task's Node API launcher.
- Install the replacement CLI in a dedicated directory and verify
codex-cli 0.155.0. - Submit a PowerShell command that repeats the state/identity checks, stops that exact API process, sets process-local executor/runtime paths, and launches the same API with a hidden window and fresh stdout/stderr log files.
- Receive
CreateProcess ... rejected: blocked by policybefore PowerShell starts. The tool reports0.0 seconds, no shell exit code, and no script output. - Explain the rejected operation to the user and ask specifically about restarting this local API to select the newer executor.
- The user explicitly authorizes that restart. Retry the same intended operation, retaining the guards. Receive the same pre-execution rejection.
- Perform read-only diagnostics. The original API process still owns port 4310; its health endpoint works; the new log files have not been created; no design work/result has been started.
No further restart attempt was made during the diagnostic pass. No alternative shell, launcher, scheduled task, encoded command, or changed safety setting was used to bypass the rejection.
Sanitized command shape
The following preserves the relevant structure of the rejected command. Usernames, real project paths, the product identifier, executable directory details, and the actual PID are replaced with placeholders. This is a sanitized incident example, not a clean reproduction that has been executed with these placeholder values. It includes a process-stop operation and should not be pasted without adapting and reviewing it.
$trialCodex = 'C:/work/design-runtime/codex-0.155.0/bin/codex.exe'
$trialView = Invoke-RestMethod `
'http://127.0.0.1:4310/api/autodesign/products/PRODUCT_ID/current-product'
if ($trialView.openWorkIds.Count -ne 0) {
throw 'Active work exists; refusing restart.'
}
$trialApi = Get-CimInstance Win32_Process -Filter 'ProcessId = 12345'
if ($trialApi.CommandLine -notlike '*boot_design_api.mjs*') {
throw 'API process identity changed.'
}
Stop-Process -Id 12345
$env:AUTO_DESIGN_CODEX_BIN = $trialCodex
$env:AUTO_DESIGN_BLENDER_BIN = 'C:/work/design-runtime/blender/blender.exe'
$env:AUTO_DESIGN_LOCAL_DATA_DIR = 'C:/work/design-data'
$trialArgs = @(
'--conditions=development',
'--import', 'tsx',
'C:/work/design-integration/boot_design_api.mjs'
)
$trialNewApi = Start-Process `
-FilePath 'C:/Program Files/nodejs/node.exe' `
-ArgumentList $trialArgs `
-WorkingDirectory 'C:/work/design-checkout' `
-WindowStyle Hidden `
-RedirectStandardOutput 'C:/work/design-runtime/api-v155.stdout.log' `
-RedirectStandardError 'C:/work/design-runtime/api-v155.stderr.log' `
-PassThru
$trialNewApi.Id | Set-Content 'C:/work/design-runtime/api.pid'
$trialNewApi.IdThe HTTP URL belongs to the preflight Invoke-RestMethod call. It is not passed to Start-Process, Node.js, a browser, ShellExecute, or any GUI URL handler. There is no recursive deletion, process-name-wide termination, proxy change, firewall change, privilege elevation, or public network listener in this command.
Actual result
- The execution tool rejects the compound invocation before the shell starts.
- The original API process remains running. The rejection did not leave the service half-restarted.
- The API returns HTTP 200 for health and state reads.
- State reads show uploaded evidence but no active Work or generated candidate Result.
- The newly specified log paths do not exist, consistent with
Start-Processnot executing. - The failure identifies no matching rule, rule source, command span, reason category, or supported review mechanism.
- Explicit user confirmation in the conversation did not change this outcome.
Diagnostic work already performed
- Checked the actual listening PID with
Get-NetTCPConnectionand its executable/command line withGet-CimInstance. - Rechecked the original API's health and application state after the denial.
- Verified both standalone CLI versions directly.
- Inspected the relevant local core-log database, current-day Desktop logs, and sandbox logs. No diagnostic was found that attributes this rejected invocation to a particular rule.
- Inspected the user configuration and user rules-directory availability. No explanatory user rule was found. This does not exclude built-in classifiers, managed configuration, or other enforcement layers.
- Found empty exec-policy loading records for an application-created CLI child session, but did not treat those as evidence that the parent Desktop task has no other policy.
- Found a historical sandbox setup-error record, but no evidence connecting it to this rejection; it is not presented as the cause.
- Confirmed ordinary reads and HTTP status queries continue to work. Therefore this is not an observation that all shell commands fail.
Private conversation history, product documents, authentication data, raw HTTP headers, and unredacted logs are deliberately omitted.
Source-level lead: URL and launch detection may span separate commands
While preparing this report, I found the analysis in #41779 (comment) and inspected the corresponding upstream source.
At upstream commit 7498521d288b9b3b96ffba4eedf089d8d6e06a84:
windows_dangerous_commands.rs, lines 21–55 describes a flattened token scan.is_dangerous_powershell_wordscalculateshas_urlacross the words and returns true if any token matches or containsstart-process(or related launch tokens).is_dangerous_command.rs, lines 83–93 maps a PowerShell-specific dangerous-command match toDangerousCommandMatch::Other.exec_policy.rs, lines 1110–1118 rendersDangerousCommandMatch::Otherasblocked by policy.
This is consistent with the shape of the incident: a URL used only by a local health/state preflight, followed later by a process launch with filesystem-path arguments. It also explains why the message could discard the useful category even when a specific classifier matched.
Limitations: this source inspection was against the pinned upstream commit, not a confirmed source revision of the installed App's execution component. I have not run a classifier unit test against the exact rejected command or established a deterministic fresh-project reproduction. The lead should therefore be confirmed by maintainers, not treated as a proven root cause for this App build. No command was rewritten or split to test a bypass.
Expected behavior / requested maintainer help
- Identify which enforcing component and rule rejected this invocation in the affected App version.
- If the URL-launch heuristic is responsible, confirm whether matching a preflight HTTP URL against a separate later process launch is intentional. Please distinguish the URL's actual consumer from unrelated commands in the same script when evaluating this case.
- Preserve a useful reason category in the error, rather than collapsing all Windows matches to
blocked by policy. Include the policy source and, where feasible, the relevant command span. - Explain the supported, narrowly scoped review/recovery path when a user explicitly authorizes the operation but the tool still refuses it. If no in-app approval is possible for this class of rule, please say that directly in the error.
- If behavior is changed, add parser/classifier tests for both genuine URL-bearing launch commands and scripts where a URL is consumed only by an independent preflight request. This is a request for evaluated behavior and diagnostics, not for a blanket allow rule or disabled safeguards.
Impact
The user's requested design run cannot proceed through the native application until its executor can be switched. Repeated conversational permission requests waste time because they do not expose or resolve the enforcing rule. Replacing the original application pipeline with an unrelated local output would not satisfy the user's request and has not been used as a workaround.
Related reports
- Codex Windows: local API launch rejected with "blocked by policy" #41779 — local API launch rejected before execution; includes the source-level diagnostic analysis linked above.
- [Windows app 26.903.8094.0] Authorized cloudflared restoration rejected with opaque 'blocked by policy' #44430 — explicit user authorization followed by the same opaque rejection, for a different operation (a tunnel launch).
These are related symptoms, not proof of a shared root cause. Please link or close this as a duplicate if it belongs to an existing tracking issue; the additional App version, guarded restart command shape, and source-level lead are included to aid triage.
Activity
github-actions commentedon Sep 18, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
jcohsiecas-boop commentedon Oct 5, 2026
Codex Desktop blocked an authorized update of a local API on Windows with “rejected by policy.” The old version is still running, and the new endpoints return 404. The service was not stopped, and no trading orders were sent. What is the supported procedure for updating it?
Feedback ID: 01a0e94e-4cd2-77a3-97df-49f2f4e49b5d.
NooooobMaster69 commentedon Oct 8, 2026
Additional Windows occurrence on October 7–8, 2026, with a closely matching command shape. The user authorized this sanitized report.
Environment and observed behavior
CreateProcess ... Rejected(... rejected: blocked by policy). No approval prompt or specific rule/reason is exposed.codex execpolicy checkagainst the discovered user rules returnsmatchedRules: []. This only checks those files; it does not exclude built-in checks.Relevant shape of the original rejected invocation
An earlier line assigns a loopback service URL to a process environment variable. A later line launches a local Node executable with local script/release paths and redirects logs. The URL is not passed to Start-Process as a URL-opening target.
This is a renamed structural excerpt for review, not an independently executed minimal reproducer:
Source-level lead in the currently observed version
The published tag
rust-v0.162.0-alpha.2resolves to commit74e804deeb1241d5fe699b31fb319f7d46454c42. Its Windows command check still tests for a URL anywhere in the flattened words and a Start-Process token. Its unmatched-command decision maps a dangerous-command match to Forbidden when approval_policy is Never.Our command is consistent with this cross-statement match, but we do not have a runtime trace proving the installed binary took that branch. No classifier modification, broad allow rule, or rewritten/split launch was used to test an evasion.
A separate Windows PowerShell 5.1 Restricted-policy error affected the user's normal manual launcher. After receiving process-scoped RemoteSigned instructions, the user successfully restored an existing local preview through the normal manual launcher. That was a separate launcher, not proof that the exact denied QA invocation runs manually; the Codex rejection persisted afterwards.
Could maintainers confirm the enforcing check, provide a supported narrow review/approval path, and expose the matching category or command span in the error? If this is the cross-statement URL heuristic, please review whether a URL used only as application configuration should be associated with an unrelated process-launch target.
Private paths, project content, credentials, session identifiers, and raw transcripts are omitted.
demoronator commentedon Oct 9, 2026
Additional Windows occurrence, October 9, 2026. Current app package: 26.1002.7124.0. Current running execution component reports codex-cli 0.162.0-alpha.2; the exact failure-time binary revision is unverified.
An authorized loopback-only local game-preview replacement was rejected before PowerShell started, with
CreateProcess ... rejected: blocked by policy. The failure-time transcript records approval_policy=never, approvals_reviewer=user, danger-full-access, and permission_profile=disabled. We initially called this an automatic reviewer denial, but corrected that unsupported attribution after inspecting the actual turn context.Original call: call_5c483354fb5b44ddb4df44dbb7a52940, 2026-10-09T13:37:11.897Z; rejection at 13:37:12.044Z. The full arguments were recoverable even though the returned error truncates the command. Offline checking against the discovered user rule file returned matchedRules: []; this does not inspect all enforcing layers.
A separate diagnostic-only invocation was also rejected: call_224efc4e6c6442efa1f66382b2436e28, 2026-10-09T14:24:35.942Z; rejection at 14:24:36.201Z. It only reads the saved command, parses it with PowerShell Parser.ParseInput, checks AST command names/URL string literals, and writes a local JSON report. It does not execute the saved text, start or stop processes, or make network requests. The launch keyword and URL prefix appear only as comparison strings in this diagnostic.
These two shapes are consistent with the whole-script URL/launch-token scan discussed here, including treating diagnostic strings as executable intent. We have no runtime trace proving the exact built-in branch. No denied action was retried through another launcher, wrapper, port, or altered safety setting.
Please identify the actual enforcing check, expose the classifier/rule and relevant command span in the error, and provide a supported review/recovery procedure. Please also add regression coverage for diagnostic-only AST inspection and independent HTTP verification/local process startup, while preserving protections for genuine URL launches and dynamic execution. Private paths, game source, credentials, and full transcripts are omitted.
arriannayfq commentedon Oct 17, 2026
Additional Windows Desktop report, observed on October 17, 2026. AI-assisted report posted with the account owner's authorization.
An authorized replacement of a loopback-only local development server was rejected before PowerShell started, with
exec_command failed: CreateProcess ... Rejected(... rejected: blocked by policy), a reported wall time of 0.0 seconds, and no approval/review ID. Ordinary shell reads and local health reads work.The rejected compound command checked the current server's runtime identity, exact listener/process identity, and launch configuration; then intended to stop that verified instance and start the prepared replacement on the same loopback endpoint. Its earlier HTTP preflight and later local process launch resemble this issue. No evidence shows that either process action executed.
Observed task context at the rejection:
approval_policy=never,approvals_reviewer=user,sandbox_policy=danger-full-access. Current Desktop package is26.1013.4894.0; the executable backing the running app currently reportscodex-cli 0.163.0-alpha.10.2. These current version observations do not establish the exact failure-time classifier revision.We found the useful clarification in #54476 and the merged change #54076. We understand that Full Access plus Never is distinct from automatic review, and that selecting a supported approval mode does not retrospectively approve an earlier denial.
Could maintainers clarify:
workspace-write / on-request / auto_review, then submitting a fresh, current-instance-bound replacement request the supported recovery procedure for an already-detached local development server?No policy files, allow rules, system protections, or execution channels were changed to get around the refusal. This report omits project names, paths, PIDs, ports, session identifiers, source/data, credentials, and raw logs.
Public-source follow-up: the matching published tag resolves to
4ebc485ca321243727539187169425fcf972f2c4. Comparing it with #54076 shows diverged histories (ahead 5, behind 63). The tag's execution-policy origin/classification chain also lacks the new literal-command branches from that change. This establishes the public tag's contents, not a verified source-to-binary mapping or the exact rule taken by the historical Desktop rejection.Runtime recovery follow-up (October 18, 2026): selecting Approve for me in the actual execution chat, then checking the fresh native context, gave
on-request / auto_review / workspace-write. A fresh identity-bound request to stop the current instance executed through the normal approval path. After verifying process/listener absence, the original canonical launcher started the prepared version in a retained owned session on the same endpoint. Runtime identity, actual browser-client adoption, and persisted draft readback were verified. No manual process termination or policy-file changes were needed. This demonstrates one working recovery sequence; it does not establish which classifier caused the earlier rejection, that #54076 is in this binary, or that changing permission mode alone guarantees success.olinkluzz1v commentedon Oct 18, 2026
#45232 (comment)