feat: Add Windows WSL auto-detection and bridge mode #3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
install.sh— no longer errors on Windowscodex-agentshim at~/bin/codex-agentwith path conversioncodex-agent-wsl.shbridge wrapper handling 3 Windows path formatsscriptcommand syntax intmux.ts(macOS BSD vs Linux util-linux)How it works
install.shdetects Windows viauname -s(CYGWIN/MINGW/MSYS)wsl --status)~/bin/codex-agentshim on Windows side/mnt/format and routes throughwsl -e bashChanges
scripts/install.sh: AddedPLATFORM=windowsdetection,install_via_wsl(),create_windows_shim(),convert_to_wsl_path()scripts/codex-agent-wsl.sh: New WSL bridge wrapper with 3-format path conversion (Git Bash/c/, CMDC:\, PowerShellC:/)src/tmux.ts: Detect macOS vs Linux at runtime forscriptcommand syntax (script -q logfile cmdvsscript -q -c "cmd" logfile)README.md: Added Windows/WSL installation sectionSKILL.md: Added Windows/WSL prerequisites notePath conversion
The bridge converts
-d/--dirand-f/--fileflag values automatically:/c/Users/foo→/mnt/c/Users/foo(Git Bash)C:\Users\foo→/mnt/c/Users/foo(CMD)C:/Users/foo→/mnt/c/Users/foo(PowerShell)CWD is also auto-converted so agents work in the correct directory.
Linux script fix
The
scriptcommand intmux.tsused macOS/BSD syntax (script -q logfile command). On Linux distros with util-linux, this requires-cflag (script -q -c "command" logfile). Without-c, the codex args were consumed byscriptas the logfile path. Now detectsos.platform()at runtime.Testing
codex-agent health,jobs,start --dry-runall verified from Git BashTest plan
codex-agent healthreturns "Status: Ready"codex-agent start "test" -d "C:\Users\..." --dry-runconverts pathsscriptcommand works on both macOS and Linux