Repository navigation
Description
Windows CLI 0.153.4: read-only Get-Content denied before execution with no policy rule attribution
Environment
- Native Windows, Codex CLI 0.153.4, gpt-6-astra / low.
- CLI launched with an isolated CODEX_HOME, existing Git worktree as cwd,
exec --ignore-user-config --sandbox read-only -c approval_policy="never" --json. - No sandbox/approval/hook bypass flags. Authentication succeeded before this invocation.
- The intended task was read-only source review, not implementation.
Observed failure
The first shell tool request was a single command:
Get-Content -LiteralPath '<control-repository>/AGENTS.md'The absolute project path is redacted here. The requested file was in a sibling repository, outside the current worktree. The effective turn-context permission snapshot recorded root filesystem read access, not just current-worktree read access.
The tool wrapped this in the installed bundled runtime's pwsh.exe -Command ... and returned:
exec_command failed: CreateProcess { message: "Rejected(... rejected: blocked by policy)" }
The original tool request did not request escalation. The agent stopped after this one failed read. CLI subsequently exited 0 because it delivered a TOOL_BLOCKED report; no source review was completed. We did not retry the command with another shell/tool or expand sandbox permissions.
Available diagnostic evidence
- Invocation date: 2026-09-09 Asia/Shanghai; tool call recorded at 2026-09-08T18:05:46.757Z, result at 18:05:49.824Z.
- Actual session turn context:
approval_policy=never,sandbox_policy.type=read-only. - Actual permission profile:
type=managed; filesystemtype=restrictedwith special root entryaccess=read; networkrestricted. The term managed is the recorded profile type, not evidence of enterprise administrator policy provenance. - The complete original tool call and rejection are preserved locally. No full session, source code, account data, credentials, environment values or private reasoning is included in this report.
- No *.rules files were found in this isolated home's rules directory or the checked project/ancestor .codex/rules locations. This does not prove that no other active policy source exists.
- This isolated home's
.sandbox/sandbox.logis absent. - Installed
codex execpolicy check --helpis available, but it requires explicit rule files. We have not invented an empty/allow rule file to obtain a misleading allow result.
Expected behavior / requested diagnosis
Please identify which layer rejected this exact read-only invocation and how to obtain a policy decision with rule/source attribution:
- Was rejection from command classification, an effective rule, Windows sandbox initialization, or another enforcement layer? Does this error guarantee no OS child was created, or is additional evidence needed?
- How can an operator safely inspect the actual applicable policy sources for this invocation without dumping secrets or changing the policy?
- What supported repair/validation procedure restores the intended read-only capability while keeping the sandbox boundary and approval policy? We are not asking to use full access, alternate-shell retries or a broad allow rule.
There is a related Windows review report at openai/codex-plugin-cc#57 . It uses a different invocation path/version; it does not establish this report's root cause. We have not adopted its full-access workaround.
The observed symptom is one blocked Get-Content call. We do not claim that all Windows read-only commands fail, that the file contents caused the rejection, or that a third-party code-scanning plugin was involved.
Activity
github-actions commentedon Sep 8, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Patdolitse commentedon Sep 8, 2026
Follow-up with a version-pinned explanation and a successful bounded read:
--ignore-user-config --sandbox read-only -c approval_policy="never", without a Windows backend selector.core/src/config/mod.rs:3161-3165maps an absent effective backend to Disabled.core/src/exec_policy.rs:746-766rejects managed restricted filesystem commands when the Windows backend is disabled and approval is Never.-c windows.sandbox="elevated", while retaining read-only, never and ignore-user-config, allowed the original Get-Content command to return exit 0. No allow rules, unelevated/full-access fallback, or command substitution was used.--ignore-user-configleaves exec with no usable sandbox — every command "rejected: blocked by policy" (regression from 0.147.0) #42172. We did not capture the old effective backend directly, so this is not a definitive internal trace of the old decision.A startup diagnostic naming the missing Windows sandbox backend would have prevented misdiagnosing this as a file-specific read permission failure. The earlier exit-0/TOOL_BLOCKED reporting concern also remains useful for automation.
rza255 commentedon Sep 28, 2026
I reproduced this on native Windows with codex-cli 0.153.4 and was able to narrow it down with controlled A/B/D probes.
Hermetic baseline:
A) No explicit Windows sandbox selector:
Result:
CreateProcess ... rejected: blocked by policy; child shell process was not created.The normal user config contained:
so
--ignore-user-configalso removed that selector.B) Same invocation + explicit:
The policy rejection disappeared and PowerShell was created, but pwsh then failed before the requested command ran:
Native
cmd.exeandwhere.exeworked inside the same elevated read-only sandbox, and the exact same bundled pwsh worked outside the sandbox.The sanitized sandbox environment showed
SystemRootwas absent.D) Same hermetic invocation as B, adding only:
Result:
So on this machine the minimum working combination was:
No Full Access, workspace-write, approval bypass, or user-config loading was required.
This is one-machine evidence, not a claim of a universal fix, but the A/B/D difference was controlled and reproducible. It also explains how the apparent symptoms can stack: fixing the missing sandbox selector exposes a second missing-
SystemRootfailure underneath it.Mad-Max8063 commentedon Oct 1, 2026
Adding a deterministic, no-model reproduction on Codex CLI 0.159.3, native Windows 11, with an in-workspace read and
:workspace.This appears equivalent to the symptom reported here, so I am adding evidence rather than opening a duplicate. The follow-up about the omitted Windows sandbox backend is relevant: our runner also uses
--ignore-user-configand supplies nowindows.sandboxoverride. We have not tested that proposed correction on 0.159.3, so the shared root cause remains unconfirmed. Please use this reproduction to confirm the diagnosis and the supported sandbox-preserving resolution; a specific startup/denial diagnostic would help avoid repeated failed runs.Summary
On Windows 11, Codex CLI 0.159.3 rejects an in-workspace PowerShell read through
functions.exec -> tools.exec_commandbefore starting the command:This blocks a local file-handoff workflow before its first read or test. We reproduced the same rejection with dummy files and a deterministic loopback Responses stub, with no model, OAuth credentials or API key. Please triage the tool execution policy path and provide a sandbox-preserving fix or a documented explanation of the intended restriction.
Environment and effective settings
57e1bdab42c0559a74558ca17e85d5c7893caa5f1e582f67e9ddd6d97fa705a7.default_permissions=":workspace"; trace shows workspace-write with read access and workspace/temp writes, network restricted.approval_policy: Never, approvals_reviewer: User.loaded exec policies policy_paths=[],loaded rules from 0 files, empty rule table.neveris the non-interactive exec default measured separately.--ephemeral --ignore-user-config --skip-git-repo-check; model flaggpt-6-astra, efforthigh; project_doc_max_bytes=0; memory use/generation=false.Observed command
The synthetic call uses the CLI's advertised
functions.execcustom tool and callstools.exec_commandwith:{"cmd":"Get-Content -LiteralPath PROJECT_MEMORY.md, iso_dates.py, test_iso_dates.py, recovery.json, handoff.md, evidence/session_a_tests.txt","workdir":"<fixture workspace>","yield_time_ms":1000,"max_output_tokens":1500}The resolved shell was the installed native
pwsh.exe. No escalation parameter was requested. All five existing files contain onlyPMP_LOCAL_TOOL_PROBE.recovery.jsonintentionally does not exist, matching the original workflow; it should produce a normal file-not-found result if the shell starts, not a pre-execution policy rejection.Reproduction without inference
result-call.json, especiallytool_outputsandstderr.The executed source reproducer was verified on the reporting machine. The portable adaptation below changes only binary/output path selection to command-line arguments and was syntax-checked, not rerun. Observed evidence is from the original run. An installation exposing different tool schemas may stop before emitting a call; that is not a reproduction of the rejection.
Expected vs actual
Expected: start a read-only command inside the allowed workspace and return its stdout/normal file error; if intentionally denied, expose the specific policy reason.
Actual:
CreateProcess ... blocked by policybefore command execution. One synthetic tool call; two local HTTP requests; no Authorization header or auth.json. Files unchanged. The CLI eventually exits 0 because the stub supplies a terminal assistant message; this is not evidence that the tool succeeded.Control and limitations
codex sandbox --permission-profile :workspace --include-managed-config ... pwsh.exe ... Get-Contentpreflight read a local fixture successfully. That is a different execution path, not an identical control for all command arguments.approval=neveris itself the defect or located the rejecting internal condition.Requested investigation
Please identify which internal policy rejects this local read, why its decision differs from the direct sandbox path, and whether this is a CLI/runtime integration defect or an intended restriction. Please provide a fixed version or supported bounded configuration, and improve the denial reason if the behavior is intentional. We have not disabled the sandbox, broadened permission rules, or retried the live workflow again.
Included below: portable reproducer and sanitized observed evidence. No account data, credentials, private project files or full conversation transcript are included.
reproduce.py — portable adaptation, syntax-checked only
Sanitized observed evidence — original local reproduction
{ "kind": "Sanitized excerpts of observed deterministic local reproduction", "observed_local_date": "2026-09-30", "platform": { "windows": [ "11", "10.0.26200", "SP0", "Multiprocessor Free" ], "architecture": "AMD64", "python": "3.14.3" }, "cli_version": "0.159.3", "binary_sha256": "57e1bdab42c0559a74558ca17e85d5c7893caa5f1e582f67e9ddd6d97fa705a7", "model_inference": false, "auth_header_present": false, "credential_files_present": false, "tool_calls_emitted": 1, "local_requests": [ { "path": "/v1/responses", "auth_header_present": false }, { "path": "/v1/responses", "auth_header_present": false } ], "tool_call": { "type": "custom_tool_call", "namespace": "functions", "name": "exec", "input": "text(await tools.exec_command({\"cmd\": \"Get-Content -LiteralPath PROJECT_MEMORY.md, iso_dates.py, test_iso_dates.py, recovery.json, handoff.md, evidence/session_a_tests.txt\", \"workdir\": \"<LAB>\\\\hermes-local-state\\\\tool-route-probe-01\\\\workspace\", \"yield_time_ms\": 1000, \"max_output_tokens\": 1500}));" }, "tool_outputs": [ { "type": "custom_tool_call_output", "id": "ctco_<DIAGNOSTIC_SESSION>", "call_id": "call_local_read", "output": [ { "type": "input_text", "text": "Script failed\nWall time 0.4 seconds\nOutput:\n" }, { "type": "input_text", "text": "Script error:\nexec_command failed: CreateProcess { message: \"Rejected(\\\"`\\\\\\\"<USER_HOME>\\\\\\\\\\\\\\\\.cache\\\\\\\\\\\\\\\\codex-runtimes\\\\\\\\\\\\\\\\codex-primary-runtime\\\\\\\\\\\\\\\\dependencies\\\\\\\\\\\\\\\\native\\\\\\\\\\\\\\\\powershell\\\\\\\\\\\\\\\\pwsh.exe\\\\\\\" -Command 'Get-Content -LiteralPath PROJECT_MEMORY.md, iso_dates.py, test_iso_dates.py, recovery.json, handoff.md, evidence/session_a_tests.txt'` rejected: blocked by policy\\\")\" }" } ] } ], "trace": "2026-10-01T02:23:00.285682Z TRACE codex.exec{otel.kind=\"internal\"}: codex_core::exec_policy: loaded exec policies policy_paths=[]\n2026-10-01T02:23:00.285829Z DEBUG codex.exec{otel.kind=\"internal\"}: codex_core::exec_policy: loaded rules from 0 files\n2026-10-01T02:23:00.285836Z TRACE codex.exec{otel.kind=\"internal\"}: codex_core::exec_policy: exec policy rules loaded rules=Policy { rules_by_program: {}, network_rules: [], host_executables_by_name: {} }\n2026-10-01T02:23:00.314487Z TRACE codex_core::exec_policy: loaded exec policies policy_paths=[]\n2026-10-01T02:23:00.314529Z DEBUG codex_core::exec_policy: loaded rules from 0 files\n2026-10-01T02:23:00.314533Z TRACE codex_core::exec_policy: exec policy rules loaded rules=Policy { rules_by_program: {}, network_rules: [], host_executables_by_name: {} }\n2026-10-01T02:23:00.315848Z TRACE load: codex_core::exec_policy: loaded exec policies policy_paths=[]\n2026-10-01T02:23:00.315921Z DEBUG load: codex_core::exec_policy: loaded rules from 0 files\n2026-10-01T02:23:00.315928Z TRACE load: codex_core::exec_policy: exec policy rules loaded rules=Policy { rules_by_program: {}, network_rules: [], host_executables_by_name: {} }\n2026-10-01T02:23:00.380770Z INFO codex.exec{otel.kind=\"internal\" thread.id=\"<DIAGNOSTIC_SESSION>\"}: codex_exec: Codex initialized with event: SessionConfiguredEvent { session_id: SessionId { uuid: <DIAGNOSTIC_SESSION> }, thread_id: ThreadId { uuid: <DIAGNOSTIC_SESSION> }, forked_from_id: None, parent_thread_id: None, thread_source: Some(User), thread_name: None, model: \"gpt-6-astra\", model_provider_id: \"pmp_local_probe\", service_tier: None, approval_policy: Never, approvals_reviewer: User, permission_profile: Managed { file_system: Restricted { entries: [FileSystemSandboxEntry { path: Special { value: Root }, access: Read, missing_path_behavior: None }, FileSystemSandboxEntry { path: Path { path: PathUri(Url { scheme: \"file\", cannot_be_a_base: false, username: \"\", password: None, host: None, port: None, path: \"/<LAB>/hermes-local-state/tool-route-probe-01/workspace\", query: None, fragment: None }) }, access: Write, missing_path_behavior: None }, FileSystemSandboxEntry { path: Special { value: SlashTmp }, access: Write, missing_path_behavior: None }, FileSystemSandboxEntry { path: Special { value: Tmpdir }, access: Write, missing_path_behavior: None }, FileSystemSandboxEntry { path: Path { path: PathUri(Url { scheme: \"file\", cannot_be_a_base: false, username: \"\", password: None, host: None, port: None, path: \"/<LAB>/hermes-local-state/tool-route-probe-01/workspace/.git\", query: None, fragment: None }) }, access: Read, missing_path_behavior: Some(Skip) }, FileSystemSandboxEntry { path: Path { path: PathUri(Url { scheme: \"file\", cannot_be_a_base: false, username: \"\", password: None, host: None, port: None, path: \"/<LAB>/hermes-local-state/tool-route-probe-01/workspace/.agents\", query: None, fragment: None }) }, access: Read, missing_path_behavior: Some(Skip) }, FileSystemSandboxEntry { path: Path { path: PathUri(Url { scheme: \"file\", cannot_be_a_base: false, username: \"\", password: None, host: None, port: None, path: \"/<LAB>/hermes-local-state/tool-route-probe-01/workspace/.codex\", query: None, fragment: None }) }, access: Read, missing_path_behavior: Some(Skip) }, FileSystemSandboxEntry { path: Path { path: PathUri(Url { scheme: \"file\", cannot_be_a_base: false, username: \"\", password: None, host: None, port: None, path: \"/<LAB>/hermes-local-state/tool-route-probe-01/workspace/.aws\", query: None, fragment: None }) }, access: Read, missing_path_behavior: Some(Skip) }], glob_scan_max_depth: None }, network: Restricted }, active_permission_profile: Some(ActivePermissionProfile { id: \":workspace\", extends: None }), cwd: AbsolutePathBuf(\"<LAB>\\\\hermes-local-state\\\\tool-route-probe-01\\\\workspace\"), reasoning_effort: Some(High), initial_messages: None, network_proxy: None, rollout_path: None }\n2026-10-01T02:23:00.559522Z INFO codex.exec{otel.kind=\"internal\" thread.id=\"<DIAGNOSTIC_SESSION>\"}: codex_exec: Sent prompt with event ID: <DIAGNOSTIC_SESSION>\n2026-10-01T02:23:02.321201Z ERROR codex_core::tools::router: error=exec_command failed: CreateProcess { message: \"Rejected(\\\"`\\\\\\\"<USER_HOME>\\\\\\\\\\\\\\\\.cache\\\\\\\\\\\\\\\\codex-runtimes\\\\\\\\\\\\\\\\codex-primary-runtime\\\\\\\\\\\\\\\\dependencies\\\\\\\\\\\\\\\\native\\\\\\\\\\\\\\\\powershell\\\\\\\\\\\\\\\\pwsh.exe\\\\\\\" -Command 'Get-Content -LiteralPath PROJECT_MEMORY.md, iso_dates.py, test_iso_dates.py, recovery.json, handoff.md, evidence/session_a_tests.txt'` rejected: blocked by policy\\\")\" }\n", "stdout": "{\"type\":\"thread.started\",\"thread_id\":\"<DIAGNOSTIC_SESSION>\"}\n{\"type\":\"turn.started\"}\n{\"type\":\"item.completed\",\"item\":{\"id\":\"item_0\",\"type\":\"agent_message\",\"text\":\"LOCAL_DIAGNOSTIC_COMPLETE_NO_MODEL\"}}\n{\"type\":\"turn.completed\",\"usage\":{\"input_tokens\":0,\"cached_input_tokens\":0,\"cache_write_input_tokens\":0,\"output_tokens\":0,\"reasoning_output_tokens\":0}}\n", "expected_exit_note": "CLI exit 0 follows a synthetic terminal message, not successful tool execution." }Mad-Max8063 commentedon Oct 2, 2026
Follow-up: explicit Windows backend exposed two further execution blockers (CLI 0.159.3)
Follow-up to our deterministic no-model reproduction. We have now tested
-c windows.sandbox="elevated". This updates the earlier statement that this selector had not been tested.Impact: our local file-handoff workflow still cannot execute its first read or run its tests. After enabling the documented backend and approving Windows setup prompts, the failures moved from a generic policy rejection to helper path handling and then runtime access validation. This is a substantial blocker for sandboxed local automation on this machine. We cannot claim that all failures share one cause or affect all Windows installations.
Controlled observations
The follow-up probes used the same isolated Codex CLI 0.159.3, native Windows 11, a deterministic loopback provider, dummy files, and one read command per attempt. No model inference, OAuth credentials, API key, or Authorization header was used in these probes. The CLI executable SHA-256 remained:
57e1bdab42c0559a74558ca17e85d5c7893caa5f1e582f67e9ddd6d97fa705a7Relevant invocation settings:
exec --ephemeral --ignore-user-config --skip-git-repo-check --json -c default_permissions=":workspace" -c windows.sandbox="elevated"; approval resolved toNever, network remained restricted. The local provider configuration and dummy read are described in the linked reproduction. Each attempt had a fresh isolated home/workspace; setup was therefore not a perfectly identical environment across attempts. Windows setup prompts were approved by the human.functions.waitreplies still pending with no output; 90-second watchdog. Inconclusive, not a successful read.orchestrator_helper_launch_failed, Windowsos error 3while launching the setup helper.helper_unknown_error: setup refresh had errors, with a specific runtime read/execute validation failure in the log.1. Helper path handling
The setup helper's original absolute path was 271 characters long. The exact helper file was found with a Windows extended-path prefix (
\\?\) but not through the normal path check. The workspace existed. The log reported:We copied the complete vendor directory to a shorter location, preserving the relative layout. All 45 files matched SHA-256 hashes. The helper path became 169 characters, the normal path check succeeded, and the helper launched in the next single probe. This strongly supports a long-path launch limitation as the immediate error at that stage. It does not establish that shortening paths resolves the whole workflow.
2. Installed runtime access validation
With the shorter vendor path, setup provisioning completed and the refresh helper launched, but the sandbox log then reported:
The referenced file is present (directory enumeration reports an ordinary file, 33,971,040 bytes). Read-only checks of this exact file returned:
Get-Acl: unauthorized operation / access denied.icaclsinspection: access denied; zero files successfully processed.CreateFileW, allowing read/write/delete sharing: Windows error 5 separately forFILE_READ_ATTRIBUTES,FILE_READ_DATA, andREAD_CONTROL.Get-Aclinspection: access denied. The diagnostic verified that its token was elevated.The parent directories' ACLs were readable. They contain inherited allow entries granting the user, SYSTEM, and Administrators full access, and
CodexSandboxUsersread/execute access. This does not reveal the file's own ACL or prove the sandbox token's effective access. We have not established whether the enforcement source is a file ACL, security software, or another OS/runtime condition. The standalone error-5 checks are additional observations; the setup log itself did not include that Win32 error number.Setup side effects and limits
The native setup log records sandbox-user provisioning checks, sandbox firewall/WFP configuration, write ACEs for the temporary directory and dummy workspace, and a read-ACL pass. We are not claiming these probes left all system state unchanged. We made no manual ownership/ACL changes, disabled no protection, and used no full-access or unelevated fallback.
No follow-up probe successfully read the dummy files. CLI exit 0 after the fixed stub final message is not tool success. The dummy command intentionally includes a missing
recovery.json; a normal missing-file result would indicate that execution had started, but these failures occur before the requested read. The runtime access error should not be retroactively presented as the proven cause of the original generic policy rejection.Requested triage
Could maintainers please:
codex-windows-sandbox-setup.exe, or document a supported runtime location/path-length limit.node_repl.exeaccess-validation failure, including what safe diagnostic can distinguish its cause when even an elevated ACL read is denied.We have stopped retries and preserved the receipts. We can provide further sanitized, targeted diagnostics if requested. Please avoid a blanket permission grant or disabling the sandbox as the proposed resolution. If the two downstream failures should be tracked separately, please advise how best to split/link them; this follow-up documents the progression of the already reported blocker.
Evidence dates: local 2026-10-01 (America/Argentina/Buenos_Aires); some sandbox log filenames/timestamps use 2026-10-02 UTC. Paths, account names, machine names and SIDs are redacted above. No credentials, complete user profile, or private project source is included.
tayapro commentedon Oct 9, 2026
Following up on the Sep 28 report in this thread about
SystemRootbeing absent from the native Windows elevated sandbox environment.I can reproduce the same missing-
SystemRootbehavior on a current Windows Codex build, with a slightly different visible failure: Node starts successfully for--version, but aborts as soon as it initializes enough runtime state to execute JavaScript.Environment:
v24.21.0This is after updating Codex. A previous broader Windows sandbox failure (
helper_unknown_error: setup refresh had errors) is no longer occurring on this machine: ordinary sandboxed commands now execute normally.However, Node-based commands still fail inside the sandbox.
I ran the following diagnostics entirely inside the sandbox, with no outside-sandbox retries, no elevation, and no persistent environment changes.
1. Basic sandbox execution
Result:
Exit code:
0.So the elevated sandbox itself is now able to launch ordinary commands.
2. Check
SystemRootResult:
Exit code:
0.cmd.exetherefore receives an environment whereSystemRootis not defined.3. Check Node startup
Result:
Exit code:
0.So
node.execan start far enough to print its version.4. Execute JavaScript
Result: exit code
1.5. A/B test: restore only
SystemRootIn the same sandbox:
Result:
Exit code:
0.No persistent environment variable was created.
SystemRootwas supplied only to this child command.This gives a reproducible A/B result on this machine:
This appears consistent with the missing-
SystemRootbehavior reported in the Sep 28 comment above.One useful detail is that:
is not sufficient as a sandbox health check in this case. It succeeds even though actual JavaScript execution fails during Node initialization.
The practical impact is that project-local Node tooling cannot run normally inside the sandbox. For example, a command such as:
cannot currently be used normally even though ordinary
cmd.execommands work.There are also newer reports involving missing
SystemRootand the samencrypto::CSPRNG(nullptr, 0)failure in other Windows Codex execution paths:Those use different executor/MCP paths, so I am not claiming they are exact duplicates, but the
SystemRoot/ Node initialization behavior appears closely related.On this machine, restoring only
SystemRootis sufficient to make sandboxed Node JavaScript execution work.Mad-Max8063 commentedon Oct 9, 2026
Follow-up: SystemRoot comparison blocked before shell execution (Windows error 32)
Following the SystemRoot report in comment 6083930724, our bounded diagnostic
still stops before executing the shell. On our machine the current blocker is
runtime setup validation with Windows os error 32, so we cannot yet test
whether SystemRoot fixes Node initialization.
Current desktop CLI: 0.162.0-alpha.2, binary SHA-256
3553cd6e7df5a093d8cb8301cd8088a57e0971aba71ddbe0e67f7f44a15cdf68.
Native Windows build 26300.9457, Node v24.14.0 (host version inventory only).
GetWindowsDirectoryW and registry independently identify C:\Windows.
We reused the credential-free loopback Responses stub and dummy fixture,
through functions.exec -> tools.exec_command. The launcher ran as the normal
Windows user (administrator-token check: false). Explicit settings:
--ignore-user-config, windows.sandbox="elevated", default_permissions=":workspace",
approval_policy="never", features.prefer_mxc=false. Trace confirms Never/User
approvals, :workspace permissions and restricted network. No full-access,
rules bypass or unsandboxed command fallback.
The native helper launched from the existing installed short path, then logged:
The tool returned
helper_unknown_error: setup refresh had errorsbeforecreating the shell (command event exit -1). CLI exit 0 only reflects the stub's
terminal message. One synthetic command request, two loopback requests, no
Authorization header, auth.json, model inference or changed fixture bytes.
We stopped on this first helper/runtime failure. The SystemRoot-injected B
condition was NOT RUN; neither Get-Content nor actual JavaScript ran, and the
inner SystemRoot value remains unobserved. An earlier nested-launch attempt
failed resolving its isolated CODEX_HOME; normal-host launch passed that stage.
Native setup logged firewall/WFP configuration and read/write ACE updates.
We issued no manual ownership/ACL repairs, protection changes, runtime
replacement or process termination. Our historical error was os error 5 on a
different runtime path; we are not claiming one cause or a verified fix.
What supported procedure can diagnose/recover this runtime setup sharing
failure without weakening sandbox protections? Does setup account for an
already-running runtime holding this file open, and how should operators
distinguish that case safely? We have not identified the locking process.
Sanitized receipts: evidence/systemroot-normal-host-20261009.json. The full
local log is preserved; private paths/SIDs are redacted from the export.
Read-only source review on 2026-10-09 found related reports #52328 (commands
work while Desktop is closed) and #51971 (MAXIMUM_ALLOWED access-mask comparison).
Tagged rust-v0.162.0-alpha.2 acl.rs contains that access mode and the exact
root-only error context. This supports an investigation direction, not a
verified local cause or an official fix. We have not applied the ACL workaround.
The official Windows troubleshooting recommends restarting Codex and collecting
logs. The single manual external continuation then completed on
2026-10-09T23:43:39Z with the same CLI hash and exact harness snapshot. Its
Windows token was non-admin (verified by both terminal output and inventory).
It again failed in A with the same node_repl.exe sharing violation, before
shell creation; B was automatically NOT RUN. Elevated/never/workspace and
restricted network are recorded in the effective trace. Six receipt-assessment
tests passed, separately from the failed sandbox execution.
We requested normal Desktop exit before that run, but the harness did not
instrument app/helper process closure or identify the conflicting handle.
This does not establish that the app and all helpers were closed, or disprove
the other user's closed-app recovery. No further retries or ACL workarounds.
Sanitized external receipts: evidence/systemroot-external-20261009.json.
The receipt filenames above identify preserved local artifacts, not public attachments; they have not been pushed. We can provide targeted sanitized excerpts if requested.
huajunsun273-hub commentedon Oct 17, 2026
Additional Windows CLI reproduction: in-worktree read-only
Get-Contentrejected before PowerShell launch (0.153.3)I am adding a separate, sanitized occurrence of the same error class to this open issue. In contrast to the original report here, the Markdown file in this occurrence was inside the selected Git worktree, not in a sibling repository. We do not know whether both occurrences share the same denying policy.
Environment / exact CLI shape
gpt-6-astra.Observed result and separately retained evidence
At 2026-10-17 12:05:56.785403 UTC, retained Codex stderr contains this tool-router failure (machine-specific executable path removed):
The tool request reached
codex_core::tools::router, but the requested PowerShell subprocess did not demonstrably start and no file read was proved.thread.started,turn.started,item.completed(agent_message),item.completed(agent_message),turn.completed.command_executionJSONL events; the agent reported that the command was blocked. The independent stderr trace supports a tool request and pre-spawn rejection, but does not identify the policy layer or rule.5669d506e53bb36309326ebb67958434eb304fd7639182cc9906c95e54ac21fb.0ef37ab93a4686ab0e0c805e5a6183e883b6ab54c820e816409f93579cf8138e.0.162.0-alpha.17.2), which was not used for this incident; current help/config cannot establish the effective policy of the earlier run. Other unrelated local warnings were seen but not proved causal.Could maintainers please clarify:
exec_command failed: CreateProcess ... rejected: blocked by policybeforepwsh.exelaunches under these precise read-only, no-approval flags? Is it possible to retrieve an actionable policy source/rule ID, denial reason or correlation ID for this particular request?Get-Content -LiteralPath <relative-file>an expected restriction, or a possible false positive? Does this message definitively mean Windows never created the child process?This report establishes a pre-spawn policy rejection, not the identity of its owner/rule, successful repository reading or a root cause shared with other reports. Thank you.
ushakovfinance-commits commentedon Nov 6, 2026
Additional version-pinned incident for the Windows pre-CreateProcess denial described here (request for a maintainer's policy attribution; not a claim of a confirmed root cause).
codex exec --ignore-user-config --ephemeral --sandbox read-only -c approval_policy="never" --json ..., with no explicitwindows.sandboxoverride. The ordinary user config (not loaded by this invocation) had[windows] sandbox = "elevated".Get-Contentread were rejected byCreateProcess ... rejected: blocked by policybefore PowerShell started. There were zero completed command/tool executions. The CLI process nevertheless exited 0.CODEX_HOMEwas not retained. No config, sandbox, approval policy, OS permissions or runner was modified, and no repeat execution was attempted.rust-v0.166.0-alpha.6:codex-rs/core/src/exec_policy.rsaround lines 792–811 returnsDecision::ForbiddenunderWindowsSandboxLevel::Disabled+ managed filesystem restrictions +AskForApproval::Never.windows_sandbox.rsaround lines 126–151 derives selection from config/features and can yieldDisabled. This is a strong candidate, not proof of the historical effective state. Also related: 0.152.0 Windows:--ignore-user-configleaves exec with no usable sandbox — every command "rejected: blocked by policy" (regression from 0.147.0) #42172, Windows CLI 0.166.0: exec_command blocked by policy in read-only and split writable-root failure in workspace-write #59314.OpenAI maintainers: Can you confirm whether this specific configuration on 0.166.0-alpha.6 would use the disabled-backend policy branch, or identify another enforcing layer capable of producing the same refusal? What supported read-only diagnostic can recover the effective policy/decision from the original ephemeral invocation, and what is the sandbox-preserving remediation when user config is intentionally ignored? We are not requesting Full Access, an approval bypass, changing Windows ACLs, or running unsandboxed.
No proprietary paths, source filenames, account details, credentials, full command transcripts, or private logs are included.
--ignore-user-configleaves exec with no usable sandbox — every command "rejected: blocked by policy" (regression from 0.147.0) #42172 as a duplicate of this issue