Cmd+V inserts clipboard text twice in Agents (Glass) prompt input (a → aa)

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 shows aa

Additional observations:

  1. Cmd+Shift+V pastes correctly (once).
  2. 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.
  3. Not caused by IME, extensions, or custom keybindings (verified).

Steps to Reproduce

  1. Open Cursor Agents Window (Glass UI).
  2. Focus the agent prompt input (TipTap / ProseMirror: .ui-prompt-input-editor__input).
  3. Copy a short plain-text string, e.g. a.
  4. Press Cmd+V.
  5. Observe the text appears twice (aa).
  6. 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 aaa

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

Thanks for flagging this @mortytian! This will be fixed in our next release.

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

When pasting text from the clipboard using Cmd+V in the Agents Window chat text area, the pasted content is duplicated (e.g., “hello” becomes “hellohello”). This only affects the Agents Window, the regular chat sidebar in the IDE window works correctly.

Pasting via right-click → Paste and Cmd+Shift+V both work correctly in the Agents Window.

Steps to Reproduce

  1. Copy any text to the clipboard (Cmd+C).
  2. Open the Agents Window in Cursor.
  3. Click into the chat text input area.
  4. Press Cmd+V to paste.
  5. Observe: the clipboard text appears twice, concatenated.

Expected Behavior

The clipboard text should be inserted once.

Operating System

MacOS

Version Information

Version: 3.13.25 (Universal)
VS Code Extension API: 1.128.0
Commit: 31e8d61c448c7472e371505838a0fe34083dad50
Date: 2026-07-28T06:17:45.069Z
Layout: IDE
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

Does this stop you from using Cursor

No - Cursor works, but with this issue

Still broken on **3.14.27** (Aug 4, 2026) — variant: **Cmd+V does nothing at all**

Following up on the fix promised for the next stable release. I’m on a newer build than the original report, but `Cmd+V` is still broken in the Agents Window on macOS.

### Version Information

- **Version:** 3.14.27

- **VS Code Extension API:** 1.128.0

- **Commit:** 047548b00c1a079373d74d00183f32510a4a41e0

- **Date:** 2026-08-04T03:29:11.183Z

- **Layout:** Agent Window (Glass)

- **OS:** Darwin arm64 25.5.0

### Describe the Bug

In the Agents Window prompt input, **Cmd+V has no visible effect** for:

1. **Plain text** copied from outside Cursor (e.g. Notes, browser)

2. **Images** from the clipboard

**Cmd+Shift+V works** for plain text. Right-click → Paste also works for text.

This is a different symptom from the original report (duplicate paste `a` → `aa`), but the same workaround applies and the problematic `execCommand(‘paste’)` path still appears present in `workbench.glass.main.js` on 3.14.27.

### Steps to Reproduce

1. Open Cursor Agents Window (Glass UI).

2. Focus the agent prompt input.

3. Copy plain text from any external app (Cmd+C).

4. Press **Cmd+V** → nothing appears in the input.

5. Press **Cmd+Shift+V** → text pastes correctly.

6. Copy an image to clipboard, press **Cmd+V** → no image attached. Drag-and-drop into the input works.

### Expected Behavior

Cmd+V should paste once (text inline or image attachment).

### Workarounds

- Text: **Cmd+Shift+V**

- Images: drag-and-drop

### Does this stop you from using Cursor

No — workarounds exist, but Cmd+V is muscle memory and currently broken in Agents Window.