Middle-click paste fires twice (on mousedown and mouseup) in VS Code integrated terminal — regression in 2.1.175

Status Fixed / completed
Reported on v2.1.175
Maintainer reply None cached
Activity 4 comments · opened Jun 12, 2026 · closed Jun 12, 2026

Environment:

  • Claude Code version: 2.1.175 (regression — 2.1.173 was fine)
  • OS: Ubuntu 24.04.4 LTS, kernel 6.14.0-24-generic, X11 session
  • Terminal: VS Code 1.123.2 (snap) integrated terminal, TERM=xterm-256color
  • Shell: bash

Description:
After Claude Code auto-updated from 2.1.173 to 2.1.175 (06:20 UTC), middle-mouse-button paste (X11 PRIMARY selection) inside Claude Code's prompt now inserts the clipboard content twice — once on the middle-button press event and again on the release event. This does not happen in a plain shell or other programs in the same VS Code terminal — only within Claude Code's TUI. Reverting to the 2.1.173 binary resolves the issue.

Steps to reproduce:

  1. Select some text elsewhere to populate the X11 PRIMARY selection.
  2. In VS Code's integrated terminal, run claude (v2.1.175).
  3. Middle-click in the prompt input.
  4. Observe the selected text is pasted twice in a row.

Expected: Text is pasted once.

View original on GitHub ↗

4 Comments

pabb85 · 4 months ago

Agh - update. Reverting to v2.1.173 did not fix it either, although it looked like it worked initially.

No issue in CC in a normal term, just within vscode plugin

pabb85 · 4 months ago

Okay so - the vscode integrated terminal by itself just pastes on middle mouse click UP. I think CC is doing the paste on middle mouse click DOWN.

pabb85 · 4 months ago

Fine to close this - the fix is to disable the "Editor: Selection Clipboard" setting within vscode. Pastes just occur on middle click DOWN when this setting is disabled, so no double pasting.

<img width="880" height="172" alt="Image" src="https://github.com/user-attachments/assets/e8a43e13-ad0d-42cf-ba0e-34562ebc7260" />

github-actions[bot] · 2 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.