Repository navigation
Description
Observed problem
A source-free local browser acceptance test cannot be started through exec_command. The same bounded invocation was rejected twice before process creation with:
exec_command failed: CreateProcess
Rejected(... rejected: blocked by policy)
The response does not identify the rule, component or supported remediation. The test has not run; this is not a browser-launch error or a failure at a third-party website.
Installed environment
- Windows desktop package: OpenAI.Codex 26.1002.7124.0.
- Codex executable resolved on PATH: codex-cli 0.128.0-alpha.1. This is an installed executable observation, not attestation of the rejecting app-server build.
- Active task reports danger-full-access with approval policy never.
- No user rules directory or project-local .codex directory was found at the inspected locations.
- Read-only diagnostic queries recovered the rejection but no named enforcement rule. No security settings were changed.
Bounded operation
The PowerShell command was intended to create a uniquely named temporary test directory, restrict that new directory to the current user, launch an existing Node/Playwright test against an invented loopback PDF, and remove the empty parent afterward. It does not attach to a personal browser profile, navigate an external source system, use credentials, or read clinical/customer content.
The command combines environment-variable cleanup, Get-ChildItem -Force for an empty-directory check, and non-recursive Remove-Item for the newly allocated parent. No Remove-Item command was passed -Force. The entire invocation was rejected before any of these operations ran. The original command remains private; no raw logs, local paths or session identifiers are included here.
Static diagnostic candidate, not confirmed cause
In upstream source tagged rust-v0.128.0-alpha.1 (commit 8148b7b), parse_powershell_invocation uses shlex_split, while has_force_delete_cmdlet checks token segments for a delete cmdlet and a -Force token. Because ordinary newline boundaries may be consumed during tokenization, a -Force option belonging to a directory listing may be associated with a separate Remove-Item command.
This is a static hypothesis, not a confirmed runtime diagnosis. No full-policy side-effect-free evaluator or winning decision was exposed. The source tag has not been attested as the build that rejected the operation.
Requested resolution
Please identify the blocking component/rule and provide a supported remediation or side-effect-free diagnostic. If the operation is intentionally restricted, please expose an actionable rationale. If command tokenization causes the refusal, please investigate preserving command/parameter ownership when evaluating multiline PowerShell.
We have not changed policy, disabled protection, moved the operation to another executor, or repackaged the rejected action to get around enforcement. We are requesting a supported fix, not a bypass.
Related similar diagnostic gap: #50979. A shared root cause is not established.
Follow-up: running executable and static PowerShell parse (2026-10-07)
The currently running Codex executables resolve to the same binary; their file bytes differ from the older PATH-resolved CLI. Invoking that running executable with only --version reports codex-cli 0.162.0-alpha.2. The 0.128.0-alpha.1 observation above remains true for the PATH copy, but must not be used to identify the current desktop runtime. No application or PATH configuration was changed.
The corresponding upstream tag rust-v0.162.0-alpha.2 resolves to commit 74e804deeb1241d5fe699b31fb319f7d46454c42. Its Windows classifier still uses shlex_split followed by the force-delete segment check:
https://github.com/openai/codex/blob/74e804deeb1241d5fe699b31fb319f7d46454c42/codex-rs/shell-command/src/command_safety/windows_dangerous_commands.rs
Separately, the original rejected script was recovered locally and passed as DATA to PowerShell's Parser.ParseInput; the script was NOT executed. Results:
- Parser errors: 0.
- Three
Remove-Itemcommand ASTs: none has aForceparameter. - The two environment-variable cleanup commands each have only
ErrorActionas a named parameter. - The temporary-directory cleanup has only
LiteralPathas a named parameter. - The single
Forceparameter belongs toGet-ChildItem, withLiteralPath, for an empty-directory check.
This verifies actual parameter ownership and strengthens the token-boundary false-positive hypothesis. It does not prove which enforcement component evaluated the rejected invocation, reproduce the compiled full-policy decision, or attest a historical runtime binary.
Please check whether the force-delete predicate is combining the listing's flag with a separate cleanup command after newline tokenization, and expose the winning rule or a supported diagnostic. No further rejected-script execution, repackaging, policy changes, alternate executor, new test run, raw logs, user paths or confidential payloads are included in this follow-up.
Activity
github-actions commentedon Oct 7, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
connorchristensen90 commentedon Oct 17, 2026
Follow-up: specific supported next step requested (2026-10-17)
This remains blocking. On October 16, a separate attempt to start a bounded, locally owned, read-only sandbox collector was also rejected by the execution tool as
blocked by policybefore process creation. No collector process, source-page read or report generation started. The intended operation was two controlled page reads followed by a protected local review.This newer occurrence is not the original compound PowerShell test. We do not know whether they share a cause; the earlier tokenization explanation remains only a hypothesis. The version observations above are dated October 7, not a newly verified description of the current runtime.
Could a maintainer please provide a specific fix or actionable next step:
We have not retried the collector for this follow-up, changed permissions or security settings, or repackaged the blocked launch through another executor. We are requesting supported resolution, not a bypass. No credentials, session identifiers, private paths, source-system URLs, customer/resident information, raw logs or source payloads are included.
EIDOSDATA commentedon Oct 20, 2026
Additional evidence for the newline/option-ownership candidate in this issue (also related to #54533).
Observed rejection
Two preserved multiline PowerShell request forms to start local Python Host tests were rejected by
exec_commandbefore process creation withCreateProcess ... rejected: blocked by policy. The tests did not start. The recorded execution settings wereapproval_policy=neverandsandbox_mode=danger-full-access.The desktop backend reports
codex-cli 0.163.0-alpha.10.2; application startup logs from the rejection sessions identify the same backend path and version. The desktop package isOpenAI.Codex 26.1013.4894.0. The winning runtime predicate and evaluated argv were not exposed.Parameter ownership and data-only reproduction
In both original scripts, line 1 is
Remove-Item -LiteralPath Env:PYTHONHOME -ErrorAction SilentlyContinue, with no-Force. Separate environment assignments follow. Line 5 creates a temporary directory usingNew-Item -ItemType Directory -Force; this is the only command that owns-Force.Both unchanged original script strings were parsed as data using PowerShell
Parser.ParseInput: zero parse errors, five assignment statements per script, andForceassigned only toNew-Item. Neither script was executed during this investigation.A bounded Python translation of the matching public fallback, checked against the locked
shlex 1.3.0source for the input syntax involved, produces a force-delete match for both original strings:In the model, newline tokenization places the
remove-itematom and the other command's-forceatom in the same segment. The Python model matches the expected outcomes for three unmodified upstream test inputs: actual forced deletion is flagged, non-forced deletion is not, and the existing separate-command benign-Force control is not. The compiled Rust tests were not run.This is a source-model reproduction, not execution of the compiled Rust guard or proof of the actual rejecting runtime branch.
Relevant source and diagnostic limits
parse_powershell_invocationusesshlex_split;has_force_delete_cmdletthen scans for delete/Force atoms in a shared segment.0.163.0has the same Windows classifier. The inspected0.164.0-alpha.7includes Avoid false URL-launch detections in literal PowerShell commands #54076, but static inspection of its unchanged literal parser indicates these assignments remain unsupported. That PR therefore does not establish a fix for these requests.Please confirm the rejecting predicate, add compiled regression coverage for newline-separated environment cleanup plus
New-Item -Force, and preserve command/parameter ownership while retaining actual forced-delete safeguards. An actionable matched-condition diagnostic or a supported side-effect-free effective-policy evaluator would also help.No security setting, installed binary, or safety rule was changed. The denied Host launch was not retried during this investigation or moved to another executor. Original evidence remains preserved locally. This public report excludes account names, personal/local paths, repository identifiers, credentials, raw device identities, private backups, session identifiers, and raw logs.
connorchristensen90 commentedon Oct 25, 2026
Follow-up: actionable collector-launch resolution requested (2026-10-24)
Following up on our October 17 comment. The October 16 read-only sandbox collector launch remains on hold after the execution tool returned
blocked by policybefore process creation. We have not retried it, so we are not claiming a newly reproduced failure on the current release.Thank you for the additional PowerShell analysis above. It is a useful lead, but the source-model reproduction does not establish the enforcing condition for our separate October 16 collector invocation or identify a confirmed fix.
Could a maintainer provide one concrete next step:
The offline connection is prepared, but we will not treat that as native-session/containment qualification or authorization to override the hold. No reports, collector launches, policy/permission changes, alternate executors or repeated acceptance checks were performed for this follow-up.
Please do not require a clinical-data upload or live report reproduction. This comment contains no credentials, resident information, private source URLs/paths, session identifiers or raw logs.
connorchristensen90 commentedon Oct 26, 2026
New evidence: the collector rejection is not the delete/-Force example (2026-10-26)
We inspected the preserved October 16 collector request as data, without executing or rewriting it. This is the separate collector invocation described in our October 17 and October 24 comments, not the original compound PowerShell example.
Parser.ParseInputreports zero parse errors. The invocation contains no delete command and no-Forceparameter. There is also no execution-policy override, encoded-command argument orInvoke-Expression.Start-Processwith a hidden window. The recorded tool result is still onlyCreateProcess ... Rejected ... blocked by policy, with a reported wall time of 0.0 seconds. It exposes neither a rule name nor a matched condition; no Windows access-denied code is present.Additional read-only diagnostics:
0.163.0-alpha.10.2. The currently running local executable reports0.164.0-alpha.11.1. These are dated provenance observations, not proof of the enforcing component or a fix; we have not retried the collector on the current build.codex doctor --jsonreports a successful desktop app-server handshake and no locally visible recent Codex security enforcement. It does not identify the historical denial.Could the owning team provide a supported, non-executing way to obtain the enforcing component, matched condition and decision for this preserved request, or a private channel to correlate its existing tool-call reference? If this collector occurrence belongs in a different issue, please identify that destination. A rule-file-only allow result would not explain an unspecified built-in or tool-side denial.
No collector launch, report generation, policy/permission change, alternate executor or live source access was performed. This update excludes raw commands/logs, private paths, credentials, session identifiers and resident information.
Specific URL/Start-Process rule candidate (additional source inspection, October 26)
We can now identify a concrete candidate distinct from force deletion:
is_dangerous_powershell_wordsreturns true forhas_urltogether with aStart-Processtoken/substr match. The URL check accepts HTTP/HTTPS without binding the URL to the executable operand versus a child-program argument.Start-Processand one literal HTTPS URL. That URL is the value of--entry-urlin the array referenced by-ArgumentList, not the explicit-FilePathexpression. Six assignments and a conditional are outside the literal parser's accepted node list, supporting the opaque whole-invocation fallback. We did not execute the script or compiled parser.approval_policy=neverandsandbox_mode=danger-full-access. In the policy fallback, a dangerous unmatched command under Never becomes Forbidden. A Windows match is classified as Other, whose rendered reason is blocked by policy.The current public tag retains this URL/Start-Process branch, with changed token-kind handling. This is not a new reproduction on the installed runtime.
Please confirm whether this heuristic was the deciding rule and provide the supported remedy/review path for a local program receiving an HTTPS argument. This is source-backed diagnosis, not a captured winning predicate: the effective overlays, evaluated argv and enforcing component are still unexposed. We have not changed approval/security settings, hidden or moved the URL, rewritten the launch, invoked another executor or retried the collector.
connorchristensen90 commentedon Oct 26, 2026
Following up with an explicit constraint: we need a supported remedy that keeps Full access unchanged (
danger-full-access/approval_policy=never), rather than switching to Ask for approval.Our source-backed findings identify the Windows URL/Start-Process heuristic as a candidate, not a confirmed runtime decision. The URL is a local program's argument, not its executable target. PR #54076 retains conservative treatment of script state/wrappers, so we cannot treat it as a verified fix for this invocation.
Could the owning team please:
We are not requesting a safeguard bypass, blanket allow rule, alternate executor, or automatic retry. Collection remains on hold; no collector or report was run for this follow-up. This comment contains no credentials, private paths, raw logs, or resident information.
connorchristensen90 commentedon Oct 27, 2026
Post-update evidence: supported Full-access fix still needed (2026-10-27)
We applied the desktop app's pending update and restarted normally. These are newly verified version/source observations, not a new collector attempt:
26.1023.50603, build22391, production distribution. The configured updater now reportsup_to_date.codex-cli 0.165.0-alpha.1.2, verified using only--versionon the observed running executable.26.1021.31345, build21828; running backend0.164.0-alpha.11.1.danger-full-accesswithapproval_policy=never.Read-only comparison of the public source at those two backend tags found
windows_dangerous_commands.rstext-identical. The updated tag still contains the URL plus Start-Process classifier, and its policy fallback still returns Forbidden for a heuristic dangerous-command match under Never.This supports our existing candidate diagnosis; it does not identify the original winning runtime rule, establish binary/source equivalence, or prove a newly reproduced failure. The October 16 collector invocation remains unexecuted since the recorded rejection. As detailed in our earlier evidence, its HTTPS value is a child program's argument, not the executable operand; that invocation has no delete command or
-Forceparameter.Please provide a concrete next step that keeps Full access unchanged:
We are not requesting disabled safeguards, blanket allow rules, an alternate executor, command repackaging, or automatic retries. No collector, report, source-system access, permission change, or repeated product test was performed. This update excludes credentials, resident information, private paths/URLs, raw commands/logs and session identifiers.
connorchristensen90 commentedon Oct 27, 2026
Invented classification reproduction supplied; specific Full-access fix requested (2026-10-27)
Not executed or compiled. This blocks our first complete end-to-end collection test. Please identify the exact supported desktop/backend fix or documented next step that preserves Full access, with a way to confirm applicability before a collector launch.
I prepared an entirely invented, classification-only example package to narrow
the Start-Process/URL question from my previous update. It contains four cases:
for this particular predicate, not overall permission).
The test proposal passes these strings to the Windows classifier. It never
launches them. The executable path is invented and the URL is example.invalid.
It includes no original command, private paths, credentials or application data.
Previously verified environment: desktop 26.1023.50603/build 22391, running
backend 0.165.0-alpha.1.2, Full access unchanged, recorded approvals Never.
No new launch, runtime failure, compilation or test result is being claimed.
The original deciding rule remains unconfirmed. The stateful example is a
reduced hypothesis, not an exact reconstruction of the original invocation.
At the inspected tag, the Windows predicate checks has_url together with
Start-Process words/substrings. The execution-policy fallback forbids a matched
dangerous command under Never. Relevant source:
https://github.com/openai/codex/blob/rust-v0.165.0-alpha.1.2/codex-rs/shell-command/src/command_safety/windows_dangerous_commands.rs#L104-L122
https://github.com/openai/codex/blob/rust-v0.165.0-alpha.1.2/codex-rs/core/src/exec_policy.rs#L805-L816
Could the responsible maintainer:
classification-only analysis, and whether that explains the historical denial?
or an argument-ownership false positive? A local program can consume the URL;
I am not asking for a blanket local-executable exemption.
unchanged, or explicitly confirm if no such remedy is supported?
Please preserve the direct URL-launch safeguard. This is a diagnostic proposal,
not an authorization to weaken policy or a claim that the issue is reproduced.
The complete prepared material is included inline below, so no external attachment or private repository access is needed. Publication labels are updated; command inputs and test logic are unchanged.
README and limitations
Four invented classifier inputs (JSON)
{ "schema_version": 1, "issue_url": "https://github.com/openai/codex/issues/51791", "status": "shared_for_review_not_run", "source_tag": "rust-v0.165.0-alpha.1.2", "inputs": "entirely_invented", "execution_permitted_by_this_package": false, "authorization_context": { "full_access": "unchanged", "recorded_approval_policy": "never", "settings_rechecked_for_this_draft": false }, "cases": [ { "id": "direct_url_target", "purpose": "Positive control: preserve the direct URL-launch safeguard.", "command": [ "powershell", "-NoProfile", "-Command", "Start-Process -FilePath 'https://example.invalid/input' -WindowStyle Hidden" ], "classifier_expectation_from_source": true, "expectation_basis": "Existing direct URL-launch guard and tests; this exact input is unexecuted.", "observed_classifier_result": null, "observed_parser_path": null, "observed_runtime_decision": null, "observed_winning_rule": null }, { "id": "local_target_no_url", "purpose": "Negative control for the URL predicate, not proof of global permission.", "command": [ "powershell", "-NoProfile", "-Command", "Start-Process -FilePath 'C:\\SyntheticDiagnostic\\local-reader.exe' -ArgumentList 'local-only' -WindowStyle Hidden" ], "classifier_expectation_from_source": false, "expectation_basis": "No URL or force-delete trigger; this exact input is unexecuted.", "observed_classifier_result": null, "observed_parser_path": null, "observed_runtime_decision": null, "observed_winning_rule": null }, { "id": "local_target_url_argument", "purpose": "Isolate URL in a local executable's child argument rather than FilePath.", "command": [ "powershell", "-NoProfile", "-Command", "Start-Process -FilePath 'C:\\SyntheticDiagnostic\\local-reader.exe' -ArgumentList 'https://example.invalid/input' -WindowStyle Hidden" ], "classifier_expectation_from_source": null, "hypothesis": "The URL/Start-Process predicate may match despite the local FilePath. Record actual parser/classifier behavior before asserting an outcome.", "intended_policy": "maintainer_decision_required", "observed_classifier_result": null, "observed_parser_path": null, "observed_runtime_decision": null, "observed_winning_rule": null }, { "id": "stateful_local_target_url_argument", "purpose": "Reduced variable/conditional form; not an exact reconstruction of the denied invocation.", "command": [ "powershell", "-NoProfile", "-Command", "$program = 'C:\\SyntheticDiagnostic\\local-reader.exe'; $entry = 'https://example.invalid/input'; $enabled = $true; if ($enabled) { Start-Process -FilePath $program -ArgumentList $entry -WindowStyle Hidden }" ], "classifier_expectation_from_source": null, "hypothesis": "Stateful syntax may use the opaque path and match the URL/Start-Process predicate. Neither path nor decision has been measured.", "intended_policy": "maintainer_decision_required", "observed_classifier_result": null, "observed_parser_path": null, "observed_runtime_decision": null, "observed_winning_rule": null } ] }Proposed classifier-only tests (uncompiled and unexecuted)