Where does the bug appear (feature/product)?
Cursor CLI
Describe the Bug
In Cursor Agent CLI (“agent”), when composing Chinese with a Windows CJK IME, the IME candidate / preedit window does not follow the visual input caret inside the Agent CLI prompt.
The candidate window stays anchored to a wrong position (often bottom-left / last real terminal cursor location) instead of the fake caret rendered by the Agent CLI TUI.
English input works. The same IME follows the cursor correctly in a normal fish/shell pane in the same Zellij session under the same Alacritty window — so this is specific to Agent CLI’s TUI cursor management, not the host terminal/IME alone.
Likely root cause (same class as known Ink/TUI IME bugs): Agent CLI hides/moves the real terminal cursor during render and draws a visual “fake” caret, while Windows IME (WeType) anchors the candidate popup to the real terminal cursor rect.
Steps to Reproduce
- On Windows 11, open Alacritty configured to launch WSL → Zellij session (zellij attach --create main).
- In a Zellij pane running fish, start Cursor Agent CLI: agent
- Focus the Agent CLI input line.
- Switch to Chinese IME (WeType / 微信输入法).
- Type pinyin to compose Chinese characters.
- Observe the IME candidate/preedit window position relative to the Agent CLI caret.
- (Control) In a sibling Zellij pane with a normal shell prompt, type with the same IME — candidate window follows the shell cursor correctly.
Expected Behavior
IME preedit text and candidate window should appear adjacent to the Agent CLI input caret, and should move as the caret moves left/right within the input line — same as a normal shell prompt in the same terminal stack.
Operating System
Windows 10/11
Linux
Version Information
CLI:
CLI Version 2026.07.23-e383d2b
Model Auto
Subscription Tier Pro
OS linux (x64)
Shell fish
agent binary:
~/.local/bin/agent → ~/.local/share/cursor-agent/versions/2026.07.23-e383d2b/cursor-agent
Stack versions:
- Alacritty (Windows): 0.17.0 (94e7c88)
- Host IME: WeType (微信输入法), tip 0804:{86598FB9-…}{607FDF85-…}
- WSL: 2.7.10.0
- Guest OS: Ubuntu 26.04 LTS (resolute), kernel 6.18.33.2-microsoft-standard-WSL2
- Zellij: 0.44.3 (session: main)
- fish: 4.2.1
- Windows host: Windows 11 Pro 25H2, build 26200
For AI issues: which model did you use?
N/A (IME / TUI input bug, not model-specific)
For AI issues: add Request ID with privacy disabled
N/A
Additional Information
Full call chain config analysis:
Windows 11
└─ Alacritty 0.17.0
└─ wsl.exe --cd ~ -e /usr/local/bin/zellij-start
└─ zellij attach --create main
└─ fish 4.2.1
└─ agent (Cursor Agent CLI 2026.07.23-e383d2b)
IME composition happens on the Windows host (WeType); Agent CLI runs inside WSL2 under Zellij. Candidate window positioning depends on Alacritty reporting the real VT cursor cell to the Windows IME.
Alacritty (%APPDATA%\alacritty\alacritty.toml) relevant:
- TERM = “xterm-256color”
- shell: wsl.exe --cd ~ -e /usr/local/bin/zellij-start
- font: JetBrainsMono LXGW Merged, size 13
- cursor: Block, blinking Always
- No CJK/IME-specific overrides
zellij-start:
#!/bin/bash
export SHELL=/usr/bin/fish
exec “$HOME/.local/bin/zellij” attach --create main
Zellij (~/.config/zellij/config.kdl) active:
- theme “gruvbox-light”
- default_mode “normal”
- default_shell “fish”
- keybinds clear-defaults=true
- load_plugins { zellij:link }
WSL:
- /etc/wsl.conf: systemd=true, default user manooog
- LANG=C.UTF-8
- No Linux fcitx5/ibus used for this stack (host WeType only)
Cursor CLI config:
- editor.vimMode: false
- display.zenMode: true
- No IME-related CLI setting exists
Why this points at Agent CLI
- Same Alacritty + WeType + WSL + Zellij stack → normal shell OK, Agent CLI broken.
- Pattern matches known TUI/Ink issue: fake caret vs real cursor; IME anchors to real cursor.
- Suggested fix: after each TUI render, move the real terminal cursor (CUP) to the logical input caret cell (CJK-aware width / string-width), optionally with Synchronized Update Mode (CSI ? 2026).
Does this stop you from using Cursor
Sometimes - I can sometimes use Cursor