[BUG] JetBrains reworked terminal duplicate mouse events: links open twice (clicks not de-duplicated like scroll)
Bug
In the JetBrains reworked terminal, a single mouse click is delivered to Claude Code as two click events. Claude Code acts on both, so clicking a URL or file path opens it twice (two browser tabs / two file opens). The same double-delivery affects every click-driven action (e.g. click-to-expand a tool result toggles twice = net no-op).
Claude Code already auto-mitigates the duplicate scroll-wheel events that the JetBrains reworked terminal emits (documented in the fullscreen rendering docs: "the terminal also has scroll-wheel bugs that produce spurious arrow keys and wrong-direction events. Claude Code detects these at runtime and mitigates them automatically"). That mitigation does not extend to click / button events, so clicks still double.
Environment
- Claude Code: 2.1.177
- Renderer: fullscreen (
/tui fullscreen) - IDE: RubyMine 2026.1.3 (Build #RM-261.25134.97), built-in terminal (reworked engine, the only engine on this version)
- OS: Ubuntu 22.04.5 LTS, Linux 6.8.0, X11 session
- Shell: bash
Steps to reproduce
- In RubyMine's built-in terminal, run
claude(fullscreen renderer active). - Get Claude Code to print an
https://URL (or a clickable file path from an Edit/Write result). - Left-click the link once.
Expected: one browser tab / one file open.
Actual: two tabs / two opens. Click-to-expand on a tool result similarly fires twice.
Confirmed it's Claude Code receiving the duplicate, not the IDE
Disabling RubyMine's terminal Highlight hyperlinks (so the IDE itself cannot open URLs) does not fix it — the link still opens twice. With the IDE ruled out as the second opener, both opens originate inside Claude Code from the duplicated event stream.
Related JetBrains tickets (same duplicate-event class)
- IJPL-184803 — terminal sends spurious events for the mouse wheel (Fixed; the scroll variant CC already mitigates).
- IJPL-184467 — Linux middle-click paste fires twice in TUI apps (Submitted/open) — the middle-click variant of the same problem.
- IJPL-232482 — JediTerm SGR mouse / OSC mishandling with Claude Code (open, still present on 2026.1.x).
Suggested fix
Extend the existing JetBrains-specific mouse-event mitigation from scroll events to pointer button (press/release) events: de-duplicate identical click events arriving within a small time + coordinate window when running under the JetBrains terminal.
Workarounds tried (each loses something)
/tui default— stops the duplication (classic renderer doesn't capture mouse), but loses the fixed bottom input/footer and fullscreen UX.CLAUDE_CODE_DISABLE_MOUSE=1— stops it, but disables wheel scrolling inside Claude Code (keyboard scroll only).- Disabling IDE Highlight hyperlinks / Paste on middle-click — doesn't fix link double-open, and breaks those features in every other terminal tab.
No setting keeps fullscreen rendering + wheel scroll + single click simultaneously, because the duplicate events are consumed inside Claude Code.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗