Skip to content

Windows Codex desktop: read-only local diagnostic command rejected with CreateProcess: blocked by policy #53977

Open

Description

@runscrip

Problem

In Codex desktop on Windows, an authorized local diagnostic command was rejected before PowerShell started. The returned error was exec_command failed: CreateProcess ... rejected: blocked by policy, with wall time 0.0 seconds and no process exit code or stdout. This prevented installation of a prepared local application change. The same command was rejected again after the user explicitly authorized the operation.

Evidence

  • 2026-10-14 11:50:16.600 UTC — tool call call_b0e86c4a023d4bffa5bac0d59aa38b53
  • 2026-10-14 11:51:18.068 UTC — tool call call_d5042fde70704e1a9e46b248d01a16d2
  • Chat/session ID: 01a11abd-5e76-71b1-94cb-f32b2c95b9e9
  • Active turn context: approval_policy=never, sandbox_policy=danger-full-access, model gpt-6-astra, effort high.
  • The command combined three read-only checks: search for process-management keywords inside a local script using rg; GET a local 127.0.0.1 status endpoint; and read a local service identity JSON. Start-Process and Stop-Process appeared as rg search terms, not as executed commands.
  • Other shell commands run normally in the same environment. A later local endpoint check returned HTTP 200, and a TLS connection to the mail provider succeeded. No evidence that the blocked command reached the local service or network.
  • The OpenAI status incident affecting Codex and ChatGPT Work on 2026-10-14 was marked resolved before the two denials above. We cannot establish whether it is related.

Request

Please identify which policy component/rule rejected these calls, whether this is an unintended match or expected restriction, and the supported way to review and resolve such denials in Codex desktop. The user wants to continue authorized local development without weakening security settings or routing around a rejected command.

No mail contents, credentials, private file paths, or raw logs are included. The exact command and underlying session record can be reviewed by OpenAI using the identifiers above.

Activity

  1. added
    bug
    app
    windows-os
    sandbox
    tool-calls
    on Oct 14, 2026
  2. runscrip commented on Oct 14, 2026

    @runscrip
    Author

    Additional historical evidence from the same chat: local update + service restart completed successfully on 2026-10-14 at 04:14:30 UTC (exit code 0, backend PID changed, health check passed). This operation is not new to this project. Searching the earlier transcript also found denials of the combined read-only probe at 05:23:43 UTC (call_126133fdd2c64ed0b07782d7928431ef) and 05:34:57 UTC (call_b3d82610786a4f6facc70da31f0924a6), before the two later denials originally reported. The exact successful restart invocation differs from the rejected diagnostic invocation; this does not establish that the identical command previously succeeded or identify the rejecting rule. Please consider the earlier timestamps when correlating the cause.

  3. runscrip commented on Oct 14, 2026

    @runscrip
    Author

    New source-level finding for the currently installed codex-cli 0.162.0-alpha.17.2:

    The Windows heuristic in the matching published tag flattens PowerShell script text with shlex, then returns dangerous if any token looks like an HTTP(S) URL and any token contains start-process or invoke-item. A quoted rg search regex is included in this scan. Our read-only diagnostic contains rg -n 'Start-Process|WindowStyle|Stop-Process' ... and, separately, Invoke-RestMethod 'http://127.0.0.1:3784/api/search/index/status' .... These unrelated tokens satisfy that predicate even though no process-launch cmdlet is invoked.

    Sources for the exact version tag:

    The latter code maps a dangerous heuristic match under AskForApproval::Never to Forbidden and the Other reason to blocked by policy. Offline text analysis reproduces the relevant predicate; we did not execute the rejected command through another path or instrument the rejecting runtime. This is a concrete candidate explanation, not a captured matching-rule trace.

    A separate foreground configuration-only app-server inspection (config/read with layers, configRequirements/read; no turn/exec/write RPC) returned requirements=null, no explicit approval/reviewer/sandbox override from disk, and no configured hooks. The actual desktop turn separately reports never/danger-full-access. Please inspect whether this quoted-text/independent-URL combination is incorrectly classified, and provide a supported correction that preserves genuine URL process-launch protection.

  4. runscrip commented on Oct 14, 2026

    @runscrip
    Author

    Separate transport symptom for correlation only (no demonstrated causal link to the exec-policy rejection): on 2026-10-14 at 18:35:03–18:35:08 UTC, one GPT-6 Astra turn received four retry records of HTTP403Forbidden from https://chatgpt.com/backend-api/codex/responses. CF-Ray IDs: a4a8ae82ab170c03-HEL, a4a8ae8959486135-HEL, a4a8ae90cc3f27cc-HEL, a4a8aea19fa0967b-HEL. The runtime retained only1003 characters of HTML, truncated insideCSS before the explanatory body, so we cannot identify the refusal reason.

    Other affected turns on the same computer show premature WebSocket closure on GPT-6.1 Sol (18:47:01–18:51:12 UTC) and remote-reset os10054 on GPT-6 Astra (18:44:26–18:46:54 UTC). A later read-only snapshot confirms local Happ/xray proxy/tunnel participation in Codex traffic, but the historical route/exit at failure time was not recovered; proxy causality is unproven. We did not change routing, access tokens or authorization. Please use the timestamps/ray IDs to identify the actual403 reason or advise supported feedback diagnostics that preserve it.

  5. runscrip commented on Oct 14, 2026

    @runscrip
    Author

    Source-level false-positive report only; no local diagnostic data is included.

    In the published Windows classifier, a quoted rg search argument containing Start-Process and an unrelated HTTP(S) URL elsewhere in the same PowerShell script can satisfy the flat-token dangerous-command predicate. The search text is data, not an invoked process-launch cmdlet. The exec-policy fallback then maps a dangerous match under AskForApproval::Never to Forbidden.

    Relevant public sources:
    https://github.com/openai/codex/blob/rust-v0.162.0-alpha.17.2/codex-rs/shell-command/src/command_safety/windows_dangerous_commands.rs#L37-L55
    https://github.com/openai/codex/blob/rust-v0.162.0-alpha.17.2/codex-rs/core/src/exec_policy.rs#L795-L807

    Please review whether command boundaries and quoted search arguments should be distinguished while preserving protection for actual URL process launches. This comment contains no local paths, PIDs, network routing, account data, logs or machine configuration.

  6. Zeusnee0316 commented on Oct 21, 2026

    @Zeusnee0316

    Another Windows Codex desktop session encountered a similar rejection of a read-only diagnostic request. Please check whether it is related to this issue.

    On 2026-10-21 UTC, an exec_command request was intended to read previously saved public-source commit metadata, fetch two additional public source-text files from the official OpenAI Codex GitHub Contents API, create text snapshots in a project work subdirectory, and search for relevant command names using rg. The search expression contained names of process-management commands, but the request did not invoke those commands or execute the downloaded source code.

    The tool returned a CreateProcess-classified error with a truncated "rejected: blocked by policy" message, without a process exit code, stdout, a specific rule identifier, or an actionable explanation. A subsequent check did not find the files the request was expected to create. The complete original request and the limitations of the returned error have been preserved locally.

    The request did not stop services, delete files, read credentials, change permissions, or modify cloud configuration. The task context reported approval_policy=never, permission_profile=disabled, and an unrestricted filesystem. These values do not establish that no other policy layer exists.

    The last recorded desktop product version was 26.930.31730, build 12947. This version was not rechecked when preparing this supplement, and its correspondence to a public source tag has not been established. Other independent, ordinary read and write operations were executable in the same task.

    This request contained both public HTTPS addresses and command names used as rg search data, which resembles the source-level candidate mechanism described here. However, the actual executor branch or matching rule has not been captured. We therefore do not claim the same root cause, or attribute the rejection to automatic review or Windows permissions.

    Could the maintainers clarify:

    1. What supported method can provide an original-request fingerprint or call-correlation information so you can identify the actual rejection branch without requiring publication of a complete private session?
    2. Is there a confirmed fixed version or an official recovery procedure for this issue?
    3. How can normal read-only diagnostics containing both search text and URLs be restored while retaining protection against genuinely dangerous operations?
    4. After an official fix is available, how should recovery be verified, and can a single authorized validation of the original request within the same scope be performed?

    The rejected combination has not been retried, rewritten, split, delegated, or executed through another tool. Global security settings have not been changed. This supplement does not request a bypass of safeguards.

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