/side isnt respecting ctrl+/ in Git Bash Windows
/side isnt respecting ctrl+/ in Git Bash Windows
it is to be expected that ctrl+/ would be respected or honor when pressing this
thanks ! so far I really enjoy Codex
Some diagnosis from the source: codex already anticipates the usual Ctrl+/ ambiguity — the dispatch accepts both ctrl-/ and the legacy ctrl-7 encoding (terminals classically send byte 0x1F for Ctrl+/, which the ANSI parser decodes as Ctrl+7): https://github.com/openai/codex/blob/1f41cc5d92/codex-rs/tui/src/app/input.rs#L312-L323. So the failure in Git Bash is at the decode layer, not the keymap.
Git Bash runs codex under mintty→ConPTY, where input arrives as Windows console key events rather than ANSI bytes. On that path 0x1F tends to surface as a control character with no clean Ctrl+'/'‑or‑Ctrl+'7' identity — commonly Ctrl+'_' or a bare Char('\u{1F}') — which matches neither accepted binding, so the chord silently does nothing (while Windows Terminal, sending proper VK data, works).
Two fixes: (1) broaden the alias set at the same dispatch site to include Ctrl+'_'/Char('\u{1F}'); (2) more generally, a /keys debug view that prints the decoded KeyEvent would make this whole class of "terminal X eats chord Y" report self-diagnosable. Workaround meanwhile: bind an alternative via [tui.keymap.global] toggle_side_conversation = ["alt-s"] (any chord Git Bash delivers cleanly).
(response from codex)
Thanks for reporting this! I reproduced it with Codex CLI 0.171.0 in Git Bash (mintty) on Windows 11. When I pressed Ctrl+/, Codex’s /keymap debug showed Ctrl+Shift+Minus. A separate console program received the same key combination, so the shortcut is being translated before it reaches Codex.
You can keep using Ctrl+/ by adding the following to ~/.codex/config.toml and restarting Codex. If you already have a [tui.keymap.global] section, add the setting under that heading.
[tui.keymap.global]
toggle_side_conversation = ["ctrl-/", "ctrl-shift-minus"]
I verified that with this setting, pressing Ctrl+/ returned me to the main conversation, and pressing it again brought me back to the same side conversation.
(response from codex)
Thanks for reporting this! I reproduced it with Codex CLI 0.171.0 in Git Bash (mintty) on Windows 11. When I pressed
Ctrl+/, Codex’s/keymap debugshowedCtrl+Shift+Minus. A separate console program received the same key combination, so the shortcut is being translated before it reaches Codex.You can keep using
Ctrl+/by adding the following to~/.codex/config.tomland restarting Codex. If you already have a[tui.keymap.global]section, add the setting under that heading.[tui.keymap.global] toggle_side_conversation = ["ctrl-/", "ctrl-shift-minus"] I verified that with this setting, pressing
Ctrl+/returned me to the main conversation, and pressing it again brought me back to the same side conversation.
Thanks for putting the time - obviously no reasonable person should use Codex under //Git Bash (mintty) on Windows 11// -- seems like a good call not do this or have a niche switch-case in a case a user is in mintty -- my reasoning about a users who might be using codex under Git Bash - would be , please use powershell instead -- clearly "Git Bash / mintty" is one of those software that map keys into weird default keys they set so codex have nothing to do with it .. an interesting metric would be -- checking sentry or the telemtry codex send and ask "how many users use mintty? how many users uses /side - how many users press "ctrl-/" " [I asked chatgpt - it claims this sort of analysis is called "telemetry analysis" or "usage analytics" ]
if TERM_PROGRAM = mintty
display a warning to use the other recomended temrinals
https://github.com/openai/codex/blob/140815f19c05a24a70ebc273016bd54ff71ced7c/codex-rs/terminal-detection/src/lib.rs#L38
Orca and Rex are added - yet mintty has vastly more Windows users than Rex, Orca? but it seems logical that users will use Powershell - for various of reasons - (why would you allow mintty - or outdated binaries - should you sandbox it in windows or not... will the model behavior change? because you are mixing powershel and linux commands with mintty for example codex supplies rg already)
having "ctrl-shift-minus" remapped for mintty users could be the right call - but then few months down the line the same hotfix could cause confusion and issues and bloattify the codebase lol
@etraut-openai i slepth on this issue - marking it "not planned" seems like a good call, but only if users are given a warning like "using Mintty is not recomended please use powershell" but pretending we want to have POSIX like command in linux (or have the model use a various of linux commands on a windows machine) would be claiming "powershell" cant do most of the things we can do on a linux machine
for example grep vs. Select-String
wherees Select-String is powershell
or • Bash: grep -rn "error" /var/log/ • PowerShell: Get-ChildItem -Path C:\Logs -Recurse | Select-String -Pattern "error" | Select-Object Path, LineNumber, Line potentially Windows linux consume more tokens --- is this logic true or not?
for example why would you have the model reason so much on powershell commands?
to illustrate the problem wellifully:
- Linux agents commonly expect grep, find, sed, awk, cat, head, tail, xargs, sort, uniq, cut, diff, patch, and bash.
- Windows agents may instead incounter PowerShell commands such as Get-ChildItem and Select-Strnig.
i am not sure about Linux GNU licenses
i thikn https://landley.net/toybox/license.html or https://github.com/freebsd/freebsd-src/tree/main/usr.bin
idealy could have an attractive license
**if cygwin or msys2 could be problematic as for lets imagine we bundle linux utils into windows lol -- **
Object-Oriented Output & Formatting Bloat (The Real Culprit??) Command Syntax Overhead (Negligible??)