Cursor Agent CLI: CJK IME candidate window does not follow input caret (Alacritty + WSL2 + Zellij)

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

  1. On Windows 11, open Alacritty configured to launch WSL → Zellij session (zellij attach --create main).
  2. In a Zellij pane running fish, start Cursor Agent CLI: agent
  3. Focus the Agent CLI input line.
  4. Switch to Chinese IME (WeType / 微信输入法).
  5. Type pinyin to compose Chinese characters.
  6. Observe the IME candidate/preedit window position relative to the Agent CLI caret.
  7. (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

  1. Same Alacritty + WeType + WSL + Zellij stack → normal shell OK, Agent CLI broken.
  2. Pattern matches known TUI/Ink issue: fake caret vs real cursor; IME anchors to real cursor.
  3. 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

Hey, this is one of the best bug reports I’ve seen. The control test with the adjacent shell panel isolates the issue to the CLI really well, and your root cause analysis is spot on.

In short: the TUI in the Agent CLI draws its own visual caret, but the real terminal cursor ends up somewhere else after rendering. The Windows host IME WeType anchors the candidate window to the real cursor, which is why it’s offset. In a normal shell, the real cursor stays on the prompt, so it looks fine there.

This is a known limitation with non Latin and IME input handling in the CLI, and we’re already tracking it internally. I’ll attach your report to that issue along with the details about candidate window positioning and your suggested CUP based fix. It looks reasonable and low cost. I can’t share a timeline for a fix yet.

Once there’s an update, I’ll reply in the thread.

Describe the Bug

When typing Korean (Hangul) in Cursor Agent CLI on macOS, IME composition does not appear inline at the input caret. The IME preedit window appears at the bottom-left of the screen, composing characters are not shown in the CLI prompt while typing, and text only appears after composition is committed (e.g. pressing Space).

Likely cause: Agent CLI renders a visual fake caret but does not move the real terminal cursor to the logical input position. macOS IME anchors the composition window to the real terminal cursor rect.

Steps to Reproduce

  1. On macOS, open Terminal and run agent (Cursor Agent CLI).
  2. Focus the CLI input prompt (>).
  3. Switch to Korean input source (Hangul).
  4. Type Korean characters (e.g. 안녕하세요).
  5. Observe IME preedit at bottom-left of screen, not at the input caret.
  6. Press Space to commit — only then does text appear in the input line.

Control test: In the same terminal, type Korean in a normal zsh prompt — IME follows the cursor correctly.

Expected Behavior

IME preedit and candidate window should appear adjacent to the Agent CLI input caret, and composing text should be visible inline while typing — same as Codex CLI and normal shell prompts in the same terminal.

Operating System

MacOS

Version Information

CLI Version: 2026.08.11-e8db854
Shell: zsh
Terminal: macOS Terminal.app
OS: macOS Darwin 25.5.0

Additional Information

English/Latin input works normally.
Related report (same root cause): Cursor Agent CLI: CJK IME candidate window does not follow input caret (Alacritty + WSL2 + Zellij)
Suggested fix: after each TUI render, move the real terminal cursor (CUP) to the logical input caret cell with CJK-aware string width.

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor