Skip to content

No output from commands #15032

Closed
Closed

Description

@takina0802

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

Activity

  1. added
    bug
    on Mar 18, 2026
  2. added
    CLI
    windows-os
    tool-calls
    on Mar 18, 2026
  3. takina0802 commented on Mar 18, 2026

    @takina0802
    Author

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

  4. takina0802 commented on Mar 19, 2026

    @takina0802
    Author

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

    write_frame(&mut pipe_write, &spawn_request)?;
    read_spawn_ready(&mut pipe_read)?;

    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:

    let ok = CreateProcessAsUserW(
    h_token,
    std::ptr::null(),
    cmdline.as_mut_ptr(),
    std::ptr::null_mut(),
    std::ptr::null_mut(),
    inherit_handles as i32,
    creation_flags,
    env_block.as_ptr() as *mut c_void,
    cwd_wide.as_ptr(),
    &si,
    &mut pi,
    );

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

    let spawn_res = unsafe {
    CreateProcessWithLogonW(
    user_w.as_ptr(),
    domain_w.as_ptr(),
    password_w.as_ptr(),
    LOGON_WITH_PROFILE,
    exe_w.as_ptr(),
    cmdline_vec.as_mut_ptr(),
    windows_sys::Win32::System::Threading::CREATE_NO_WINDOW
    | windows_sys::Win32::System::Threading::CREATE_UNICODE_ENVIRONMENT,
    env_block
    .as_ref()
    .map(|b| b.as_ptr() as *const c_void)
    .unwrap_or(ptr::null()),
    cwd_w.as_ptr(),
    &si,
    &mut pi,
    )
    };

    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:

    let spawn_result = unsafe {
    create_process_as_user(
    h_token,
    argv,
    cwd,
    env_map,
    None,
    stdio,
    use_private_desktop,
    )
    };

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

  5. removed
    CLI
    on Mar 19, 2026
  6. chausner commented on Mar 20, 2026

    @chausner

    @AnonTokio It's probably the issue reported here: #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.

  7. takina0802 commented on Mar 21, 2026

    @takina0802
    Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugtool-callswindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions