codex - 💡(How to fix) Fix Codex Desktop: ESC from CJK IME composition passes through and interrupts the model [3 comments, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#20767Fetched 2026-05-03 04:45:54
View on GitHub
Comments
3
Participants
1
Timeline
6
Reactions
0
Author
Participants
Timeline (top)
commented ×3labeled ×2cross-referenced ×1

Root Cause

This is a problem for Chinese, Japanese, and Korean input flows because Esc is commonly used inside the IME composition lifecycle. While the IME is composing text, Codex Desktop should treat that Esc as consumed by the composition session instead of forwarding it to the model interrupt handler.

RAW_BUFFERClick to expand / collapse

What version of the Codex App are you using?

Codex Desktop 26.429.30905 (2345)

What subscription do you have?

N/A

What platform is your computer?

macOS 26.4.1 (Build 25E253), arm64

What issue are you seeing?

When using a CJK input method in the Codex Desktop composer, pressing Esc to cancel or close an active IME composition is also handled by Codex Desktop as the app-level Esc action. This can accidentally interrupt an in-progress model response.

This is a problem for Chinese, Japanese, and Korean input flows because Esc is commonly used inside the IME composition lifecycle. While the IME is composing text, Codex Desktop should treat that Esc as consumed by the composition session instead of forwarding it to the model interrupt handler.

What steps can reproduce the bug?

  1. Open Codex Desktop on macOS.
  2. Start or keep a Codex model response running so that Esc would normally interrupt it.
  3. Focus the composer input.
  4. Switch to a CJK input method.
  5. Start composing text through the IME.
  6. Press Esc to cancel or close the current IME composition.

What is the expected behavior?

When an IME composition is active, Esc should be handled as an IME composition key only. It should not trigger Codex Desktop's app-level interrupt/stop behavior.

What is the actual behavior?

The Esc key appears to pass through from the active CJK IME composition to Codex Desktop, and Codex Desktop treats it as an interrupt/stop command for the model response.

Additional information

This looks like keyboard event handling should check composition state before treating Esc as a global shortcut. For web/Electron text inputs, the relevant guard is usually whether the input is currently composing, for example via composition events or KeyboardEvent.isComposing, before running the app-level escape handler.

extent analysis

TL;DR

Check the keyboard event handling to ensure it verifies the composition state before treating Esc as a global shortcut.

Guidance

  • Review the keyboard event handling code to determine if it checks the composition state using composition events or KeyboardEvent.isComposing before running the app-level escape handler.
  • Verify that the input method editor (IME) composition state is properly detected and handled to prevent the Esc key from being passed through to Codex Desktop.
  • Consider adding a conditional check to ignore the Esc key press when an IME composition is active, allowing the composition to be cancelled without interrupting the model response.
  • Investigate if Electron's built-in event handling can be utilized to achieve the desired behavior, potentially simplifying the implementation.

Example

// Pseudocode example, actual implementation may vary
if (KeyboardEvent.isComposing) {
  // Ignore Esc key press when IME composition is active
  return;
} else {
  // Handle Esc key press as app-level interrupt/stop command
  handleInterrupt();
}

Notes

The exact implementation details may depend on the specific requirements and constraints of the Codex Desktop application, and additional debugging or testing may be necessary to ensure the fix works as expected.

Recommendation

Apply workaround: Modify the keyboard event handling to check the composition state before treating Esc as a global shortcut, as this approach directly addresses the identified issue and can be implemented without relying on external dependencies or version upgrades.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix Codex Desktop: ESC from CJK IME composition passes through and interrupts the model [3 comments, 1 participants]