[BUG] CJK IME input not visible during composition in terminal

Resolved 💬 3 comments Opened Jan 31, 2026 by iceliu Closed Feb 4, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Environment

  • Claude CLI version:
  • OS: Ubuntu 24.04
  • Terminal: GNOME Terminal 3.52.0
  • Input Method: ibus + 新酷音 (ibus-chewing)

Issue
When typing CJK characters using an IME, the preedit text (characters being composed) is not visible in the terminal. Text only appears after pressing Enter to confirm.

Expected Behavior
Preedit text should be visible during IME composition, similar to other terminal applications.

Steps to Reproduce

  1. Use ibus-chewing or other CJK input method
  2. Run claude in GNOME Terminal
  3. Try typing Chinese characters
  4. Observe that composition candidates are not visible

What Should Happen?

When typing CJK characters using an Input Method Editor (IME), the preedit/composition text should be visible in real-time as I type, just like in other terminal applications or text editors.

Specifically:

  • The candidate window should appear showing character options
  • The uncommitted text should be displayed inline where the cursor is
  • After pressing Enter or selecting a candidate, the final character should be inserted

This is standard IME behavior that works correctly in most GTK applications including GNOME Terminal itself (outside of Claude CLI).

Error Messages/Logs

Steps to Reproduce

  1. Install ibus-chewing (or any CJK input method) on Ubuntu:
   sudo apt install ibus-chewing
  1. Configure environment variables in ~/.bashrc:
   export GTK_IM_MODULE=ibus
   export QT_IM_MODULE=ibus
   export XMODIFIERS=@im=ibus
  1. Log out and log back in (or run source ~/.bashrc)
  1. Open GNOME Terminal and run Claude CLI:
   claude
  1. Switch to Chinese input method (e.g. using Super+Space)
  1. Try typing Chinese characters (e.g. type "ni hao" to input "你好")
  1. Observe: No preedit text or candidate window is visible while composing. The characters only appear after pressing Enter/Space to commit.

Workaround

Currently, the only workaround is to type Chinese text in another application and paste it into Claude CLI using Ctrl+Shift+V.

Additional Context

This issue likely affects all CJK users who rely on IME for text input. The problem appears to be related to how Claude CLI handles readline input, which doesn't properly support IME preedit functionality.

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

v2.1.27

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Xterm

Additional Information

_No response_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗