[BUG]Japanese IME kanji conversion clicks trigger unintended command execution
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?
Japanese IME input causes unintended command execution when confirming kanji conversion
Environment
- OS: macOS
- VSCode Version: 1.104.2
- Claude Code Extension Version: 2.0.0
- IME: macOS Japanese Input
Description
When typing in Japanese using the macOS Japanese Input (IME), clicking to confirm kanji conversion is mistakenly interpreted as a command execution in Claude Code, causing unintended actions.
Steps to Reproduce
- Open VSCode with Claude Code extension (v2.0.0) enabled
- Start typing in Japanese using macOS Japanese Input (e.g., typing "jikkou" じっこう)
- When the IME shows conversion candidates, click to select and confirm the kanji conversion (実行)
- The click intended for IME conversion confirmation triggers command execution in Claude Code
Expected Behavior
Clicking during Japanese IME composition should only confirm the kanji conversion and should not trigger any command execution in the Claude Code extension.
Actual Behavior
The click intended for IME conversion confirmation is incorrectly interpreted as a command execution click, causing unintended actions in Claude Code to be executed.
Impact
This makes it extremely difficult for Japanese users to use Claude Code effectively, as any kanji conversion requires clicking, which constantly triggers unintended command executions.
Additional Context
This is a common issue with IME input handling in extensions. The extension should check for IME composition events (compositionstart, compositionupdate, compositionend) to properly distinguish between IME-related clicks and actual user command intentions.
During active IME composition (when isComposing property is true), input events should not be treated as command executions.
What Should Happen?
- User starts typing in Japanese →
compositionstartevent fires
- Extension enters "composition mode"
- All click events during this mode should be ignored for command execution
- User types romaji and converts to kanji →
compositionupdateevents fire
- IME shows conversion candidates
- User clicks on a candidate to select it
- This click should ONLY affect the IME, not trigger any extension commands
- User confirms the final conversion →
compositionendevent fires
- The finalized text (e.g., "実行") is committed to the input field
- Extension exits "composition mode"
- Only after this point should clicks be processed as potential command executions
- User manually submits the command → User presses Enter or clicks a "Send" button
- This is when the command should actually be executed
- This is a separate, intentional action from IME conversion
Error Messages/Logs
Steps to Reproduce
- The click on the kanji conversion candidate is incorrectly interpreted as a command execution click
- Claude Code immediately executes or attempts to process the incomplete input
- This results in unintended command execution or errors
- The user experience is severely disrupted as every kanji conversion triggers unwanted actions
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
2.00
Claude Code Version
1.0.100 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
VS Code integrated terminal
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗