Skip to content

Windows: exec_command rejected by policy before PowerShell starts. #44839

Open

Description

@healectric2020-afk

What version of Codex CLI is running?

0.153.4

What subscription do you have?

ChatGPT Pro

Which model were you using?

gpt-6-astra; reasoning effort: xhigh

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

What terminal emulator and version are you using (if applicable)?

Windows PowerShell 5.1.26100.9168

Codex doctor report

Not collected. No codex doctor --json report is available.

What issue are you seeing?

Preserved error fragments:

Script failed

Wall time 0.0 seconds

exec_command failed: CreateProcess

rejected: blocked by policy

No child PID or exit code was returned.

The error renderer itself truncated the embedded command with:

…7753 chars truncated…

The complete original tool request is preserved separately

What steps can reproduce the bug?

Uploaded thread: 01a08112-9bf0-7023-b0be-4f0267e588cf

What is the expected behavior?

If the operation is permitted by the active policy, the static checks and SelfTest should execute.

If it must be rejected, Codex should provide an actionable user-facing explanation identifying the responsible policy layer and the supported next step,
if one exists.

The generic "blocked by policy" response does not explain this rejection. This report does not request disabling security controls or bypassing a
restriction.

Additional information

  1. Windows Codex 0.153.4 was running with approval_policy=Never and sandbox_policy=DangerFullAccess.
  2. The agent submitted tools.exec_command through code-mode exec. The 7,330-character PowerShell command requested static script checks, Invoke-
    TestPublisherSigning.ps1 -SelfTest, and report writing. It did not invoke -OwnerRun or signing.
  3. The tool returned CreateProcess rejected: blocked by policy before PowerShell process creation. No child PID or exit code was returned.

Time: 2026-09-11T10:21:09Z
Call ID: call_8quUqwBQdqyaKjiJmWuWUnL6

The original request and response are preserved. No standalone minimal reproducer has been established, and the rejected operation was not retried.

Read-only policy analysis used the installed Codex execpolicy check, the original command as data, and the existing user default.rules file.

Exit code: 0
stdout: {"matchedRules": []}
stderr: empty

This did not execute the target command. It covers only the supplied rule file, not every runtime policy layer, and does not establish permission to
retry.

Feedback was recorded without logs.

Activity

  1. added
    bug
    on Sep 11, 2026
  2. added
    CLI
    windows-os
    sandbox
    tool-calls
    on Sep 11, 2026
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

    CLIbugsandboxtool-callswindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions