CLI can't seem to run git bash commands, even if sandbox disabled

Open 💬 1 comment Opened Mar 2, 2026 by matthewdeanmartin

What version of Codex CLI is running?

codex-cli 0.106.0

What subscription do you have?

OpenAI ChatGPT Pro

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)?

Terminal with git-bash

What issue are you seeing?

Really, really, difficult for the bot to use git bash.

No, I don't want to use WSL, this is a home machine, I'd rather repave it with ubuntu then run anything in a VM.

Repaving it with ubuntu is more work that I'm up for when pretty much every other agentic coding tool can use git bash without drama.

---

• I’ll rerun the same Bash diagnostics now so you get fresh output at the bottom of the terminal.

• Running echo $BASH_VERSION; echo $0; pwd; uname -s

• Ran for i in {1..3}; do echo $i; done
└ ParserError:
Line |
2 | for i in {1..3}; do echo $i; done
| ~
| Missing opening '(' after keyword 'for'.

• Ran echo $BASH_VERSION; echo $0; pwd; uname -s

MINGW64_NT-10.0-26200
… +2 lines
C:\github\tkstatistics

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

• Here are the rerun diagnostics and outputs:

echo $BASH_VERSION; echo $0; pwd; uname -s

Output:

MINGW64_NT-10.0-26200
Path
----
C:\github\tkstatistics

for i in {1..3}; do echo $i; done

Output:

ParserError:
Line |
2 | for i in {1..3}; do echo $i; done
| ~
| Missing opening '(' after keyword 'for'.

• Ran $PSVersionTable.PSVersion.ToString(); $env:ComSpec; $env:SHELL; (Get-CimInstance Win32_Process -Filter "ProcessId=$PID").ParentProcessId; (Get-Process -Id
│ ((Get-CimInstance Win32_Process -Filter "ProcessId=$PID").ParentProcessId)).ProcessName
└ 7.5.4
C:\WINDOWS\system32\cmd.exe
C:\Program Files\Git\usr\bin\bash.exe

• Ran Get-Command bash -ErrorAction SilentlyContinue | Select-Object -ExpandProperty Source
└ C:\Program Files\Git\usr\bin\bash.exe

• Ran $PSVersionTable.PSVersion.ToString(); $env:ComSpec; $env:SHELL; (Get-CimInstance Win32_Process -Filter "ProcessId=$PID").ParentProcessId; (Get-Process -Id
│ ((Get-CimInstance Win32_Process -Filter "ProcessId=$PID").ParentProcessId)).ProcessName
└ 7.5.4
C:\WINDOWS\system32\cmd.exe
C:\Program Files\Git\usr\bin\bash.exe
567512
codex

What steps can reproduce the bug?

open codex from git bash and ask it to run any bash-only command

What is the expected behavior?

It should run a bash command. Kilo, Claude, etc all do this more or less without any extra help.

Additional information

_No response_

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗