Skip to content

Enabling unified_exec in config.toml causes all shell commands to fail (exit code -1073741502) #7466

Closed

Description

@cheezmil

What version of Codex is running?

codex-cli 0.63.0

What subscription do you have?

Team

Which model were you using?

gpt-5.1

What platform is your computer?

Microsoft Windows NT 10.0.22631.0 x64

What issue are you seeing?

After I enable unified_exec in my Codex config, all shell commands triggered from Codex stop working.

I added this to %USERPROFILE%.codex\config.toml:

[features]
unified_exec = true

After that, any command Codex tries to run via the integrated shell fails immediately with exit code -1073741502 (Windows error 0xC0000142 – process initialization failed), with no stdout/stderr output at all.

This happens regardless of the actual command:

pwsh -NoLogo -Command "node -v"

Before enabling unified_exec, the same commands executed via Codex worked normally.

From a normal PowerShell window on the same machine, these commands work fine, so it’s not an OS or Node/curl issue; it only breaks when Codex is using unified_exec.

So effectively, enabling unified_exec = true makes Codex’s command execution backend unusable on my Windows machine.

If needed, I can provide the relevant excerpts from codex-tui.log, but currently the UI just shows something like “Process exited with code -1073741502” and empty output.

What steps can reproduce the bug?

On Windows, create or edit %USERPROFILE%.codex\config.toml and add:

[features]
unified_exec = true

In a project, ask the assistant to run a simple command, e.g.:

pwsh -NoLogo -Command "Get-Location"
or pwsh -NoLogo -Command "node -v"

The command exits with code -1073741502.
No stdout/stderr is shown, even for very simple commands

What is the expected behavior?

No response

Additional information

When an error occurs, codex-tui.log does not have new logs

Activity

  1. added
    bug
    on Dec 1, 2025
  2. added
    tool-calls
    on Dec 1, 2025
  3. 448523760 commented on Dec 2, 2025

    @448523760
    Contributor

    After reproducing the issue locally, I believe the problem is caused by the default deserialization of the ExecCommandArgs struct.

    #[derive(Debug, Deserialize)]
    struct ExecCommandArgs {
        cmd: String,
        #[serde(default)]
        workdir: Option<String>,
        #[serde(default = "default_shell")]
        shell: String,
        #[serde(default = "default_login")]
        login: bool,
        #[serde(default = "default_exec_yield_time_ms")]
        yield_time_ms: u64,
        #[serde(default)]
        max_output_tokens: Option<usize>,
        #[serde(default)]
        with_escalated_permissions: Option<bool>,
        #[serde(default)]
        justification: Option<String>,
    }

    The shell field uses a hard-coded default:

    fn default_shell() -> String {
        "/bin/bash".to_string()
    }

    This causes Codex to execute the LLM-generated commands using bash on Windows.

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-calls

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions