Skip to content

Windows: local Markdown QA report write rejected before execution with "blocked by policy", no review entry #45986

Open

Description

@pangxinfeng

Summary

Codex Desktop on Windows rejected a user-authorized command intended to read public local candidate files, verify their hashes, and exclusively create a new Markdown static-QA report. The rejection occurred before the report-writing process started.

The visible error was:

exec_command failed: CreateProcess ... rejected: blocked by policy

This is a request to identify the enforcing policy and the supported review path, not a request to disable safeguards.

Environment

  • Windows 11, Codex Desktop.
  • Exact app/core version at the time of rejection: not yet verified.
  • Model and subscription at the time of rejection: not yet verified.
  • The affected task reported approval_policy=never.
  • The submitted command used the bundled PowerShell executable, a here-string containing Python code, and an existing local Python interpreter with -I -S -B -c.

Intended operation

The command would:

  1. Read an existing public candidate JSON and public control programs.
  2. Verify expected byte lengths, SHA256 values, and file metadata.
  3. Exclusively create one new Markdown QA report using Python open("xb").
  4. Read back the report and print its public file metadata.

It did not execute UAC, the diagnostic probe being reviewed, symlink creation, deletion, ACL/owner changes, or a network service. The report text describes those testing boundaries; that text is not executed.

The underlying project uses synthetic local test materials. Exact local paths and project contents are intentionally omitted here.

Observed result

  • The tool rejected the command before the report-writing process started.
  • There was no program exit code.
  • No rule ID, detailed denial rationale, approval ID, or actionable review entry was exposed.
  • The visible tool error itself contained a truncation marker, so the full internal rejection text is unavailable.
  • The report remains unwritten. The candidate remains pending and downstream execution is paused.
  • No alternate execution channel, permission weakening, or replay of this denied write was used to bypass the rejection.

This is an observed incident in an existing task, not a standalone deterministic minimal reproduction.

Requested clarification

  1. Which component and policy/rule rejected this exact operation?
  2. How can the full rejection reason and corresponding call identifier be obtained?
  3. Is there a supported action-specific review procedure in the Windows desktop app for this denial?
  4. If the restriction is intentional, please explain its applicable scope.

Feedback reference

In-app feedback was successfully submitted:

01a09a3f-ecfb-7761-a5a1-144bf78529cb

This is the identifier displayed by the feedback submission dialog, not an asserted approval ID.

Related reports

These have similar pre-execution rejection symptoms, but concern service/tunnel launches. This report concerns a local Markdown report write. A shared root cause has not been established.

No credentials, private source code, raw session logs, or real user data are attached. If additional diagnostics are needed, please specify the smallest useful scope and an appropriate submission channel.

Activity

  1. added
    bug
    app
    windows-os
    sandbox
    tool-calls
    on Sep 16, 2026
  2. github-actions commented on Sep 16, 2026

    @github-actions
    Contributor
  3. pangxinfeng commented on Sep 17, 2026

    @pangxinfeng
    Author

    Thank you for the potential-duplicate pointers. I reviewed #44839 and #45232.

    We have not identified a triggering span or classifier, reproduced #45232 locally, or established a shared root cause. In particular, we are not claiming that the forced-deletion classifier described there caused our rejection.

    I am keeping this issue open pending maintainer confirmation of whether it should be consolidated. Could maintainers identify the applicable rejection component/rule and, if this is a known parser/data-boundary issue, point to a supported fix/release or action-specific review procedure?

    The denied write has not been retried or reworded to evade detection, and no security policy has been weakened. No private report text, source code, credentials, or raw session logs are being posted here. The existing in-app feedback reference remains in the issue body.

  4. edwardswhiskeyblues-alt commented on Sep 18, 2026

    @edwardswhiskeyblues-alt

    Additional independent Windows Codex Desktop occurrence matching this report's symptom; I am not asserting that the same rule or root cause applied.

    On 2026-09-17 at 20:25:00.456 UTC, task 01a091b2-93bb-73f1-9cfc-308a389fa0a5 received only blocked by policy for tool call call_2gepqBRscpSG82ZOR1i4pVE8. The rejection occurred before the intended local process produced any output. No specific rule, approval ID, or actionable refusal reason was exposed.

    The 12,607-byte unencoded PowerShell command was intended to read existing project-local proposals/schemas and exclusively create four new, inert JSON schema/control documents. Static inspection found no network or subprocess calls in its body; that is not proof that policy should have allowed it. The retained turn context declared approval_policy=never, danger-full-access, and permission_profile=disabled. A read-only check of installed user command rules found no match, which does not exclude managed or tool-host policy. The operator tried /approve; the UI showed “No commands.” Attribution to Auto-review is therefore unconfirmed.

    The refused operation remains stopped: no retry, alternate execution channel, or permission/configuration change was used to carry it out. Could maintainers identify the enforcing mechanism/rule for this call, say whether the denial was expected or an application/tool-host error, and provide the supported review or recovery path? We are not requesting a bypass or blanket permission expansion.

    No project source, full command, private paths, account data, raw logs, or full chat session are attached.

    Update — second, distinct refusal in the same task

    A later exec_command attempt in turn 01a0b41d-68da-74f1-8683-1f7a06e2eeef was also rejected before process creation with CreateProcess ... rejected: blocked by policy. The tool's displayed error was itself abbreviated with …6231 chars truncated…; no new call ID, exact rejection timestamp, native process output, exit code, or session ID was exposed. This was not a retry of the four-JSON-document operation above.

    According to the producing agent's description, the later PowerShell/Python command was intended to prepare local custody for a conceptual consultation: copy an existing mandate, derive a sanitized brief, inspect existing hashes/manifests and lock states, and exclusively create three consultation files plus a PREPARED_NOT_SENT state. That description has not been independently verified against the complete command. The agent reported no consultation transmission, network contact, permission/configuration change, or execution of the proposed schemas. No post-rejection filesystem inspection has been performed, so we do not independently assert the state of any intended outputs.

    This additional occurrence broadens the observed impact to another local document-preparation workflow, but still does not identify the enforcing rule or establish a shared cause. We request the supported diagnostic/review route for these events, without bypassing the refusal.

  5. chen562040885 commented on Sep 19, 2026

    @chen562040885

    Additional independent Windows Codex Desktop occurrence with a similar pre-execution rejection symptom. I am not claiming the same rule or root cause as this issue.

    Incident and feedback reference

    • Observed: 2026-09-18 at 14:32:13 UTC (22:32:13 Beijing time).
    • Recorded Codex CLI version: 0.155.0-alpha.9. This is not a verified Desktop App package version.
    • In-app feedback was successfully submitted; the dialog displayed feedback ID: 01a0a386-f114-7f61-8f29-4dbcb7835aae.
    • Affected tool call: call_pT6RTT7vPzm2bFkZ6Bqq3iEA.
    • Visible error: exec_command failed: CreateProcess ... Rejected / blocked by policy.

    Intended operation and observed evidence

    The explicitly user-approved operation was to download five fixed-version type-checking tool wheels from official PyPI into a dedicated temporary Docker preparation container. That container had no project source, secrets, or existing browser-profile mounts.

    The command was rejected before process creation, and the download did not start. Nearby Python commands targeting the same container succeeded, so the evidence does not establish a blanket Docker or Python execution failure.

    The retained execution context recorded approval_policy=never, approvals_reviewer=user, and sandbox_policy=danger-full-access. A read-only official execpolicy check of the original complete command returned matchedRules=[]. This only excludes a match in the local rules examined; it does not show that every other policy allowed the operation.

    The scoped local diagnostic records examined did not reveal the specific enforcing component, matching rule, or actionable review decision. Attribution to an automatic review agent is not established. This is an observed incident, not a clean-machine deterministic reproduction.

    The denied download has not been replayed or repackaged, and no security settings or permissions have been changed to bypass it. The dependent type-checking work remains incomplete.

    Requested help

    Could maintainers use the feedback ID, call ID, and timestamp to identify the enforcing component and exact trigger, and provide a supported action-specific review or recovery path without disabling safeguards or broadly expanding permissions? Please clarify whether this occurrence belongs under this issue or should be tracked separately.

    This comment contains only a sanitized summary and diagnostic identifiers. No project files, private source code, local paths, full command, full conversation, logs, credentials, or browser data are attached or pasted.

  6. robertohareii-dotcom commented on Sep 22, 2026

    @robertohareii-dotcom

    Additional Windows CLI occurrence involving checkpoint-document creation.

    Feedback successfully uploaded:
    01a0af67-eae1-74f1-957d-f769dd2c8613

    Current CLI: 0.155.1. The exact binary version at each historical rejection is unverified. Subscription: Pro. Model: gpt-6-astra.

    Two operations intended to verify existing evidence and exclusively create new checkpoint documents were rejected before execution:

    • 2026-09-21T23:41:15.763Z — call_niFUkcueCxnzXsIXNsDMuZwf
    • 2026-09-22T00:47:36.530Z — call_2inpwQ0whGCFcjnuH2iDKNn3

    Tool chain: functions.exec → exec_command → PowerShell.

    Error: exec_command failed: CreateProcess … rejected: blocked by policy

    Failure-time context records approval_policy=never, approvals_reviewer=user, and danger-full-access. Current diagnostics show Full Access, no managed requirements, and no recent auto-review denials.

    Non-executing checks of the recorded commands against discovered local rules returned matchedRules: []. This does not exclude built-in safety checks or other enforcement layers. No specific rejection rationale was exposed.

    Could maintainers use the uploaded thread and call identifiers to identify the exact check and triggering text, and provide a supported correction or review procedure? A shared root cause with this issue has not been established.

    Project evidence remains preserved. Private project files, complete commands and raw transcripts are omitted from this public comment.

  7. Ducngoc1506 commented on Oct 4, 2026

    @Ducngoc1506

    Additional Windows Codex Desktop occurrence, followed by a distinct refusal of a read-only diagnostic. This is a symptom report and a request for a supported resolution; a common root cause with this issue is not established.

    Environment:

    • Current Desktop package: 26.930.3930.0; package recorded on the first incident day: 26.930.3748.0.
    • Current bundled CLI reports 0.160.0.
    • Task context reports approval_policy=never and unrestricted filesystem access. These settings do not establish that all policy layers allow an operation.

    Incident 1:

    • 2026-10-03T09:33:57.931Z; call_HjFcb2TjlOdTNkyQo6DIpt86.
    • exec_command rejected a compound local document/package-preparation command before execution with CreateProcess / Rejected / "blocked by policy".
    • No specific rule, component, triggering span, or actionable approval was exposed.
    • The operation has not been retried, split, or delegated to another executor.

    An in-app feedback submission succeeded on 2026-10-03 and displayed reference 01a0ffc0-647e-7bb0-a9e7-744db56a7e0e. Diagnostic-log and browser-log attachments were unchecked. No human response has been received.

    Incident 2, 2026-10-04:

    • While investigating, a separate PowerShell here-string containing a Python read-only diagnostic was also rejected before execution with the same generic message.
    • It would read the existing incident transcript, select the already-known call, and output only hash/length/keyword counts. It did not execute the transcript, write project files, delete anything, launch an application, or change permissions.
    • Its keyword list included literal strings such as "start-process" and "https://". They were search data, not instructions to launch a URL.
    • That diagnostic was not replayed or rewritten after refusal.

    A source-level lead for the second refusal is the flattened token scan in rust-v0.160.0/codex-rs/shell-command/src/command_safety/windows_dangerous_commands.rs, lines 25–49:
    https://github.com/openai/codex/blob/rust-v0.160.0/codex-rs/shell-command/src/command_safety/windows_dangerous_commands.rs

    The published source inspects URL-like text together with launch-related words across tokens. The diagnostic's shape is consistent with this heuristic, but we have not obtained an enforcement trace proving it was the active rule, and have not established that it explains incident 1.

    Could maintainers correlate the feedback/call/time, identify the exact enforcing component and trigger, and provide a supported action-specific review or fixed release? Please distinguish executable PowerShell from quoted diagnostic/document content. If further evidence is required, please specify a private submission route and minimum scope.

    No private source, business/HR data, local paths, complete command, raw transcript, credentials, or browser data are included. No safeguards or approval settings have been changed.

  8. olinkluzz1v commented on Oct 18, 2026

    @olinkluzz1v
  9. mitsuksw commented on Oct 26, 2026

    @mitsuksw

    This was generated by AI during triage.

    Additional Windows CLI occurrence, posted at the user's explicit request. This concerns an ordinary local teaching-note write through a PowerShell here-string piped to Python.

    Observed incident

    • Tool chain: functions.exec → tools.exec_command → PowerShell → python -X utf8 -.
    • Effective task settings: approval_policy=never, sandbox_mode=danger-full-access, filesystem permission profile disabled.
    • Intended output: two new local files, one Markdown teaching note and one JSON source-excerpt record. The Python body writes/reads local files, serializes JSON, and computes SHA-256. An HTTPS source citation occurs as document/JSON data; the submitted body performs no network request, deletion, ACL change, or service launch.
    • Original rejection: 2026-10-25 17:55:41.730 UTC, call call_5b35ba4298d64587bad953e412ccb8b7.
    • At the user's request, the same CLI session was normally exited and resumed once, keeping the existing task, execution tool, model and permission settings. One further attempt at the same intended write was rejected at 2026-10-25 23:08:36.954 UTC, call call_df058f33c63c4b94ada2faf40986b7d0. This was not a byte-identical controlled A/B test.
    • Both returned exec_command failed: CreateProcess ... Rejected(... rejected: blocked by policy) before the write ran. The two output files remained absent. No matched rule, triggering span, or actionable reason was exposed. Restarting did not resolve this occurrence.

    During investigation on October 26, the executable path used by the resumed CLI process and both associated npm package manifests were checked: the executable reports codex-cli 0.162.1, and the installed package version is 0.162.1. This was not inferred from an old session header. An incident-time binary/source fingerprint was not captured.

    Release check and remaining scope

    #54076 is included in the published stable 0.164.0 release, released October 23. However, the released source deliberately keeps scripts containing | on the existing classification path. Our command has exactly the here-string-to-Python pipeline shape.

    At the time of the initial report we had not yet installed or runtime-tested 0.164.0. The update below records the subsequent runtime test. The source comparison alone did not establish the deciding classifier. #45232 provides a related public literal-data example; a shared root cause with our write is not established.

    Could maintainers identify the rejecting component/rule for these calls, clarify the supported treatment of literal data supplied through such pipelines, and point to an applicable fixed release or supported action-specific review path?

    This is an observed task incident, not a new minimized reproducer. No private paths, course text, complete command, credentials, or raw transcripts are included. No execution policy was changed or alternate executor used.

    Update: actual stable 0.164.0 test, October 26

    The official npm @openai/[email protected] Windows package was then installed and the original CLI session was normally exited/resumed using its native executable. The running process path/hash, codex-cli 0.164.0 output and child Code Mode host were verified. The original --no-daemon mode was retained, so this was not merely a new CLI frontend connected to the old executor. Model, approval policy (never), filesystem permissions and original session were unchanged.

    One submission of the unchanged original shell command through the original execution tool was again rejected before process creation:

    • Call: call_8bf04d3636b7422abb1267a6a1411f1e.
    • Request: 2026-10-26T01:41:59.435Z; refusal: 01:41:59.555Z.
    • Original shell-command SHA-256: c0dc3dc38a37ff195d48ce9db6761ccf3c45d0c53ef78804545fdd29af802ec8.
    • Same generic CreateProcess ... rejected: blocked by policy; neither output file was created.

    This confirms that this incident persists on stable 0.164.0, while the particular deciding rule remains unexposed. The test stopped after that one submission; no alternate executor or policy change was used. Please identify an applicable correction or supported action-specific review route for this case.

    Supported approval path succeeded on the same session

    The user then selected Ask for approval in the original CLI session. Its next turn context actually reported on-request / workspace-write, with the same model and stable 0.164.0 runtime. The original writer submitted the unchanged original shell command through the same exec_command tool, adding require_escalated and a justification limited to the two files; no prefix rule or permanent allowance was requested.

    That supported approval request completed successfully:

    • Call: call_3ca2de300697476995848aef07cf7784.
    • Request: 2026-10-26T01:57:39.414Z; successful receipt: 01:57:51.582Z.
    • Exit code 0; both files created (3,146 and 3,041 bytes), then independently read back and hashed.
    • No agent approval click, alternative executor or safety-engine modification was used. The returned tool receipt did not expose a native approval ID.

    This establishes a working supported route for this specific action after the user's mode change. It does not isolate the original classifier, prove that upgrading alone fixes the issue, or establish that all similar commands are repaired. Please clarify why this ordinary document write was rejected under Full Access/Never and expose an actionable reason or review path.

  10. tianrenheyi510 commented on Oct 27, 2026

    @tianrenheyi510

    Additional Windows desktop occurrence observed on 27 October 2026 (Asia/Shanghai), shared with the user's explicit approval. This matches the local document-writing and opaque pre-process rejection symptoms in this issue; a shared root cause is not established.

    Verified environment

    • Installed Windows app package before update: OpenAI.Codex 26.1021.2667.0.
    • Installed package after the user completed an update: OpenAI.Codex 26.1021.3705.0.
    • Original rejection-time turn context: approval_policy=never, sandbox_policy.type=danger-full-access.
    • The project is marked trusted in user configuration. The inspected user execution-rule file contains two allow rules and no prompt/forbidden rules. This does not rule out other enforcement layers.
    • Included usage was available; no evidence identifies this as a usage-quota rejection.
    • The exact app-server/executor build responsible for the decision has not been independently attested.

    Intended local operation and observed result

    The command uses a PowerShell here-string piped to an existing Python interpreter. It reads published source-version metadata and a work-time ledger, prepares a code-review prompt and an unsent exchange checkpoint, updates a local continuation record, and then lists matching local automation directories.

    The submitted command does not send a model request, operate a browser, delete files, change permissions, or access credential values. URLs occur in the proposed review text as data.

    Three attempts were rejected before process creation:

    1. The original invocation.
    2. One identical-argument retry after the user explicitly requested it.
    3. One identical-argument retry after the app update above.

    All returned only:

    exec_command failed: CreateProcess ... rejected: blocked by policy
    

    There was no child-process exit code, policy/rule identifier, detailed rationale, or actionable approval item in the exposed response. The intended final prompt and exchange checkpoint were not created, and the external review was never sent. Ordinary independent local reads, diagnostic writes, and an offline build continued to work.

    Diagnostic limits and requested action

    We initially described the refusal as Auto-review, then corrected that attribution: the evidence establishes an execution-tool policy rejection, not the specific deciding component. We have not reproduced a minimal trigger or established that the here-string/data-boundary issue in #45232 caused this incident.

    Please identify the responsible enforcement layer and expose a privacy-safe rule/reason or supported diagnostic. Is there a supported action-specific approval path for this refusal under Full Access/never? If it is a parsing or client/service defect, please identify the relevant fix and affected versions.

    The failures are preserved. No policy weakening, alternate executor, account/model switching, or further replay has been used to carry out the denied operation. No email, account details, session/call identifiers, repository contents, private paths, screenshots, or raw logs are included in this public report.

    Follow-up: supported approval-path recovery on 27 October 2026

    After the user changed the current chat to Ask for approval, a fresh turn received a workspace-write permission context with supported escalation. The original preparation command body was submitted with sandbox_permissions=require_escalated and an explicit, narrowly scoped justification. An exclusive local checkpoint backup was added before that unchanged body to preserve newer independent work. The user approved the action; it completed with exit code 0. The intended prompt and exchange JSON now exist, parse successfully, and match the recorded source version and prompt hash. The external review has still not been sent.

    This confirms a working recovery through the supported approval channel for this operation. It is not a clean single-variable experiment, since the permission context changed and the backup wrapper was added. No rule file, binary, or security-policy override was changed. The exact classifier behind the previous three opaque rejections remains unknown.

    Please retain the request for actionable denial diagnostics and a supported approval path when an operation is eligible. The recovery does not establish that every blocked by policy result is a false positive or can be approved.

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