Korean IME pre-edit (composition) not visible in idle state (raw mode issue)
Summary
Korean (Hangul) IME composition (pre-edit) is not visible when Claude Code is idle/waiting for input. The composition process only renders correctly when Claude Code is actively outputting (e.g., during the thinking spinner animation).
Environment
- OS: Ubuntu 24.04.4 LTS (X11)
- IME: Fcitx5 + Hangul
- Terminal: GNOME Terminal (default), also reproduced in Kitty 0.32.2
- Claude Code: CLI
Steps to Reproduce
- Launch Claude Code in any terminal
- Wait for the input prompt (idle state, no spinner or output)
- Type Korean text using Fcitx5 Hangul input
- Observe that the Hangul composition intermediate state (e.g., ㅎ → 하 → 한) is not visible — only the final committed character appears
Expected Behavior
The Hangul composition intermediate state (pre-edit) should be visible in real-time as the user types, just like it is in any other text input context.
Actual Behavior
- During Claude Code "thinking" (spinner active): Korean composition renders correctly because the spinner animation causes frequent terminal redraws
- During idle/input waiting state: Korean composition is invisible; only the final completed character appears
Analysis
This appears to be caused by Claude Code's TUI framework (Ink/React) using raw terminal mode. In raw mode, the terminal delegates input handling to the application, and the application is not triggering redraws in response to IME pre-edit events.
All major terminal emulators (GNOME Terminal, Kitty, WezTerm) are designed to render IME pre-edit independently from stdout. However, when the application puts the terminal in raw/alternate screen mode, the terminal's IME rendering layer may be bypassed, and the application becomes responsible for handling IME composition display.
The correlation with the spinner confirms this: when the spinner is active, frequent stdout writes trigger terminal redraws, which incidentally make the IME pre-edit visible. When idle, no redraws occur, so the pre-edit is never displayed.
Suggested Fix
The Ink/React terminal renderer should listen for IME pre-edit/composition events and trigger a redraw cycle, even when there is no other output to render.
Impact
This affects all CJK (Chinese, Japanese, Korean) language users who rely on IME composition input. It makes typing in these languages significantly harder as users cannot see what they are composing until the character is fully committed.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗