[BUG] Cmd+V paste auto-submits message when clipboard content ends with newline

Resolved 💬 3 comments Opened Apr 10, 2026 by zj861222 Closed Apr 13, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

7 ## Description
8
9 When pasting text with Cmd+V in the CLI terminal, if the clipboard content contains a trailing newline character (which is very common when copying from terminals, co
de editors, etc.), the message is automatically submitted without user confirmation.
10
11 This behavior was not present in earlier versions and is very disruptive — it sends incomplete or unintended messages frequently.
12

What Should Happen?

do not auto subbmit the message。It is really stupid

Error Messages/Logs

Steps to Reproduce

13 ## Steps to Reproduce
14
15 1. Copy any text that ends with a newline (e.g., copy a line from a terminal or code editor)
16 2. Start typing a prompt in Claude Code CLI
17 3. Press Cmd+V to paste
18

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.97

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

iTerm2

Additional Information

Description

8
9 When pasting text with Cmd+V in the CLI terminal, if the clipboard content contains a trailing newline character (which is very common when copying from terminals, co
de editors, etc.), the message is automatically submitted without user confirmation.
10
11 This behavior was not present in earlier versions and is very disruptive — it sends incomplete or unintended messages frequently.
12
13 ## Steps to Reproduce
14
15 1. Copy any text that ends with a newline (e.g., copy a line from a terminal or code editor)
16 2. Start typing a prompt in Claude Code CLI
17 3. Press Cmd+V to paste
18
19 Expected: Text is pasted into the input area, waiting for the user to review and press Enter to submit.
20
21 Actual: The message is immediately submitted after pasting, with no chance to review or edit.
22
23 ## Workarounds Attempted
24
25 - Cmd+Shift+V — pastes incorrect content
26 - Shift+Enter (multi-line mode) before pasting — does not prevent auto-submit either
27
28 ## Environment
29
30 - Claude Code version: 2.1.97
31 - OS: macOS (Darwin 23.6.0)
32 - Interface: CLI terminal
33
34 ## Suggestion
35
36 Please add a configuration option (e.g., pasteRequireEnter: true) to disable paste auto-submit behavior, or change the default so that pasted content never triggers a
uto-submit.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗