Environment
- OS: Windows 11 Pro 10.0.22631
- Claude Code shell: Git Bash (bash)
- Plugin version: 1.0.1
- Codex CLI: codex-cli 0.118.0
- Node.js: v22.17.0
Problem
Codex review jobs hang indefinitely on Windows when Claude Code is configured to use Git Bash. Reviews run for 10h–87h+ without completing.
Symptoms
- Shell commands are repeatedly "declined" (exit -1), even trivial ones like
Write-Output hi and git status -v
- Commands are routed through PowerShell (
C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe) despite the user's shell being Git Bash
- Reviews that can't execute shell commands fall back to MCP/LSP tools but get stuck in "investigating" phase indefinitely
- Some review sessions can execute commands (exit 0) while others in the same session cannot — inconsistent behavior
Log Examples
Progress:
Running command: powershell.exe -Command 'Write-Output hi'
Command declined: powershell.exe -Command 'Write-Output hi' (exit -1)
Running command: powershell.exe -Command 'git status -v'
Command declined: powershell.exe -Command 'git status -v' (exit -1)
Calling omx_code_intel/lsp_document_symbols.
# ... stuck in investigating for 10+ hours
Root Cause Analysis
In lib/app-server.mjs (~L190) and process.mjs (~L7):
shell: process.platform === "win32"
On Windows, spawn() with shell: true uses cmd.exe by default. The Codex app-server then defaults to PowerShell for subprocess execution, which doesn't match the user's configured Git Bash environment. This causes a shell mismatch where commands are declined or fail silently.
Suggested Fix
Respect the user's configured shell environment instead of hard-coding Windows shell detection:
// Use SHELL env var if available (Git Bash sets this)
const shell = process.platform === "win32"
? (process.env.SHELL || true)
: false;
Steps to Reproduce
- Install Claude Code on Windows 11
- Configure Claude Code to use Git Bash as the shell
- Install the Codex plugin (
/plugin install codex@openai-codex)
- Run
/codex:review
- Observe the review hanging in "running" or "investigating" phase with shell commands being declined
Workaround
None found. The review never completes on this configuration.
Environment
Problem
Codex review jobs hang indefinitely on Windows when Claude Code is configured to use Git Bash. Reviews run for 10h–87h+ without completing.
Symptoms
Write-Output hiandgit status -vC:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe) despite the user's shell being Git BashLog Examples
Root Cause Analysis
In
lib/app-server.mjs(~L190) andprocess.mjs(~L7):On Windows,
spawn()withshell: trueusescmd.exeby default. The Codex app-server then defaults to PowerShell for subprocess execution, which doesn't match the user's configured Git Bash environment. This causes a shell mismatch where commands are declined or fail silently.Suggested Fix
Respect the user's configured shell environment instead of hard-coding Windows shell detection:
Steps to Reproduce
/plugin install codex@openai-codex)/codex:reviewWorkaround
None found. The review never completes on this configuration.