You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
IME candidate window is misplaced, invisible, or detaches in CJK (Japanese) input #1698
When using Japanese IME input in Copilot CLI, the candidate suggestion popup does not appear immediately below the input box as expected.
Instead, the IME preedit/candidate window appears detached from the main interface (or otherwise fails to track the input line), making Japanese/CJK input difficult to use in Copilot CLI.
This is the same phenomenon as reported in other ink-based CLIs, such as Gemini CLI and Claude Code:
While composing Japanese text (e.g., typing “こんにちは”), the IME candidate / conversion UI appears as a detached floating popup near the bottom-left of the terminal window rather than being positioned directly under the Copilot CLI input line.
This makes the IME experience confusing and makes it harder to input Japanese/CJK text in the Copilot CLI prompt.
Gemini CLI (fixed / expected):
Under the same environment and IME usage, the IME candidate / conversion UI behaves as expected (i.e., it appears in the correct place relative to the input line and is usable).
Affected version
GitHub Copilot CLI 0.0.418.
Steps to reproduce the behavior
Start Copilot CLI in interactive mode
Use Japanese (or any CJK) IME in your OS
Try to input Japanese text. Observe that the IME candidate popup does not appear below the input box.
Input suggestions may instead appear detached (floating or elsewhere), or not at all. Composition buffer/preedit is not displayed in line.
Expected behavior
When inputting CJK text using an IME, the candidate window and composition buffer (preedit) should appear directly under the CLI input field, and input should be usable and perform as expected (same as native terminal apps like bash/zsh/vim).
Additional observation: IME preedit renders at the terminal's last write position, not the input cursor
I can confirm this issue on VS Code's integrated terminal on Windows as well. Through testing, I identified a consistent pattern in where the IME preedit/candidate window appears.
Finding
The IME preedit text is rendered at the terminal's internal cursor position (i.e., wherever the last terminal write operation left the cursor), rather than at the actual input line cursor position.
I tested three scenarios, all typing the same Japanese text "こんにちは":
In all three cases, the IME candidate window and preedit text appeared at the position of the last rendered text on screen, never at the input prompt where the user is actually typing.
Impact on VS Code integrated terminal
When the IME preedit appears near the right edge of the status line (Scenario 1, the default), the preedit text extends beyond the terminal width, causing the entire display to shift right and clip the left side of the terminal content. This makes the CLI essentially unusable for CJK input in VS Code's integrated terminal, as the user loses visibility of both the input prompt and the left portion of the screen.
Screenshots
Screenshot 1 — Default state: preedit appears after status info (bottom-right), display area shifts right
Screenshot 2 — After /on-air: preedit appears after the first output line ending with "skills"
Screenshot 3 — After focusing input box: preedit appears after footer "switch mode"
Possible root cause (speculation)
It looks like the TUI framework may not be moving the terminal cursor back to the input line position after rendering the full screen. The IME subsystem (on both Windows and macOS) typically uses the terminal's reported cursor position to place the composition window. If the cursor is left wherever the last write ended (e.g., the status bar or footer), the IME window would appear there instead of at the input prompt.
This might be consistent with how Gemini CLI had the same issue and fixed it — possibly by ensuring the terminal cursor is repositioned to the input line after each render cycle.
Environment
OS: Windows (VS Code integrated terminal)
Copilot CLI: 0.0.420
IME: Microsoft IME (Japanese)
Reacted by Kent Matsuura, Toshinori Sugita, Kazuma Muramatsu, Maki Nagase, Jumpei Yamashita, Shodai Ikebe, hikkie3110, Yuki Nakazato, Issei Hiraoka, Kazuki Ota and 15 more
@devm33 Thank you for the fix in v0.0.422-1! The IME candidate window positioning is now correct in most environments I tested.
However, I found that the issue remains unresolved in one specific environment: Windows (native process) + VS Code integrated terminal.
Test Results (v0.0.422-1)
OS
Terminal
IME
Result
macOS
Ghostty
macOS standard IME
✅ Fixed
macOS
VS Code integrated terminal
macOS standard IME
✅ Fixed
Windows
Windows Terminal
Microsoft IME
✅ Fixed
WSL
Windows Terminal
Microsoft IME
✅ Fixed
WSL
VS Code integrated terminal
Microsoft IME
✅ Fixed
Windows (native)
VS Code integrated terminal
Microsoft IME
❌ Not fixed
For reference, all of these tests were run with --alt-screen on.
Observations
The key pattern is:
VS Code terminal itself is not the issue — it works on macOS and WSL
Windows itself is not the issue — it works on Windows Terminal
The problem is specific to running as a native Windows process inside VS Code's terminal
WSL + VS Code terminal works because VS Code's remote server uses a Linux PTY (bypassing ConPTY), whereas native Windows uses ConPTY as the PTY backend for xterm.js.
Possible upstream factor (speculation)
This may be related to how ConPTY synchronizes cursor position with xterm.js. There are existing upstream issues that describe similar symptoms:
microsoft/vscode#282621 — IME composition text mispositioned in VS Code terminal (labeled as upstream)
microsoft/terminal#19926 — ConPTY cursor position desync on unrecognized VT sequence passthrough
I'm not certain whether this is something that can be addressed on the Copilot CLI side or if it requires upstream fixes. Would it be worth reopening this issue or creating a new one to track this specific environment?
Thank you for releasing v0.0.422! However, contrary to @torumakabe's test results, the issue has not been resolved in my Windows Terminal (WSL) environment. I believe this is reproducible as I have tried it on several Windows terminals. Are other users experiencing similar issues?
Hi @itchenfei and @MtkN1 sorry I should have specified, the fix was only able to be applied to the alt-screen experience. Please run (once) with --alt-screen to enable. We are working to make this the default rendering experience.
@torumakabe looking through the linked issues if the problem you're seeing on Windows in VS Code's terminal is the same then likely need to wait for upstream xtermjs/xterm.js#5616 to be fixed.
Reacted by Toru Makabe, CrazyZhang, Kent Matsuura and itchenfei
Activity
torumakabe commentedon Feb 28, 2026
Additional observation: IME preedit renders at the terminal's last write position, not the input cursor
I can confirm this issue on VS Code's integrated terminal on Windows as well. Through testing, I identified a consistent pattern in where the IME preedit/candidate window appears.
Finding
The IME preedit text is rendered at the terminal's internal cursor position (i.e., wherever the last terminal write operation left the cursor), rather than at the actual input line cursor position.
I tested three scenarios, all typing the same Japanese text "こんにちは":
reqs.こんにちは(bottom-right — see impact note below)/on-air(status info hidden)skillsこんにちは(after "Environment loaded: 3 custom instructions, 10 agents, 3 skills")modeこんにちは(after "shift+tab switch mode")In all three cases, the IME candidate window and preedit text appeared at the position of the last rendered text on screen, never at the input prompt where the user is actually typing.
Impact on VS Code integrated terminal
When the IME preedit appears near the right edge of the status line (Scenario 1, the default), the preedit text extends beyond the terminal width, causing the entire display to shift right and clip the left side of the terminal content. This makes the CLI essentially unusable for CJK input in VS Code's integrated terminal, as the user loses visibility of both the input prompt and the left portion of the screen.
Screenshots
Screenshot 1 — Default state: preedit appears after status info (bottom-right), display area shifts right
Screenshot 2 — After
/on-air: preedit appears after the first output line ending with "skills"Screenshot 3 — After focusing input box: preedit appears after footer "switch mode"
Possible root cause (speculation)
It looks like the TUI framework may not be moving the terminal cursor back to the input line position after rendering the full screen. The IME subsystem (on both Windows and macOS) typically uses the terminal's reported cursor position to place the composition window. If the cursor is left wherever the last write ended (e.g., the status bar or footer), the IME window would appear there instead of at the input prompt.
This might be consistent with how Gemini CLI had the same issue and fixed it — possibly by ensuring the terminal cursor is repositioned to the input line after each render cycle.
Environment
devm33 commentedon Mar 4, 2026
Thanks for reporting! This should be fixed in the next release.
torumakabe commentedon Mar 6, 2026
@devm33 Thank you for the fix in v0.0.422-1! The IME candidate window positioning is now correct in most environments I tested.
However, I found that the issue remains unresolved in one specific environment: Windows (native process) + VS Code integrated terminal.
Test Results (v0.0.422-1)
For reference, all of these tests were run with --alt-screen on.
Observations
The key pattern is:
WSL + VS Code terminal works because VS Code's remote server uses a Linux PTY (bypassing ConPTY), whereas native Windows uses ConPTY as the PTY backend for xterm.js.
Possible upstream factor (speculation)
This may be related to how ConPTY synchronizes cursor position with xterm.js. There are existing upstream issues that describe similar symptoms:
I'm not certain whether this is something that can be addressed on the Copilot CLI side or if it requires upstream fixes. Would it be worth reopening this issue or creating a new one to track this specific environment?
Environment
MtkN1 commentedon Mar 6, 2026
Thank you for releasing v0.0.422! However, contrary to @torumakabe's test results, the issue has not been resolved in my Windows Terminal (WSL) environment. I believe this is reproducible as I have tried it on several Windows terminals. Are other users experiencing similar issues?
itchenfei commentedon Mar 6, 2026
Still have this issue. Microsoft Pinyin
20260306-114335.mp4
devm33 commentedon Mar 7, 2026
Hi @itchenfei and @MtkN1 sorry I should have specified, the fix was only able to be applied to the alt-screen experience. Please run (once) with --alt-screen to enable. We are working to make this the default rendering experience.
@torumakabe looking through the linked issues if the problem you're seeing on Windows in VS Code's terminal is the same then likely need to wait for upstream xtermjs/xterm.js#5616 to be fixed.