When copying 1 line code and pasting to chat with Command + V, it pasts raw text instead of reference. When copying 2 or more lines, Command + V adds reference to those lines like “file.js (15-20)” instead of raw text. Previously it worked fine when i used to copy 1 line code, but after recent update it no longer works. Also, “Add symbol to current/new chat” buttons do not do anything anymore
Steps to Reproduce
Select 1 line of code or partial text from 1 line of code then do “Command” + “V” in agent chat.
Hi @realTime thanks for your post! This is actually working as intended. The copying reference to code is only applicable if it is more than 1 line of code being copied. So if you copy just one line you’ll see the raw text and if you copy more than that you’ll see the reference instead.
But before the last update, if i selected line like this (attached screenshot), it used to show reference. If this is intended behavior then how can i reference 1 line of code in any other way? If i wanted to paste raw text i could just use Command + Shift + V right? Maybe it is better to allow referencing 1 line of code?
You are indeed correct, the behavior of the one-line copying as raw text is new, and it was introduced in a commit in the latest version.
However, you can still have the behavior you’re used to in the past by selecting one line and pressing “Add to Chat, " which will still show as a Reference in the chat rather than Raw text.
@kevinn I can confirm that the old behavior was pasting it as a reference for single line or multi line. If you want raw text then it should be pasted as Command + Shift + V.
But now copying a single line pastes it as raw text which is annoying since if we want raw text we could have pasted using Command + Shift + V instead.
I hope this gets fixed soon as it is very troublesome for my usecase.
Your suggested fix takes too much time as you’d have to select the part of the line before doing CMD + L.
This means you either need a mouse to highlight it or use multiple keyboard keys.
Instead of the old behavior which you could just CMD + C on the current line even without highlighting anything, and directly paste it to the agent.
Like i’ve said, if you want to paste raw then use CMD + SHIFT + V. This makes it more consistent with the behavior even for multiline.
Thanks for following up. It is indeed a change, but it’s not a bug. We have some test cases written to test this behavior (single-line copy-paste is ineligible for the reference copy), so it is not an accident.
Can you elaborate a bit more on the impact to your workflow? I don’t quite understand the impact.
Thanks for the clarification, but I strongly disagree with this change. It’s a clear regression in usability for keyboard-driven workflows.
The previous behavior was simple and consistent:
CMD + C (no selection needed)
CMD + V → reference
CMD + SHIFT + V → raw text
That separation made perfect sense and required zero friction.
Now:
Single-line copy → forced raw text
Reference paste requires extra steps (manual selection or additional commands)
This turns what used to be a 2-keystroke operation into a multi-step process, which is a significant downgrade in efficiency.
More importantly, the current behavior is inconsistent and unpredictable:
CMD + V behaves differently depending on whether it’s single-line or multi-line
This breaks muscle memory and makes the system harder to reason about
The justification that “single-line copy is ineligible for reference” doesn’t align with real usage. In practice, single-line references are one of the most common workflows, especially when iterating with the agent line-by-line.
Also, the suggested workaround (selecting text or using additional commands like CMD + L) is not equivalent:
It requires more key presses or mouse usage
It interrupts flow
It doesn’t scale when doing this repeatedly
This isn’t just a preference issue. It directly impacts speed and usability.
At minimum, there should be:
A way to restore the old behavior, or
A setting to control paste mode (reference vs raw)
Right now, the change removes a highly efficient workflow and replaces it with a slower, less consistent one.
I agree, this change is kinda inconvenient. I usually just click a line (without highlighting anything) and use ctrl C + ctrl V to paste a line reference to the agent, now I have to highlight something and use ctrl L (it doesn’t work if I don’t select anything)
@kevin I agree with @Yohan_Lussiez, @dishang-le and @stephenjason89. Referencing a line using Ctrl+C / Ctrl+V is much easier than using Ctrl+L. With Ctrl+V, you can quickly reposition the reference in your prompt—just delete it, place the cursor where you want, and paste again. With Ctrl+L, however, you need to delete the reference, click the new location in the prompt, reselect the line in the code, and press Ctrl+L again, which is more cumbersome.
In general, the CTRL+C/CTRL+V approach is more convenient than CTRL+L
Thanks for sharing your feedback. I checked the original change here. This was part of a fix for selection pasting in Agents view: copied file selections were not creating reference pills as intended.
As part of that fix, we intentionally scoped automatic reference-pill conversion to multi-line selections, so single-line copies now paste as plain text by design. This keeps the common “copy a small snippet / identifier / command and paste it into chat” workflow from being converted into a reference unexpectedly.
I understand that you became familiar with the prior workflow when referencing a specific line. However, based on the unit test cases that I see, this is an intentional product design choice and not a bug.
I think the logic behind this change is that single-line copies are often tiny things: variable names, commands, URLs, etc. If we were to automatically convert these into references, it might surprise users more than it helps.
I do understand @realTime 's post that the reference makes it easier to move around.
@kevinn I think the reasoning here is flawed, especially for agent workflows.
You mentioned single-line copies are usually small snippets, commands, or identifiers that users want as raw text but in AI/agent workflows, those exact single lines are often what we want referenced:
imports
function calls
conditions
specific bug lines
Also, users already have CMD+SHIFT+V for explicit raw-text paste.
So the change removes a very fast reference workflow while duplicating an already existing raw-paste workflow.
The old behavior was actually more logical:
CMD+V = context/reference-aware paste
CMD+SHIFT+V = raw text paste
Now CMD+V behaves differently depending on line count, which feels inconsistent and breaks muscle memory.
I agree with the feedback of this thread: it’s been a pain for me since that change was introduced: my workaround is to select multi line, and tell the agent which actual line I’m referring to within the set. This is because I very often selected just one line as the “context anchor” and if it’s instead used as a free text instead of real file reference, the agent doesn’t know what I’m talking about in large code bases with lots of files, lots of strings matching the reference. The additional click of “add to chat” is not usable as this is something I do all the time so it’s just adding more pain.
This is single handedly pushing me to codex and IntelliJ because that’s one thing they didn’t have: easy reference of line/multi line. Now that part of this is gone in cursor, well… the pain is in cursor as well, and because it’s more expensive than codex, I’m just gonna use codex more