Skip to content

Windows desktop: benign background preview command is rejected as blocked by policy before process creation #43743

Open

Description

@linaaa199501-ops

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 version 25H2
  • 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:

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

  1. added
    bug
    app
    windows-os
    sandbox
    tool-calls
    on Sep 8, 2026
  2. StinkyDubeau commented on Sep 10, 2026

    @StinkyDubeau

    Additional occurrence on Windows, September 10, 2026:

    • Desktop build after restart: 26.903.8094.0; Codex Doctor reports CLI 0.153.4.
    • Both local config and runtime diagnostic entries confirm DangerFullAccess and approval Never during the rejection.
    • Authorized PowerShell Start-Process (WindowStyle Hidden, stdout/stderr logs) launching existing Node development services is rejected before process creation with exec_command failed: CreateProcess ... Rejected(... blocked by policy).
    • Both a combined restart command and a startup-only gateway command were rejected. The gateway serves an existing password-protected preview through an already configured Cloudflare tunnel; no security settings or credentials were being changed.
    • Read-only PowerShell and read-only Node SQLite diagnostics work; local apply_patch also works. This is not a blanket execution or write failure.
    • No rules files were found in the user and two project config locations checked. Managed/built-in policy has not been ruled out.
    • Re-enabling Full Access and restarting the desktop app did not resolve it.
    • Desktop/core logs confirm the rejection but expose no denying rule or rationale. codex doctor reports 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.

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

    appbugsandboxtool-callswindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions