Skip to content

Windows Codex app command execution still depends on PowerShell even when Integrated Terminal Shell is set to Command Prompt #19629

@narlamy

Description

@narlamy

본문은 이걸 붙여넣으면 됩니다.

## Summary
In the Windows Codex desktop app, the “Integrated Terminal Shell” setting is set to “Command Prompt”, but Codex tool command execution still appears to initialize through a PowerShell host.

As a result, commands fail before reaching `cmd`, even when the command itself is explicitly written as `cmd /c ...`.

## Environment
- OS: Windows
- Codex desktop app
- Integrated Terminal Shell setting: Command Prompt
- Workspace: Windows local project
- PowerShell is intentionally avoided in this project

## Reproduction
1. In Codex app settings, set:
   - Integrated Terminal Shell: Command Prompt
2. Ask Codex to run a command in a repo, for example:

   ```bat
   cmd /c git status --short
  1. Observe that command execution fails before cmd runs.

Actual Result

The command fails with:

Internal Windows PowerShell error. Loading managed Windows PowerShell failed with error 8009001d.

This happens even though the integrated terminal shell is set to Command Prompt.

Expected Result

When the app is configured to use Command Prompt, local command execution should not require PowerShell initialization.

Alternatively, the app should clearly expose that Codex tool execution uses a separate shell/runtime path from the integrated terminal setting, and provide a way to configure that execution shell separately.

Reason / Impact

There are practical reasons some Windows users, especially Korean users, strongly prefer to avoid PowerShell for repository automation.

PowerShell frequently causes encoding issues with Korean text because Windows environments often default to legacy Microsoft Korean code pages rather than UTF-8. In source repositories containing Korean text, this can corrupt or mangle output and sometimes lead to accidental source-code damage when commands are copied, transformed, or redirected.

A common example is that Unix-style commands such as cat are mapped in PowerShell to Get-Content, which often behaves differently around encoding. In practice this makes Korean text handling unreliable enough that users repeatedly avoid PowerShell and instead use tools like rg or direct Command Prompt/Git Bash commands.

Even when a project gives Codex explicit global instructions to avoid PowerShell, the agent can still forget or the execution layer can still route through PowerShell. If the Codex app setting says “Command Prompt”, users expect command execution to avoid PowerShell entirely.

Why this matters

For Windows projects that explicitly prohibit PowerShell due to encoding safety, Codex command execution becomes unreliable even after the app UI is configured to use Command Prompt.

This makes it difficult to run ordinary development workflows such as:

git status --short
git diff --check
git add -A
git commit -m "..."

without manually leaving Codex and using an external terminal.

Suggested Fix

  • Make Codex tool command execution honor the configured Integrated Terminal Shell setting, or
  • Add a separate setting for the shell/runtime used by Codex command tools, or
  • Avoid initializing PowerShell when the requested command is explicitly targeting cmd.

Metadata

Metadata

Assignees

No one assigned

    Labels

    appIssues related to the Codex desktop appbugSomething isn't workingconfigIssues involving config.toml, config keys, config merging, or config updatestool-callsIssues related to tool callingwindows-osIssues related to Codex on Windows systems

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions