openai / openai/codex

Windows Terminal Preview duplicates non-ASCII input in Codex TUI under WSL

Open Beginner friendly
#38,923 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug CLI TUI windows-os
Dominant language
Rust
Stars
125k
Forks
19.5k
PR merge metrics
PR metrics pending

Description

Environment

  • Codex CLI: 0.146.0
  • Platform: WSL 2 on Windows
  • Terminal: Windows Terminal Preview 1.25.1912.0
  • Shell: zsh
  • Keyboard layout: Czech

Reproduction

  1. Open Windows Terminal Preview and start a WSL shell.
  2. Run codex and focus the chat composer.
  3. Type a non-ASCII Czech-layout character, for example ě, š, č, ř, ž, ý, á, í, é, ú, ů, §, or '.

Actual behavior

Each affected character is inserted twice. One copy appears on key-down and the second appears when the key is released. This happens only in Codex's TUI composer; the same keyboard and terminal work correctly in the WSL shell and other TUI CLI applications.

Expected behavior

Each keypress should insert exactly one character.

Context

Windows Terminal Preview 1.25's Kitty Keyboard Protocol support fixes important input behavior in Codex, including Ctrl+Backspace word deletion and modifier-aware Enter handling. Disabling keyboard enhancement avoids this duplication, but gives up those improvements, so it is not a viable workaround.

This appears to match the already-written minimal fix in #30480, which removes REPORT_ALTERNATE_KEYS. Its PR description/comment explicitly notes that some Kitty-protocol terminals emit duplicate non-ASCII text when alternate keycodes are requested. That PR was automatically closed after 14 days without review activity, rather than rejected on technical grounds.

Relevant current code: https://github.com/openai/codex/blob/main/codex-rs/tui/src/tui/keyboard_modes.rs

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in codex-rs/tui/src/tui/keyboard_modes.rs and compare the current Kitty Keyboard Protocol settings with the minimal change described in issue #30480. Reproduce the Czech-layout input case in Windows Terminal Preview under WSL, then verify that each listed non-ASCII key produces exactly one character while the existing modifier behavior remains intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, zsh
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
76/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.