[BUG] Fullscreen TUI: Chinese IME input dropped/cleared, worse when mouse hovers near title bar

Status Open
Reported on v2.1.239
Maintainer reply None cached
Activity 0 comments · opened Sep 10, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet (closest are #78693, #85290, #87631 — related but not exact duplicates, see below)
  • [x] This is a single bug report
  • [x] I am using the latest version of Claude Code

What's Wrong?

In fullscreen TUI mode, typing Chinese via an IME intermittently gets characters
dropped, or the entire input line gets cleared. Separately, typing is also
interrupted when the mouse cursor is hovering near the terminal window's title
bar (this second trigger is reliably reproducible).

  • Only reproduces in the Claude Code CLI (not claude.ai web), and only with

Chinese IME input.

  • Keyboard hardware ruled out (not key chatter) — confirmed as a CLI

input-handling issue.

  • Intermittent: doesn't fire on every attempt, consistent with a timing/race

condition rather than a deterministic parsing bug.

What Should Happen?

Mouse events during fullscreen TUI mode should never interfere with or corrupt
IME text composition/input in the prompt buffer.

Steps to Reproduce

  1. Start a Claude Code session with fullscreen TUI mode active

("tui": "fullscreen" in settings.json).

  1. Type Chinese text via an IME.
  2. While typing, let the mouse cursor hover near the terminal window's title

bar, or move/scroll the mouse over the terminal window.

  1. Observe dropped characters or the entire input line being cleared.

Hypothesis (unverified by me, but consistent with related issues below)

Fullscreen TUI mode enables mouse event reporting (confirmed via strings in
the bundled claude.exe: \e[?1000h, \e[?1006h, \e[?1007h). Mouse-report
escape sequences and IME composition bytes can land on the same stdin stream;
if the parser mishandles the interleaving/fragmentation, it can either drop
characters or misinterpret bytes as an Escape-Escape sequence, which triggers
the (separately reported, #87631) destructive clear-entire-input behavior.

Related Issues

  • #78693 (open, reproduced by maintainer) — stray SGR mouse-report escape

codes leak into fullscreen TUI input; root cause identified as fragmented
mouse escape sequences being parsed as literal text.

  • #85290 (open, reproduced) — mouse tracking mode left enabled after terminal

handoff, flooding the composer and breaking arrow keys; notes a 2.1.239 fix
for split-mouse-report-as-literal-text, but the underlying mode-imbalance
issue remains open.

  • #87631 (open) — a fast double-Esc destroys the entire prompt with no

recovery; possible destination for misparsed mouse bytes that happen to
resemble Esc-Esc.

None of these three combine fullscreen + Chinese IME input + mouse-near-title-bar

  • whole-buffer-clear, so filing this separately, but they look like the same

underlying mouse-tracking/input-parsing family.

Claude Code Version

2.1.267 (Claude Code)

Platform

Claude subscription

Operating System

Linux (gnome-terminal 3.52.0, VTE 0.76.0), Wayland session

Terminal/Shell

gnome-terminal

View original on GitHub ↗