Repository navigation
Description
What version of Codex CLI is running?
0.153.4 at the time of the rejection
What subscription do you have?
Pro x 20
Which model were you using?
Gpt 6 Astra Max
What platform is your computer?
Windows x64
What terminal emulator and version are you using (if applicable)?
VS Code integrated terminal, PowerShell 7.6.6.0
Codex doctor report
The output of codex doctor --json. If unsupported, enter Not available in the installed CLI.What issue are you seeing?
Codex CLI 0.153.4 on Windows rejected a dependency-acquisition command before launching PowerShell. The only explanation was “blocked by policy,” with no actionable decision details.
The operation was acquiring the official npm package @supabase/[email protected] through Deno into a task-private cache, to qualify an application’s dependency graph. It did not request application execution, package lifecycle scripts, deployment, or access to production services.
Observed behavior
- Tool path: functions.exec → tools.exec_command → intended PowerShell launch → intended Deno child.
- The tool returned a CreateProcess error containing Rejected(...) and “blocked by policy.”
- Neither PowerShell nor Deno started.
- No process exit code, acquired dependencies, or generated lockfile resulted.
- The stored error rendering contains the literal truncation marker “…1421 chars truncated…”. The complete submitted request remains in the session transcript.
Effective settings at rejection
approval_policy = never
approvals_reviewer = user
sandbox_mode = danger-full-access
There was no interactive approval dialog. /approve offered no actionable entry. I understand that approval_policy=never does not provide interactive approval; I am not reporting the absence of that dialog as the underlying bug.
Recorded reproduction context
- Run Codex CLI 0.153.4 from the VS Code PowerShell terminal.
- Use Full Access with the effective settings above.
- Have the agent submit the recorded PowerShell wrapper, which uses ProcessStartInfo and explicit argument boundaries to invoke Deno install --entrypoint for the npm candidate, with a private cache, explicit configuration/lock paths, and controlled environment.
- Observe the pre-spawn rejection.
This describes the recorded incident, not a separately established minimal reproduction.
Diagnostics already completed
- Installed execpolicy check against the exact outer command argument vector returned exit 0 and {"matchedRules":[]}.
- This establishes no match in the evaluated rules, not approval by every execution layer.
- No relevant PreToolUse or PermissionRequest hook was found in the inspected configuration sources.
- No managed requirements file was found at the documented local Windows location; restrictions elsewhere have not been ruled out.
- A notification-hook error occurred after the rejection and was logged as continuing; it does not explain the pre-spawn failure.
- Ordinary inspection and Git operations worked.
- Available logs did not expose the responsible component, rule, reviewer, or decision reference.
Correlation details
CLI: 0.153.4
Session: 01a11aa3-dbd6-75d1-977e-ffa53ff3029e
Turn: 01a1262d-a230-71e3-a338-7f57b0af7aa7
Call: call_35c52507dcef4ba4a799834351e082c4
Request: 2026-10-10T14:19:05.808Z
Response: 2026-10-10T14:19:06.049Z
The complete request and stored response are at lines 4900 and 4902 of the affected session transcript. Please retain the uploaded-thread reference associated with this report.
Expected behavior and requested investigation
Please identify which component produced Rejected, which decision or rule it applied, and the supported remedy.
If this is an intentional restriction, please explain the applicable approval or administrator action. If this is a client defect, please identify a confirmed fix and affected/fixed versions. The current generic response provides no way to distinguish those cases.
Impact
Dependency acquisition, full SDK typechecking, and packaging qualification remain blocked. Independently verified source changes have been committed, so the remaining issue is qualification rather than Git commit functionality.
What steps can reproduce the bug?
Uploaded thread: 01a11aa3-dbd6-75d1-977e-ffa53ff3029e
What is the expected behavior?
No response
Additional information
No response
Activity
github-actions commentedon Oct 10, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
lekyucv commentedon Oct 15, 2026
I'm using Codex on Windows with PowerShell 5.1.
Codex rejected an authorized offline test before launching the process:
exec_command failed: CreateProcess ... rejected: blocked by policyThe Git preflight and SHA256 verification succeeded. No test process started.
Could you clarify which policy blocked this command and the officially supported way to resolve it?
btm5200-byte commentedon Oct 17, 2026
Another Windows Codex case:
exec_commandblocked before process creationI'm experiencing a similar issue on Windows while using Codex for a local C# development workflow.
Environment and incident details
exec_commandrejected: blocked by policyWhat Codex was attempting
The task was to prepare an isolated, non-production C# compilation and negative-test workspace.
The rejected command attempted to:
src,bin, andtmpdirectories inside an isolated workspace.No administrator elevation, production deployment, or modification of existing protected files was requested.
Observed behavior
The tool returned only:
rejected: blocked by policyFollow-up investigation
A separate read-only investigation confirmed the blocked operation and tool name, but the actual policy rule was not disclosed.
The
apply_patchtool appears to be available for general file editing. However, I could not establish whether it is officially permitted to perform this specific source preparation task after theexec_commandrejection.I have not attempted to bypass the restriction using another shell, encoded commands, or alternative execution methods.
Questions for the maintainers
exec_commandinvocation?apply_patchfor new files in an isolated workspace an officially supported alternative in this situation?I am not requesting a security bypass. I would appreciate clarification of the applicable restriction and the officially supported way to proceed.
Thank you.