execution error: Io(Error { kind: InvalidInput, message: "batch file arguments are invalid" })

Resolved 💬 5 comments Opened Feb 18, 2026 by geocine Closed Feb 20, 2026

What version of Codex CLI is running?

codex-cli 0.103.0

What subscription do you have?

plus

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 Git Bash

What issue are you seeing?

When running Codex CLI inside Git Bash, any command execution fails before the command is actually run. The CLI appears to attempt execution, but immediately returns:

• Permissions updated to Full Access


› help me analyze the code on this repo


• I’ll do a quick repo reconnaissance first, then map the architecture, key modules, and likely risk areas so you get a
  practical code analysis. I’m starting by listing the project structure and core config files.

• Running Get-ChildItem -Force | Select-Object Name,Mode,Length,LastWriteTime

• Ran rg --files
  └ execution error: Io(Error { kind: InvalidInput, message: "batch file arguments are invalid" })

• Ran git status --short
  └ execution error: Io(Error { kind: InvalidInput, message: "batch file arguments are invalid" })

• The first command batch failed due command invocation formatting, so I’m retrying with direct shell calls one by one
  to get the file inventory.

• Ran pwd
  └ execution error: Io(Error { kind: InvalidInput, message: "batch file arguments are invalid" })

• Ran Get-Location
  └ execution error: Io(Error { kind: InvalidInput, message: "batch file arguments are invalid" })

• Ran ls
  └ execution error: Io(Error { kind: InvalidInput, message: "batch file arguments are invalid" })

• Ran ls
  └ execution error: Io(Error { kind: InvalidInput, message: "batch file arguments are invalid" })

• Ran C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -Command "Get-Location"
  └ execution error: Io(Error { kind: InvalidInput, message: "batch file arguments are invalid" })

────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

• I’m still blocked by a shell runner error before any command executes. I’ll try one last compatibility fallback (cmd /
  c dir) to confirm whether command execution is generally unavailable.

• Ran cmd /c dir
  └ execution error: Io(Error { kind: InvalidInput, message: "batch file arguments are invalid" })

• Searched

• Ran echo hi
  └ execution error: Io(Error { kind: InvalidInput, message: "batch file arguments are invalid" })

What steps can reproduce the bug?

  1. Open Windows Terminal.
  2. Use the Git Bash profile.
  3. Run codex.
  4. Enter a prompt that triggers repository inspection (e.g., “help me analyze the code on this repo”).
  5. Codex attempts to execute shell commands.
  6. All commands fail with:
Io(Error { kind: InvalidInput, message: "batch file arguments are invalid" })

What is the expected behavior?

Commands should execute normally (as they did in codex-cli 0.101.0) regardless of whether the shell is:

  • Git Bash
  • CMD
  • PowerShell

~~This worked correctly in codex-cli 0.101.0 under Git Bash.~~

Additional information

In Git Bash only:

  • All shell commands fail immediately.
  • Even trivial commands like echo hi fail.
  • The failure occurs before command execution.
  • The CLI works correctly in CMD.

View original on GitHub ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗