MoonshotAI / MoonshotAI/kimi-cli
Bug: Thai (and other IME-based) characters duplicated when typing in the prompt on Windows
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 11.4k
- Forks
- 1.3k
- Avg merge
- 9h 47m
- Merged PRs (30d)
- 2
Description
What version of Kimi Code CLI is running?
0.31.1
Which open platform/subscription were you using?
Default (kimi-for-coding)
Which model were you using?
Default model, not changed
What platform is your computer?
Microsoft Windows NT 10.0.26200.0 x64 (Windows 11)
What issue are you seeing?
When typing Thai text in the chat prompt, every character is doubled. Typing English is completely normal.
Example: typing สวัสดี (hello) once produces:
สสววััสสดดีี
The doubling happens at input time (visible in the prompt as you type), before the message is submitted. It affects all Thai characters, including tone marks and vowels:
เเวลวลาาพพิิมมภภาาษาาาไไททยยแแลล้้ววมัมันนเเบบลลเเอองงแแกก้้ยัยังงไไงง
What steps can reproduce the bug?
- Run
kimiin Windows Terminal on Windows 11 - Switch the keyboard layout to Thai (Kedmanee) via Win+Space
- Type any Thai word, e.g.
สวัสดี, in the prompt - Observe that each character is duplicated in the input field
Notes:
- English input is unaffected
- Pasting Thai text (Ctrl+V) works correctly — only live typing duplicates
- Reproduced in Windows Terminal (latest) and the legacy Windows console
What is the expected behavior?
Each keypress should insert the character exactly once, matching the OS/IME output.
Additional information
This looks like the same class of input-handling bug as #851 (special characters broken on Windows) and #2477 (double Enter input) — the prompt appears to be consuming both the key event and the IME-composed character, so each character is inserted twice. This makes the CLI effectively unusable for Thai users; a fix or even a documented workaround would be very appreciated.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source file or test is named. Start by tracing the prompt's Windows input handling and compare key events with IME-composed characters; verify live Thai typing, English typing, and pasted Thai text separately. Done means each Thai character appears once while the existing English and paste behavior remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100