Korean IME composition window appears at wrong position (bottom-left of terminal)

Status Fixed / completed
Maintainer reply None cached
Activity 15 comments · opened Feb 12, 2026 · closed Mar 24, 2026

Korean IME composition window appears at wrong position (bottom-left of terminal)

Summary

When typing Korean (or other CJK languages) in Claude Code, the IME composition/candidate window renders at the bottom-left corner of the terminal instead of at the cursor position. This makes Korean input extremely difficult — the composing character appears far from where text is being typed.

Environment

  • OS: macOS (Darwin 25.2.0)
  • Claude Code model: Opus 4.6
  • Input method: macOS default Korean input (2-set / du-beol-sik)
  • Terminal: iTerm2 / Terminal.app (reproducible in both)

Steps to Reproduce

  1. Launch Claude Code in a terminal on macOS.
  2. Switch to Korean input method.
  3. Type Korean text in the input prompt (e.g., keystrokes for "한글").
  4. Observe where the IME composition window appears.

Expected Behavior

The IME composition window should appear directly adjacent to the text cursor in the input field.

Actual Behavior

The IME composition window appears at the bottom-left corner of the terminal, completely detached from the input area:

  1. Split attention: The composing syllable (ㅎ → 하 → 한) appears far from where text is inserted.
  2. Disorienting feel: Characters feel "pushed away" or "lagging" due to spatial disconnect.
  3. Affects all Korean input: Korean users all experience this.

Screenshot

<img width="368" height="89" alt="Image" src="https://github.com/user-attachments/assets/2a54d137-b4c7-403c-9f01-51717df2c7bc" />

Technical Analysis

Root Cause

Claude Code uses React Ink, which hides the real terminal cursor and renders a fake cursor via chalk.inverse(). macOS IME relies on the real terminal cursor position to place the composition window. Since the real cursor is hidden, the IME window falls back to position (0,0).

The Fix: Ink's useCursor API

Ink 6.7.0 introduced useCursor (PR #866) which moves the real terminal cursor to specified coordinates after each render:

import { useCursor } from 'ink';
import stringWidth from 'string-width';

const { setCursorPosition } = useCursor();
setCursorPosition({
  x: stringWidth(prompt + textBeforeCursor),
  y: inputRow,
});

Local verification: Tested with ink@6.7.0 + useCursor — IME composition window appears at the correct position. Korean input works as expected.

Related Issues

  • #1547, #2620, #3045, #16372, #19207, #21382

Proposed Fix

  1. Integrate useCursor from ink >=6.7.0 into Claude Code's text input component
  2. Use string-width for CJK-aware cursor column calculation
  3. Show the real terminal cursor alongside the existing visual cursor

Upstream PRs

Reproduction

Available at korean-terminal:

| Script | Description | IME behavior |
|--------|-------------|--------------|
| npm run test1 | Fake cursor (current behavior) | IME at bottom-left (broken) |
| npm run test2 | useCursor with real cursor | IME at correct position (fixed) |
| npm run test3 | Full TextInput + useCursor | IME at correct position (fixed) |

View original on GitHub ↗

15 Comments

github-actions[bot] · 6 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/16372
  2. https://github.com/anthropics/claude-code/issues/19207
  3. https://github.com/anthropics/claude-code/issues/6342

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

subinium · 6 months ago

This is not a duplicate — it is a consolidation with a concrete fix.

The referenced issues (#16372, #19207, #6342) were all closed, but the underlying problem still exists as of today. The IME composition window still appears at the bottom-left corner of the terminal when typing Korean in Claude Code.

What makes this issue different

  1. Reproduction repo: subinium/korean-terminal — three runnable demos (npm run test1/test2/test3) showing the broken vs fixed behavior
  2. Root cause analysis: Traced to Ink hiding the real terminal cursor; IME falls back to position (0,0)
  3. Upstream PRs submitted to fix this at the source:
  1. Verified fix: useCursor (ink >=6.7.0) + stringWidth correctly positions the IME window

Please keep this open as the canonical tracking issue for CJK IME positioning.

myriky · 6 months ago

Reproduction video (macOS, iTerm2, Korean IME)

I recorded a short screen capture demonstrating this issue.

https://github.com/user-attachments/assets/cb1fe7d3-8cd9-4b79-9263-553fcf996f3d

Environment:

  • macOS Sequoia 15.5
  • iTerm2
  • Claude Code v2.1.42
  • Korean (2-Set) IME

What's happening:

  • While composing Hangul characters, the IME candidate window appears at the bottom-left corner of

the terminal instead of next to the actual cursor position.

  • The composing jamo (ㄱ, ㅏ, etc.) flicker and split apart during input, making it very

disorienting — almost like audio feedback/howling on a speakerphone call.

  • This makes Korean input practically unusable without resorting to copy-paste workarounds.

Looking forward to the useCursor fix landing. Thanks for tracking this!

gonnector · 6 months ago

Cross-comparison: Gemini CLI and Codex CLI handle Korean IME correctly

Adding a data point from Windows (MSYS2/bash, Windows Terminal).

Environment:

  • Windows 11 (26200)
  • Windows Terminal + bash (MSYS2)
  • Claude Code v2.1.50
  • Korean (2-Set) IME

Comparison with other AI CLI tools:

| CLI Tool | IME Inline Composition | Jamo visible at cursor |
|----------|----------------------|----------------------|
| Claude Code | No — composition window at bottom-left (0,0) | No |
| Gemini CLI | Yes — inline at cursor position | Yes |
| OpenAI Codex CLI | Yes — inline at cursor position | Yes |

Both Gemini CLI and Codex CLI show real-time jamo composition (ㅎ → 하 → 한) directly at the input cursor. Claude Code is the only one among the three where the composition falls to the bottom-left corner.

Why this matters for prioritization:

This is not an edge case — it affects every Korean-speaking user on every session. Competing CLI tools have already solved this, which makes the UX gap very noticeable in daily use. Gemini CLI addressed this by forking Ink and adding terminalCursorPosition support (google-gemini/gemini-cli#17711). The upstream useCursor hook (ink >=6.7.0) provides a non-fork path to the same fix.

Looking forward to this being resolved. Thanks to @subinium for the thorough root cause analysis and upstream PRs.

bibitto · 6 months ago

Japanese IME too

moonward · 6 months ago

I can confirm this issue also affects Japanese IME input on WezTerm on linux — a terminal emulator with first-class IME support.
Vim and other TUI apps handle inline Japanese input correctly in WezTerm, but Claude Code does not. This makes the problem clearly Claude Code-specific, not a terminal limitation.

I want to also flag a concerning pattern in how this has been handled:

  • #19207 (the primary feature request with a working fix proposal) was closed with a reference to #17127 as "fixed" — but #17127 is about adding a /reload command for config files. It has absolutely nothing to do with IME input. This was either a mistake or the issue was closed without being read.

The fix is well-understood and already available: useCursor from ink >= 6.7.0 has been merged upstream. Competing CLI tools (Gemini CLI, OpenAI Codex CLI, even Open Code) have already solved this. Claude Code is the outlier.

Please don't close this as a duplicate of already-closed issues that were themselves closed incorrectly. This bug is still present and affects all CJK users daily.

HIHOOOOO · 6 months ago

Reproduction on Windows 11 + Windows Terminal

Environment:

  • OS: Windows 11 Home
  • Claude Code: 2.1.55
  • Terminal: Windows Terminal 1.23.x
  • Shell: PowerShell 7
  • Input Method: Windows Korean IME (2-set)

Observed behavior:

Korean IME composition characters appear at the bottom of the Claude Code UI, outside the input area — identical to the behavior described in this issue. The composing syllable is spatially disconnected from the cursor position, making Korean input disorienting.

Screenshot showing Korean characters leaking to the bottom of the UI:

The fix proposed here (integrating useCursor from ink 6.7.0) would resolve this on Windows as well. Upvoting for prioritization.

ilaikim99 · 6 months ago

Claude Code's React Ink TUI hides the real terminal cursor and replaces it with a styled fake one — so the OS IME has no cursor position to anchor to and falls back to (0,0). The dev fix is the useCursor hook from Ink 6.7.0. User workarounds + upstream PR links: https://cacheoverflow.dev/blog/M5yrbtvz

kurohuku7 · 5 months ago

Reproduction on Windows 11 + Google Japanese Input

Environment:

  • OS: Windows 11 Home (26200)
  • Terminal: Windows Terminal
  • Shell: PowerShell 7
  • IME: Google Japanese Input (Google 日本語入力)
  • Claude Code: latest

Specific trigger:

  1. Type Japanese text in the input field
  2. Press Space to enter conversion/candidate selection mode
  3. While still in conversion mode, type any additional character

Observed behavior:

  • The screen freezes briefly
  • The typed character appears as a visual artifact at the bottom-left corner
  • The artifact persists until Ctrl+L or window resize

This is not limited to specific characters — any input during active conversion triggers the freeze + artifact.

Tested Windows Terminal settings (none resolved the issue):

  • experimental.rendering.forceFullRepaint: true
  • useAtlasEngine: false
  • rendering.graphicsAPI: direct3d11

Confirming this affects Japanese IME users on Windows as well. Looking forward to the useCursor fix.

lnto3408 · 5 months ago

Hi team, I'm also experiencing this issue on macOS.

When typing Korean (Hangul) in the Claude Code CLI input field, the IME composition (preedit) text appears at the bottom-left corner of the terminal window instead of inline at the cursor position. Once the composition is committed, the text appears correctly in the input field.

This happens with both 2-Set (두벌식) and 3-Set (세벌식) Korean keyboard layouts, and is not specific to any particular input
method — I've tested with the default macOS Korean IME as well as third-party ones.

Notably, other CLI tools like Gemini CLI handle IME inline composition correctly in the exact same terminal environment, which confirms this is not a terminal limitation but an issue with how Claude Code handles IME input.

Would love to see this fixed — it makes Korean input quite difficult to use as there's no visual feedback at the actual typing position during composition.

lifeiteng · 5 months ago

@qing-ant 问题仍然存在呀,为何关闭

lifeiteng · 5 months ago

when the screen is rotated 90 degrees to the vertical position, the input method has always been displayed at the lower left corner.

<img width="1105" height="1033" alt="Image" src="https://github.com/user-attachments/assets/b2db9e05-ae7e-4080-ac11-d5172a5fd30f" />

myriky · 5 months ago

This is NOT resolved and remains completely unusable for CJK users. @qing-ant, why was this closed as "completed" without an actual fix? bug is still consistently reproducible.

gonnector · 5 months ago

It is not resolved and still reproducible quite clearly. Why is it closed as completed? It is so simple. Please try to type CJK on Codex, Gemini Cli and Claude Code.

github-actions[bot] · 5 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.