openai / openai/codex

Codex Windows: local API launch rejected with "blocked by policy"

Open
#41,779 13 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

app bug sandbox tool-calls windows-os
Dominant language
Rust
Stars
125k
Forks
19.4k
PR merge metrics
PR metrics pending

Description

Problem

Codex desktop rejects a local development API launch through exec_command with this abbreviated error:

CreateProcess ... rejected: blocked by policy

The rejection occurs before the submitted PowerShell command executes. No new stdout/stderr logs are created, and no API process starts listening.

Environment

  • Codex desktop for Windows: 26.825.6671.0
  • Windows 11 Home, 64-bit, build 26200
  • PowerShell: 7.6.4
  • Python: 3.14.4
  • Uvicorn: 0.48.0
  • Existing local Git worktree
  • Incident: August 30, 2026, UTC-06:00

Observed steps

  1. Open an existing local project in Codex.
  2. Ask Codex to start the project locally for review.
  3. Verify the working directory, application files, and availability of port 8000.
  4. Attempt to launch the API using PowerShell Start-Process, an explicit Python executable, localhost only, a hidden window, and fresh log filenames.
  5. Receive the tool-level policy rejection.

This describes the affected workspace; a clean-project reproduction has not been established.

Checks already performed

  • Restarting Codex did not resolve the rejection.
  • Restarting Windows did not resolve it.
  • Read-only file, Git, and process queries work.
  • A harmless Start-Process test running only python --version succeeded.
  • Local application data remained unchanged.
  • The exact denying rule or policy layer is still unknown.

No security controls were disabled and no alternative execution channel was used to bypass the rejection.

Expected behavior

If the operation is permitted, execute it. Otherwise, identify the applicable policy or rule and explain the supported resolution.

Please help identify the source of this rejection without requiring global permission expansion or disabling deletion protections.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the Windows exec_command/CreateProcess path in Codex and compare the harmless python --version Start-Process case with the rejected local API launch. Reproduce the policy rejection without changing global permissions, then identify the denying rule or policy layer and document the supported resolution.

Written by the indexing model from the issue text.

Assessment

Tech stack
operating-systems, powershell, python, rust
Domain
devtools, operating-systems, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.