[BUG] ESC key submits incomplete input when using Chinese IME

Resolved 💬 3 comments Opened Dec 24, 2025 by GeekRicardo Closed Feb 6, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

When using Chinese IME (e.g., Sougou) in Claude Code VSCode extension, pressing ESC to cancel/clear input during IME composition submits the incomplete text to the LLM instead of properly canceling the input.

Environment:

  • Windsurf version: [ 1.12.47]
  • Claude Code extension version: [v2.0.75]
  • OS: macOS
  • Chinese IME: Sougou.

What Should Happen?

When ESC is pressed during IME composition (while typing Chinese characters), the IME composition should be cancelled and the input field should be cleared. No text should be submitted to the LLM until the user explicitly confirms or the IME composition is completed naturally.

Expected Behavior:
ESC should cancel the IME composition (clear the in-progress input), not submit partial text.

Actual Behavior:
Text that was already typed before the IME composition completes gets submitted, resulting in incomplete/invalid content sent to LLM.

Error Messages/Logs

Steps to Reproduce

  1. Trigger a user input dialog in VSCode (e.g., agent confirmation)
  2. Type text using Chinese IME (e.g., "测试中文")
  3. Press ESC before finishing the composition
  4. Result: Incomplete input is submitted to LLM

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.0.76 (Claude Code)

Platform

Other

Operating System

macOS

Terminal/Shell

VS Code integrated terminal

Additional Information

_No response_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗