You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Git Bash (MSYS2) — the default Bash environment for Claude Code on Windows
node codex-companion.mjs cancel <job-id> invoked when a job has stalled
Symptom
When codex-companion's soft-cancel IPC fails and the script falls back to taskkill /PID <pid> /T /F, Git Bash's MSYS layer translates the literal /PID argument into a Windows path, mangling the command:
taskkill /PID 34428 /T /F: exit=1: ERROR: Invalid argument/option - 'C:/Program Files/Git/PID'.
Type "TASKKILL /?" for usage.
MSYS sees /PID as a root-level Unix path and prefixes it with the Git for Windows install root. The actual taskkill receives C:/Program Files/Git/PID 34428 /T /F and rejects the bogus argument.
Result: the cancel fallback fails, the wedged codex process keeps running, and the user has to clean up manually via Stop-Process -Id <pid> -Force from PowerShell.
Reproduction
Launch any codex adversarial-review job from Git Bash on Windows
Run node codex-companion.mjs cancel <job-id> from Git Bash
Observe the MSYS-mangled taskkill stderr
Suggested fixes (any of these works)
Set MSYS_NO_PATHCONV=1 in the env for the taskkill invocation
Pass //PID (double-slash escape recognized by MSYS as "no translation")
Preferred: on Windows, use powershell.exe -NoProfile -Command "Stop-Process -Id <pid> -Force" instead of taskkill — no MSYS translation, cleaner exit semantics, no dependency on which shell wraps the node invocation
Option 3 is what we recommend to our users in our orchestrator's recovery guidance, so confirmed working.
Reference
Same orchestrator run as the IPC deadlock issue (#330). Job ID review-mpbtwgbj-gswbux, PID 34428.
Environment
node codex-companion.mjs cancel <job-id>invoked when a job has stalledSymptom
When
codex-companion's soft-cancel IPC fails and the script falls back totaskkill /PID <pid> /T /F, Git Bash's MSYS layer translates the literal/PIDargument into a Windows path, mangling the command:MSYS sees
/PIDas a root-level Unix path and prefixes it with the Git for Windows install root. The actualtaskkillreceivesC:/Program Files/Git/PID 34428 /T /Fand rejects the bogus argument.Result: the cancel fallback fails, the wedged codex process keeps running, and the user has to clean up manually via
Stop-Process -Id <pid> -Forcefrom PowerShell.Reproduction
node codex-companion.mjs cancel <job-id>from Git BashSuggested fixes (any of these works)
MSYS_NO_PATHCONV=1in the env for the taskkill invocation//PID(double-slash escape recognized by MSYS as "no translation")powershell.exe -NoProfile -Command "Stop-Process -Id <pid> -Force"instead oftaskkill— no MSYS translation, cleaner exit semantics, no dependency on which shell wraps the node invocationOption 3 is what we recommend to our users in our orchestrator's recovery guidance, so confirmed working.
Reference
Same orchestrator run as the IPC deadlock issue (#330). Job ID
review-mpbtwgbj-gswbux, PID 34428.