[BUG] CJK IME multi-character commit causes text flickering/jumping in Alacritty (bracketed paste mode)

Resolved 💬 4 comments Opened Apr 8, 2026 by bulice Closed May 29, 2026

Description

When using a CJK Input Method Editor (Chinese IME) in Alacritty terminal, committing a multi-character word from the IME candidate list causes visible text flickering/jumping in Claude Code's input area.

Single character input works fine. The issue only occurs when the IME commits 2+ characters at once (e.g., selecting a word like "中国" from candidates).

Root Cause

Alacritty submits IME committed text through bracketed paste mode (wrapping the text in \e[200~...\e[201~ escape sequences). When a multi-character CJK word is committed this way, Claude Code's ink-based TUI appears to handle the bracketed paste event with intermediate re-renders, causing visible jumping/flickering between each character.

This was confirmed by Alacritty maintainer @chrisduerr in https://github.com/alacritty/alacritty/issues/8764:

"Alacritty does submit IME text through bracketed paste mode, so my guess would be that the application is trying to be smart by detecting that and fails horribly to function properly in the process."

Steps to Reproduce

  1. Use Alacritty (v0.17.0) on macOS
  2. Launch claude (Claude Code CLI)
  3. Switch to any Chinese IME (macOS native Pinyin, Sogou, WeChat Input, etc.)
  4. Type pinyin and select a single character → works fine, no flicker
  5. Type pinyin and select a multi-character word (2+ characters) → text visibly jumps/flickers

Expected Behavior

Multi-character IME commits should render smoothly without intermediate flickering, same as single character commits.

Actual Behavior

Each character in the committed word triggers a visible re-render, causing the text to "jump" briefly before settling.

Environment

  • OS: macOS 15 (Apple Silicon)
  • Terminal: Alacritty 0.17.0
  • Shell: fish
  • Claude Code: latest
  • IME: macOS native Pinyin (reproducible with all Chinese IMEs)
  • Multiplexer: tmux 3.6a (also reproduces without tmux)

Notes

  • This does not reproduce in terminals that send IME commits as direct character input (e.g., iTerm2, Terminal.app).
  • Alacritty's approach of using bracketed paste for IME commits is intentional — the fix likely needs to be in how Claude Code's input handler processes bracketed paste events (batching the render instead of re-rendering per character).
  • Related Alacritty issue: https://github.com/alacritty/alacritty/issues/8764

View original on GitHub ↗

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