What version of Codex is running?
Latest main branch (rust-v0.2.0-alpha.2)
What subscription do you have?
N/A - this is a terminal/keyboard handling bug
Which model were you using?
N/A - occurs regardless of model
What platform is your computer?
Windows 11 (Version 10.0.26100.7462) x64
What terminal emulator and version are you using?
Windows Terminal
What issue are you seeing?
When using Codex on Windows, the Mouse Properties control panel dialog (main.cpl) sometimes opens unexpectedly during normal usage.
What steps can reproduce the bug?
The issue is intermittent and depends on specific timing of escape sequences. It occurs during normal TUI usage but is not reliably reproducible on demand.
What is the expected behavior?
The Mouse Properties dialog should never open - Codex should only interact with the terminal, not trigger Windows control panel applets.
Root Cause Analysis
The REPORT_ALTERNATE_KEYS keyboard enhancement flag (part of Kitty Keyboard Protocol) causes issues on Windows Terminal/conpty. When enabled, certain escape sequences can be misinterpreted as system keyboard shortcuts that trigger control panel applets.
The problematic code (in all TUI variants):
PushKeyboardEnhancementFlags(
KeyboardEnhancementFlags::DISAMBIGUATE_ESCAPE_CODES
| KeyboardEnhancementFlags::REPORT_EVENT_TYPES
| KeyboardEnhancementFlags::REPORT_ALTERNATE_KEYS // <-- PROBLEM
)
Proposed Fix
Conditionally disable REPORT_ALTERNATE_KEYS on Windows using #[cfg(not(windows))]. The other two flags (DISAMBIGUATE_ESCAPE_CODES and REPORT_EVENT_TYPES) are sufficient for Shift+Return functionality.
A PR with this fix is forthcoming.
What version of Codex is running?
Latest main branch (rust-v0.2.0-alpha.2)
What subscription do you have?
N/A - this is a terminal/keyboard handling bug
Which model were you using?
N/A - occurs regardless of model
What platform is your computer?
Windows 11 (Version 10.0.26100.7462) x64
What terminal emulator and version are you using?
Windows Terminal
What issue are you seeing?
When using Codex on Windows, the Mouse Properties control panel dialog (
main.cpl) sometimes opens unexpectedly during normal usage.What steps can reproduce the bug?
The issue is intermittent and depends on specific timing of escape sequences. It occurs during normal TUI usage but is not reliably reproducible on demand.
What is the expected behavior?
The Mouse Properties dialog should never open - Codex should only interact with the terminal, not trigger Windows control panel applets.
Root Cause Analysis
The
REPORT_ALTERNATE_KEYSkeyboard enhancement flag (part of Kitty Keyboard Protocol) causes issues on Windows Terminal/conpty. When enabled, certain escape sequences can be misinterpreted as system keyboard shortcuts that trigger control panel applets.The problematic code (in all TUI variants):
Proposed Fix
Conditionally disable
REPORT_ALTERNATE_KEYSon Windows using#[cfg(not(windows))]. The other two flags (DISAMBIGUATE_ESCAPE_CODESandREPORT_EVENT_TYPES) are sufficient for Shift+Return functionality.A PR with this fix is forthcoming.