No output from commands

Resolved 💬 5 comments Opened Mar 18, 2026 by wangzhen0518 Closed Aug 5, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What version of Codex CLI is running?

codex-cli 0.115.0

What subscription do you have?

free

Which model were you using?

gpt-5.3-codex

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

What terminal emulator and version are you using (if applicable)?

Windows Terminal v1.23.20211.0

What issue are you seeing?

Running the command produces no output. The submitted record is just an example; all other commands I run on my computer exit with code -1 and produce no output.

---
Execute Get-ChildItem -Force once. Do not retry if it fails.

• Executing Get-ChildItem -Force once as requested. I will return the result of this single attempt without retrying.

• Ran Get-ChildItem -Force
└ (no output)

• Get-ChildItem -Force was executed 1 time. The attempt failed (exit code 1) and, as requested, was not retried.

---

What steps can reproduce the bug?

Uploaded thread: 019cffa0-ef69-71a3-b935-d7315c5d6331

What is the expected behavior?

The command runs normally, mostly exits with code 0, and produces output.

Additional information

_No response_

View original on GitHub ↗

5 Comments

github-actions[bot] contributor · 5 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #14423
  • #13340
  • #13917

Powered by Codex Action

wangzhen0518 · 5 months ago

This issue​ is similar to #13917, and both​ remain unsolved.

wangzhen0518 · 5 months ago

Through debugging, I discovered that the issue lies in the following code:

https://github.com/openai/codex/blob/db5781a08872873a4df82fbb4b3dc6ffd98b5d15/codex-rs/windows-sandbox-rs/src/elevated_impl.rs#L391-L392

After write_frame, the call to read_spawn_ready returns a result indicating that the command execution failed:

[2026-03-19 17:21:24.310 codex.exe] START: C:UserswangzAppDataLocalMicrosoftWindowsAppspwsh.exe -Command [Console]::OutputEncoding=[System.Text.Encoding]::UTF8;
echo hello dbg
[2026-03-19 17:21:24.799 codex.exe] runner launch: exe=C:Userswangz.codex.sandbox-bincodex-command-runner.exe cmdline=C:Userswangz.codex.sandbox-bincodex-command-runner.exe --pipe-in=\.pipecodex-runner-1a8a7c8de0d4fd1708f80f9bb4f95de1-in --pipe-out=\.pipecodex-runner-9f412679ce94203a2da3daf52f79a9fd-out cwd=D:projectmyprojcount_day2
[2026-03-19 17:25:40.135 codex-command-runner.exe] runner start cwd=D:projectmyprojcount_day2 cmd=["C:\Users\wangz\AppData\Local\Microsoft\WindowsApps\pwsh.exe", "-Command", "[Console]::OutputEncoding=[System.Text.Encoding]::UTF8;necho hello dbg"] real_codex_home=C:Userswangz.codex
[2026-03-19 17:25:40.137 codex-command-runner.exe] runner: effective cwd=D:projectmyprojcount_day2 (requested D:projectmyprojcount_day2)
[2026-03-19 17:32:14.970 codex.exe] runner error: CreateProcessAsUserW failed: 5 (Access is denied.) | cwd=D:projectmyprojcount_day2 | cmd=C:UserswangzAppDataLocalMicrosoftWindowsAppspwsh.exe -Command "[Console]::OutputEncoding=[System.Text.Encoding]::UTF8;
echo hello dbg" | env_u16_len=7190 | si_flags=256 | creation_flags=1024

This error occurs when codex-command-runner.exe executes the following code:

https://github.com/openai/codex/blob/db5781a08872873a4df82fbb4b3dc6ffd98b5d15/codex-rs/windows-sandbox-rs/src/process.rs#L126-L138

It appears to be a permissions issue. I also noticed that the account used in the following code is CodexOffline:

https://github.com/openai/codex/blob/db5781a08872873a4df82fbb4b3dc6ffd98b5d15/codex-rs/windows-sandbox-rs/src/elevated_impl.rs#L309-L327

Therefore, I granted the CodexOffline account read and execute permissions for the C:/Users/wangz directory via File Explorer, but the same error persists.

Since codex-command-runner.exe is loaded at runtime, I am unsure how to debug it. Furthermore, even after modifying None in the following code to a log file path, no logs are generated, likely due to permission issues preventing file writes:

https://github.com/openai/codex/blob/db5781a08872873a4df82fbb4b3dc6ffd98b5d15/codex-rs/windows-sandbox-rs/src/process.rs#L226-L236

I do not understand why new accounts like CodexOffline and CodexOnline need to be created instead of simply using the local Windows user account.

chausner · 5 months ago

@AnonTokio It's probably the issue reported here: https://github.com/openai/codex/issues/10090, some permission issue when PowerShell is installed via the Microsoft Store. Try uninstalling PowerShell and reinstall it via the MSI installer, that fixed it for me.

wangzhen0518 · 5 months ago

@chausner Thanks! After uninstalling PowerShell and reinstalling by scoop, the problem is resolved. This may be related to the permissions of the AppData folder.