Repository navigation
Description
Codex App version
26.1016.8622.0 (version recorded in the original support report).
Separately installed diagnostic CLI: codex-cli 0.152.0. The desktop's bundled engine version has not been independently established.
Subscription
Not verified for this report; account identifiers are intentionally omitted.
Platform
Windows 11 Pro, build 26300 (recorded in the original support report).
Issue
A user-authorized local Next.js server restart was rejected before execution:
CreateProcess: rejected: blocked by policy
The saved session context recorded approval_policy=never and sandbox_policy=danger-full-access. Read-only diagnostic commands worked. No actionable rule ID, policy layer, justification, or approval prompt was shown.
Observed sequence (not a deterministic minimal reproduction)
- In an existing Windows desktop chat, authorize restarting an owned local Next.js development server on 127.0.0.1:3001.
- The agent submits one compound PowerShell command that checks listener/process ownership, stops only the verified processes using Stop-Process, sets process-local environment variables, then starts a local node.exe running Next.js dev with local log redirection.
- The shell invocation is rejected before execution. The restart was not retried for this report.
Static inspection of the recorded command shows:
Codex -> pwsh.exe -Command
-> Get-NetTCPConnection / Get-CimInstance ownership checks
-> Stop-Process for the verified processes
-> process-local environment assignments
-> Start-Process of local node.exe
arguments: node_modules/next/dist/bin/next dev --hostname 127.0.0.1 --port 3001
-> local log and ownership-result output
There is no taskkill.exe invocation. A loopback URL appears separately in an application base-URL environment assignment and in the result object; it is not the executable launched by Start-Process. No database changes are part of the command. The flow above describes the rejected script, not steps that actually executed.
Read-only diagnostic results
- The exact recorded shell executable and original command string were passed as arguments to execpolicy check, without executing the original command:
codex execpolicy check --pretty --rules [user rules file] -- [pwsh executable] -Command [original command string] - Exit code: 0.
- stdout:
{"matchedRules":[]} - stderr: empty.
- No decision field was returned. This is not being treated as an overall allow decision.
- The local rules file contains two unrelated allow rules.
- Standard Windows system requirements.toml and user legacy managed_config.toml were absent. Effective cloud-managed requirements remain unknown.
- User configuration specifies windows.sandbox="elevated"; surrounding rotated sandbox logs report MXC availability and selection. Automatic MXC preference may be expected; this difference is not asserted to be the cause.
- No correlated CreateProcess failure code, rejection rule, or justification was found in the sandbox log.
- Desktop logs in the surrounding three-minute window contain six configRequirements/read routing events, but not the returned policy contents. Other denied events concern thread/read access; they have not been linked to this command rejection.
- Current-chat /status and /debug-config could not be invoked through the tools available to the agent. A new standalone CLI session was not substituted for the desktop session's effective configuration.
Related report and scope
#40060 reports a Windows classifier false positive when Start-Process and an unrelated URL occur in the same PowerShell script. Our recorded script also contains that combination, so it may be related. We have not rerun variants, modified policy, or established that the desktop engine uses the same implementation.
This report adds the desktop diagnostic gap: local execpolicy check reports no matched rules and no decision, while the live command is rejected without an actionable reason. If this is the same issue, please link or close it as a duplicate and clarify the supported diagnostic path.
Expected behavior / questions
- A rejection should identify the responsible policy layer and an actionable reason without exposing secrets.
- How can the effective desktop/cloud-managed policy and rejection trace be inspected read-only?
- Can built-in command-safety classification reject this script independently of the supplied rules file?
- What does the missing decision field mean for the diagnostic CLI version?
- What evidence is needed to distinguish policy classification from an MXC failure?
Privacy and preservation
No secrets, email addresses, personal paths, tenant/client/session/process identifiers, command hashes, raw rollouts, database contents, or raw log files are attached. Existing configuration, data, and permissions were preserved. No policy was weakened and no server restart was retried during diagnosis.
Activity
github-actions commentedon Oct 25, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
sattyamjjain commentedon Oct 25, 2026
I think this is the dangerous-command check combined with approval_policy=never, not the sandbox.
In codex-rs/core/src/exec_policy.rs (970111f, L803-816), a command that matches no execpolicy rule but trips the dangerous-command check returns Forbidden when approval_policy is never, and Prompt for the other policies. The comment there says "if the user has explicitly disabled prompts, we must forbid the command." So danger-full-access does not bypass it. The generic text comes from dangerous_command_rejection_reason (L1139), which maps the catch-all case to "blocked by policy", which is why no rule name shows up.
On Windows, windows_dangerous_commands.rs L104-121 flags a PowerShell command when any token is an http(s) URL and any token is Start-Process, Start, saps, invoke-item, or ii. localhost URLs count too (looks_like_url, L377-400). A restart script that runs Start-Process and also hits an http://localhost health check would match.
Can you share the exact command? If it has that pair, switching to on-request approvals should turn the denial into a prompt. An execpolicy allow rule for the command may also work, but I have not tested that. Also, the "CreateProcess:" prefix in your error is not in the open-source codex-rs, so the desktop app may differ.
fix(security): keep argument values and internal errors out of refusals
fix(security): keep argument values and internal errors out of refusa…