Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
In the Agents (Glass) prompt input, pressing Cmd+V pastes the clipboard content twice.
Examples:
- Copy
a→ paste → input showsaa
Additional observations:
- Cmd+Shift+V pastes correctly (once).
- Undo removes the duplicated paste one insertion at a time (two Undo steps), proving two separate edit transactions, not a single insert of doubled text.
- Not caused by IME, extensions, or custom keybindings (verified).
Steps to Reproduce
- Open Cursor Agents Window (Glass UI).
- Focus the agent prompt input (TipTap / ProseMirror:
.ui-prompt-input-editor__input). - Copy a short plain-text string, e.g.
a. - Press Cmd+V.
- Observe the text appears twice (
aa). - Press Cmd+Z twice — each undo removes one copy.
Operating System
MacOS
Version Information
Version: 3.13.25
VS Code Extension API: 1.128.0
Commit: 31e8d61c448c7472e371505838a0fe34083dad50
Date: 2026-07-28T06:17:45.069Z
Layout: Agent Window
Build Type: Stable
Release Track: Default
Electron: 40.10.3
Chromium: 144.0.7559.236
Node.js: 24.15.0
V8: 14.4.258.32-electron.0
xterm.js: 6.1.0-beta.256
OS: Darwin arm64 25.5.0
Additional Information
Instrumented the Agents Window renderer and captured DOM events during Cmd+V of "a":
| Order | Time | Event | Target | Result |
|---|---|---|---|---|
| 1 | T+0ms | paste |
BR.ProseMirror-trailingBreak |
inserts a |
| 2 | T+15ms | paste |
P (paragraph) |
inserts second a → aa |
Both paste events share the same stack:
Ufn._handleNativeInputShortcut (workbench.glass.main.js)
Ufn._onKeyDown (workbench.glass.main.js)
Fn.capture (workbench.glass.main.js)
In workbench.glass.main.js, Glass keydown handling falls through to:
_handleNativeInputShortcut(t, e) {
// ...
const r = wmg(t, i); // Cmd+V → "paste"
return r !== undefined && e.ownerDocument.execCommand(r)
? (t.preventDefault(), true)
: false;
}
Where:
function wmg(t, e) {
// ...
switch (e) {
case "v":
return "paste";
// ...
}
}
So for Cmd+V, Glass calls document.execCommand('paste') on the TipTap prompt editor.
For Cmd+Shift+V, wmg does not return "paste" (shift branch only special-cases undo/redo for Z), so Glass does not call execCommand('paste'). TipTap’s dedicated shift-paste path runs once — which matches why Cmd+Shift+V works.
Does this stop you from using Cursor
No - Cursor works, but with this issue