[BUG] Claude Code (Claude Desktop app): IME composition Enter advances one step too many in code diff inline comment input (consumes IME confirm and comment-edit confirm together)
Summary
In Claude Code running inside the Claude Desktop app, in the code diff inline comment input, a single Enter pressed to confirm a Japanese / CJK IME conversion is consumed as both "IME composition confirm" and "comment-edit confirm" at the same time, advancing the input state one step further than intended.
The target UI surface is the small comment input that appears anchored to a line when you select a line (or range) in a code diff view. It shows a Line N reference label at the top and an Add a comment placeholder in the input — the same UI surface referred to as "code diff inline comments" in #49387.
When used together with a Japanese IME, this input should behave as a three-step Enter flow:
- Enter (1st): confirm the IME composition (e.g.,
nihongo→日本語) - Enter (2nd): confirm the comment edit (lock the comment as a draft anchored to the line)
- Enter (3rd): send the comment
In the current build, however, the first Enter performs ① IME composition confirm and ② comment-edit confirm simultaneously, so the second Enter already sends the comment. The Enter sequence effectively skips one step.
This is the same class of bug (missing composition-aware Enter handling) as #59319, propagated to a UI surface that was not covered by that fix. The main chat input, AskUserQuestion "Other" free-text input, Plan mode inline comment input, and session rename input were all fixed in earlier patches; the same fix has not been propagated to the code diff inline comment input.
Steps to Reproduce
- In Claude Code (Claude Desktop app), open a code diff view (e.g., right after Claude proposes a code change)
- Select a line (or range) in the diff to open the inline comment input — the one with the
Line Nreference label and theAdd a commentplaceholder - Switch to a Japanese IME and type e.g.
nihongo - Press Enter (1st) to confirm the IME composition into 日本語
- Press Enter (2nd)
Expected (the intended three-step flow)
| Enter | Expected behavior |
|---|---|
| 1st | Only confirm the IME composition. The comment edit state stays active. |
| 2nd | Confirm the comment edit (commit the draft anchored to the line). |
| 3rd | Send the comment. |
Actual (the current two-step behavior)
| Enter | Actual behavior |
|---|---|
| 1st | IME composition confirm and comment-edit confirm fire together (the two steps collapse into one). |
| 2nd | The comment is sent immediately. |
As a result, pressing Enter twice while typing Japanese sends a comment that would only be expected to fire on the third Enter.
Cross-check with already-fixed surfaces
On the same build, the following surfaces handle IME composition Enter correctly:
- Main chat input
- AskUserQuestion "Other" free-text input (verified fixed since #27764 / #36537)
- Plan mode inline comment input (fixed in #59319)
- Session rename input (fixed in #59319)
The composition-aware Enter handling exists in the codebase; it just has not been propagated to the code diff inline comment input.
Duplicate check vs. existing issues
I searched for prior reports targeting this specific UI surface and found none. The closest existing issues are listed below and all target different UI surfaces or environments:
| Issue | Target UI | State | Difference from this issue |
|---|---|---|---|
| #59319 | Plan inline comment input + session rename | closed (fixed) | Different UI surface (Plan body / sidebar). This report is the code diff comment field. |
| #36537 | Plan "Revise" popup + AskUserQuestion Other | closed (fixed) | Different UI surface (Revise popup, not the diff-initiated inline comment field). |
| #27764 | AskUserQuestion "Other" | closed (verified fixed in practice) | Different UI surface. |
| #8405 | VS Code extension chat input | closed (fixed) | Different environment (VS Code extension). |
| #42995 | claude.ai/code on Chrome | open | Different environment (Web). |
| #48257 | VS Code integrated terminal (xterm.js) | open | Different environment (TUI). |
| #48209 | CLI slash-command input (Ghostty) | open | Different environment (CLI). |
| #53890 | Korean IME trailing character (CLI) | open | Different environment (CLI). |
No existing issue currently covers the code diff inline comment input in the Claude Desktop app.
Environment
- Claude Code in Claude Desktop app, macOS
- Build: Claude Desktop 1.8555.2 (a476c3), built 2026-05-22T23:04:37.000Z — the latest build at the time of this report
- Japanese IME
The build above already includes the #59319 fix for the Plan inline comment input and session rename input, but the same composition-aware Enter handling has not been propagated to the code diff inline comment input, so the bug reproduces.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗