Windows Chinese IME fails in Codex CLI input until the terminal loses and regains focus

Open 💬 1 comment Opened Apr 25, 2026 by ChriXChan

What version of Codex is running?

codex-cli 0.125.0

What platform is your computer?

Windows 11 x64
Windows Terminal + PowerShell

What issue are you seeing?

When using Codex CLI on Windows with a Chinese IME, the Codex input box sometimes fails to accept Chinese input after startup or after switching input methods.

However, if I switch to another application and then switch back to the Codex CLI terminal window, Chinese IME input starts working again in the same Codex input box.

This makes the issue look related to focus handling or IME context initialization in the Codex CLI TUI.

Steps to reproduce

  1. Open Windows Terminal with PowerShell.
  2. Run codex.
  3. Focus the Codex CLI input box.
  4. Switch to a Chinese IME.
  5. Try to type Chinese text.
  6. Observe that Chinese input does not work correctly.
  7. Switch to another application, then switch back to the Codex terminal.
  8. Try typing Chinese again.

Expected behavior

Chinese IME input should work immediately in the Codex CLI input box after startup, without needing to switch away from and back to the terminal window.

Actual behavior

Chinese IME input fails initially, but starts working after the Codex terminal loses and regains focus.

Workarounds tried

  • codex --no-alt-screen
  • Switching input method with Win + Space
  • Switching Chinese/English mode with Shift

These did not fully resolve the issue. Losing and regaining focus is the only reliable workaround observed so far.

Additional information

This may be related to focus or IME context initialization in the Windows TUI layer.

Possibly related issues:

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗