Repository navigation
Closed
Labels
bugSomething isn't working
Description
What version of Codex is running?
commit: 8192cf1 (at least)
Which model were you using?
any
What platform is your computer?
macOS 15.6.1, Ghostty 1.1.3 (build 9438), Google 日本語入力 2.30.5590.1
What steps can reproduce the bug?
- Focus a text input/editor with a Japanese IME enabled.
- Start composing text (e.g., type “konnichiha” and convert).
- Observe the preedit/composition string while typing.
- Notice that some characters are missing until you press another key (e.g., space/arrow/any key), after which the missing characters suddenly appear.
What is the expected behavior?
The composition/preedit text updates and renders accurately on every composition event without requiring an extra keypress.
What do you see instead?
The composition text is partially missing or appears one keystroke late; it only updates after the next key input.
Additional information
When typing with a Japanese IME (composition/preedit), parts of the composition string are not rendered until an additional key is pressed. The
composition appears to “lag” by one input, making IME input unreliable.
For reference, applying this patch resolves the issue for me.
diff --git a/codex-rs/tui/src/bottom_pane/chat_composer.rs b/codex-rs/tui/src/bottom_pane/chat_composer.rs
index fa320f9b..ea7be812 100644
--- a/codex-rs/tui/src/bottom_pane/chat_composer.rs
+++ b/codex-rs/tui/src/bottom_pane/chat_composer.rs
@@ -808,6 +808,21 @@ impl ChatComposer {
let has_ctrl_or_alt =
modifiers.contains(KeyModifiers::CONTROL) || modifiers.contains(KeyModifiers::ALT);
if !has_ctrl_or_alt {
+ // Do not treat IME-finalized non-ASCII characters (e.g., Japanese)
+ // as part of the unbracketed paste "burst" detection.
+ // This ensures they render immediately upon confirmation without
+ // waiting for the next key event.
+ if !ch.is_ascii() {
+ self.textarea.input(input);
+ let text_after = self.textarea.text();
+ self.pending_pastes
+ .retain(|(placeholder, _)| text_after.contains(placeholder));
+ // Reset burst-related state to avoid false positives while typing.
+ self.last_plain_char_time = None;
+ self.consecutive_plain_char_burst = 0;
+ self.paste_burst_until = None;
+ return (InputResult::None, true);
+ }
// Update burst heuristics.
match self.last_plain_char_time {
Some(prev) if now.duration_since(prev) <= PASTE_BURST_CHAR_INTERVAL => {Reacted by Makoto Fuchiwaki, Yuta MASANO, tdk-hmatsubara, Goto Hayato, hidaris, Ryo Nagaoka, Kimitaka Watanabe and JiehoonKwak
Metadata
Metadata
Assignees
Labels
bugSomething isn't working
Activity
toda-bps commentedon Aug 27, 2025
As it appears to be fixed in the commit at bd65c4d
joshka-oai commentedon Oct 18, 2025
Closing as you've marked this as fixed - if I've closed by mistake, please reopen.
fix: diff_buffers clear-to-end when deleting wide graphemes (#4921)
fix: diff_buffers clear-to-end when deleting wide graphemes (openai#4921
fix: diff_buffers clear-to-end when deleting wide graphemes (openai#4921
fix: diff_buffers clear-to-end when deleting wide graphemes (openai#4921
fix: diff_buffers clear-to-end when deleting wide graphemes (openai#4921