Repository navigation
Description
Summary
On Codex Desktop for Windows, a local background preview manager is rejected by the execution policy before its Node process is created. The same command fails from both:
- a task whose project is on a secondary drive; and
- a new projectless task stored on the system drive.
The command starts a localhost-only synthetic acceptance server. It does not delete files, modify system configuration, access production services, or use credentials.
Environment
- Codex Desktop:
26.901.6511.0 - Codex CLI:
0.145.0 - Windows: build
26200.9168, display version25H2 - Shell invoked by Codex: bundled PowerShell (
pwsh.exe) - Approval policy shown to the task:
never - Filesystem permission profile shown to the task: unrestricted
Reproduction
The preview manager is a local Node script that starts a detached child process, records its PID and logs, probes the expected localhost URL, and returns after a bounded readiness timeout.
Run the following through the Codex execution tool:
node "C:\Users\<user>\.codex\skills\start-local-preview\scripts\preview-manager.cjs" start \
--cwd "D:\<project>" \
--name "library-session-qa" \
--command "node scripts/library-session-preview.mjs" \
--url "http://localhost:43146/demo-v2.html" \
--timeout-ms 10000
The child command is an ordinary Node HTTP server bound to localhost and backed only by synthetic in-memory test data.
Actual behavior
The execution tool rejects the request before the preview manager starts:
exec_command failed: CreateProcess { message: "Rejected(\"... pwsh.exe -Command ... preview-manager.cjs start ...\" rejected: blocked by policy)" }
Observed consequences:
- no process is created;
- no PID is returned;
- no stdout or stderr log is created by the manager;
- the localhost port is never bound; and
- browser acceptance cannot begin.
The same sanitized command shape produced the same result in a fresh projectless task located on C:\Users\<user>\Documents\Codex\..., while keeping the target project as the --cwd value. Ordinary read-only shell commands work in both tasks.
Expected behavior
The safe local preview command should be allowed to start, or Codex should request approval if approval is applicable. The manager should then return a positive PID and the ready localhost URL.
If the command must remain blocked, the rejection should identify the policy rule and the specific command feature that triggered it so the command can be adjusted safely.
Additional context
This appears related to the policy-layer symptom reported in:
Those reports involve destructive Git or filesystem commands. This reproduction is different because it starts a bounded localhost development server and performs no destructive action.
This is also separate from the Windows Browser trusted-path error reported in:
- Windows: Browser RPC fails with “Trusted RPC dependency must resolve within a configured trusted code path” despite matching configured root #42238
- Codex built-in browser plugin initialization fails: Trusted RPC dependency is not within a trusted code path #39136
In this reproduction, Browser initialization is not reached. The execution request is rejected first.
No registry, PATH, execution-policy, plugin-cache, project, or production-data changes were made while reproducing the issue.
Activity
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
StinkyDubeau commentedon Sep 10, 2026
Additional occurrence on Windows, September 10, 2026:
exec_command failed: CreateProcess ... Rejected(... blocked by policy).codex doctorreports healthy databases, successful desktop app-server initialization, and no locally visible recent Codex security enforcement.Please identify the enforcing component and provide a supported remediation or actionable policy explanation. We have not bypassed the denial through an alternate launcher or weakened security settings. The development preview is currently offline. This is a related symptom, not proof of an identical root cause. No private paths, tokens, raw logs, or conversation contents are included.