anomalyco / anomalyco/opencode
[Bug] Windows Terminal: Chinese IME stops committing text in the TUI until the IME is restarted
@Hona is already working on this.
Since Aug 24, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
In the TUI prompt, Chinese input works for a while after launch and then stops. The IME candidate window still opens and I can pick a candidate, but the committed text never arrives in the prompt — nothing is inserted. ASCII typing is unaffected, and the same IME keeps working normally at the plain PowerShell prompt in the same Windows Terminal tab, so this is specific to the opencode TUI.
The only thing that recovers it is tearing down the text service: toggling Settings → Time & language → Language & region → Chinese → Microsoft Pinyin → "Use previous version of Microsoft Pinyin IME" restores input immediately. Win+Space to English and back also works. Then it breaks again after some more use. Restarting opencode also buys another working period.
That recovery pattern suggests the composition state tracked in the TUI's stdin handling gets stuck, rather than anything being wrong with the IME itself.
Two things that may be relevant to scoping: I'm on an RDP session (SESSIONNAME=RDP-Tcp#0), and my console codepage is 936 (GBK), not 65001.
Also worth noting: opencode enables the kitty keyboard protocol when the terminal advertises kitty_keyboard, and there is no env var or tui.json option to turn it off, so I couldn't test whether the problem goes away without it. An escape hatch for that would help narrow this down.
#14761 is the same report from other users (four different IMEs: Microsoft Pinyin, Microsoft Wubi, Sogou Wubi, WeChat). It was auto-closed by the stale bot without a fix. Still reproduces on 1.18.21.
Plugins
opencode-mem
OpenCode version
1.18.21
Steps to reproduce
- Windows Terminal + PowerShell, run
opencodein any project. - Switch to Microsoft Pinyin, type Chinese into the prompt — works.
- Keep using the session for a while (send a few prompts, let responses stream).
- Type Chinese again — the candidate window appears, but selecting a candidate inserts nothing.
- Toggle "Use previous version of Microsoft Pinyin IME" (or
Win+Spaceaway and back) → input works again.
Operating System
Windows 11 Pro 25H2, build 26200.9168. Locale zh-CN, display language en-US. RDP session.
Terminal
Windows Terminal 1.24.11911.0, PowerShell 5.1, console codepage 936.
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.
Assessment
This issue has not been assessed yet.