Pasted text from a clipboard is shown as "[pasted #2 1+ lines]" instead of inline pasting #2331

Closed
opened 2026-02-16 17:35:09 -05:00 by yindo · 15 comments
Owner

Originally created by @kha84 on GitHub (Oct 29, 2025).

Description

Hello, opencode devs! I've just downloaded and started to familiarize myself with opencode and I immediately stumbled across two issues.

  1. One is being discussed here - https://github.com/sst/opencode/issues/1505 - is that there's no straightforward way to provide multi-line prompts (Ubuntu 24 LTS, default Gnome terminal), apart from CTRL+j

  2. Another is that when I paste some text snippets while composing a prompt, they're pasted like "[pasted #2 1+ lines]" to prompt (instead of a plaintext), which is very annoying.

One might say to overcome both these issues I can prepare my prompts in an external editor - and yes, that is a workaround. But it spoils the overall experience of using the opencode as one and only tool.

OpenCode version

No response

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Originally created by @kha84 on GitHub (Oct 29, 2025). ### Description Hello, opencode devs! I've just downloaded and started to familiarize myself with opencode and I immediately stumbled across two issues. 1) One is being discussed here - https://github.com/sst/opencode/issues/1505 - is that there's no straightforward way to provide multi-line prompts (Ubuntu 24 LTS, default Gnome terminal), apart from CTRL+j 2) Another is that when I paste some text snippets while composing a prompt, they're pasted like "[pasted #2 1+ lines]" to prompt (instead of a plaintext), which is very annoying. One might say to overcome both these issues I can prepare my prompts [in an external editor](https://opencode.ai/docs/tui/#editor) - and yes, that is a workaround. But it spoils the overall experience of using the `opencode` as one and only tool. ### OpenCode version _No response_ ### Steps to reproduce _No response_ ### Screenshot and/or share link _No response_ ### Operating System _No response_ ### Terminal _No response_
yindo added the bug label 2026-02-16 17:35:09 -05:00
yindo closed this issue 2026-02-16 17:35:09 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Oct 29, 2025):

This issue might be a duplicate of existing issues. Please check:

  • #3397: Multi-line paste with Ctrl+Shift+V is pasted as single line - similar pasting issues in TUI
  • #3343: Cannot paste multiple lines in Windows Terminal and VSCode+Powershell - same core problem with multi-line pasting showing placeholders instead of content
  • #1265: Text pasted in previous sessions is replaced by [pasted ... lines] placeholders - same "[pasted #X Y+ lines]" placeholder behavior instead of actual content
  • #1505: shift+enter keybinding not working - related to multi-line input issues you mentioned

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Oct 29, 2025): This issue might be a duplicate of existing issues. Please check: - #3397: Multi-line paste with Ctrl+Shift+V is pasted as single line - similar pasting issues in TUI - #3343: Cannot paste multiple lines in Windows Terminal and VSCode+Powershell - same core problem with multi-line pasting showing placeholders instead of content - #1265: Text pasted in previous sessions is replaced by [pasted ... lines] placeholders - same "[pasted #X Y+ lines]" placeholder behavior instead of actual content - #1505: shift+enter keybinding not working - related to multi-line input issues you mentioned Feel free to ignore if none of these address your specific case.
Author
Owner

@istarkov commented on GitHub (Oct 29, 2025):

You can fix this by adding these lines in your opencode.jsonc

  "experimental": {
    "disable_paste_summary": true,
  },

Anyway it's really strange default behavior and Im also interesting is it intended

@istarkov commented on GitHub (Oct 29, 2025): You can fix this by adding these lines in your opencode.jsonc ```json "experimental": { "disable_paste_summary": true, }, ``` Anyway it's really strange default behavior and Im also interesting is it intended
Author
Owner

@kha84 commented on GitHub (Oct 29, 2025):

Thanks for answering @istarkov! The version is 0.15.23 (as per the GitHub it's the latest one).

How to reproduce is:

  1. copy some small piece of text into a clipboard. In my case it was some points I was making for myself, a sort of TODO list I wanted to give to llm as a prompt:
- don't forget about one thing
- don't forget about the other thing
- do the third thing, but keep in mind the previous two
- also keep in mind that ...
- and consider ...

With this snippet you should be able to reproduce it.

  1. paste the contents of a clipboard to a prompt control (in Ubuntu's 24.04 LTS default Gnome terminal the shortcut is CTRL+SHIFT+v). You'll see the effect:
Image

The interesting fact is - if you copy just first three lines, they are pasted as a normal text. So I suppose this behavior is somewhat dependent on the amount of characters / tokens being pasted.

Image
@kha84 commented on GitHub (Oct 29, 2025): Thanks for answering @istarkov! The version is `0.15.23` (as per the GitHub it's the latest one). How to reproduce is: 1) copy some small piece of text into a clipboard. In my case it was some points I was making for myself, a sort of TODO list I wanted to give to llm as a prompt: ``` - don't forget about one thing - don't forget about the other thing - do the third thing, but keep in mind the previous two - also keep in mind that ... - and consider ... ``` With this snippet you should be able to reproduce it. 2) paste the contents of a clipboard to a prompt control (in Ubuntu's 24.04 LTS default Gnome terminal the shortcut is CTRL+SHIFT+v). You'll see the effect: <img width="901" height="470" alt="Image" src="https://github.com/user-attachments/assets/75ee8aef-9375-4c54-a72b-31ac87d20671" /> The interesting fact is - if you copy just first three lines, they are pasted as a normal text. So I suppose this behavior is somewhat dependent on the amount of characters / tokens being pasted. <img width="901" height="470" alt="Image" src="https://github.com/user-attachments/assets/29133836-aa4a-4c35-a9fb-da690dbd3af9" />
Author
Owner

@rekram1-node commented on GitHub (Oct 29, 2025):

This is intentional behavior, if you submit the prompt it expands it.

In the soon to ship version of opencode using opentui this behavior will be adjusted so that you can expand and edit the contents

@rekram1-node commented on GitHub (Oct 29, 2025): This is intentional behavior, if you submit the prompt it expands it. In the soon to ship version of opencode using opentui this behavior will be adjusted so that you can expand and edit the contents
Author
Owner

@kha84 commented on GitHub (Oct 29, 2025):

Awesome! Thanks a lot for the explanation

@kha84 commented on GitHub (Oct 29, 2025): Awesome! Thanks a lot for the explanation
Author
Owner

@zippeurfou commented on GitHub (Nov 4, 2025):

I actually liked this features but it seems gone with the 1.X release. Was this intended?

@zippeurfou commented on GitHub (Nov 4, 2025): I actually liked this features but it seems gone with the 1.X release. Was this intended?
Author
Owner

@rekram1-node commented on GitHub (Nov 4, 2025):

@zippeurfou are you talking about ability to disable the paste summary?

@rekram1-node commented on GitHub (Nov 4, 2025): @zippeurfou are you talking about ability to disable the paste summary?
Author
Owner

@zippeurfou commented on GitHub (Nov 4, 2025):

@rekram1-node thanks for answering. I meant that I liked the fact that when I was pasting clipboard I would see [pasted ...] and not the raw text. However, now I do see the raw text.

@zippeurfou commented on GitHub (Nov 4, 2025): @rekram1-node thanks for answering. I meant that I liked the fact that when I was pasting clipboard I would see `[pasted ...]` and not the raw text. However, now I do see the raw text.
Author
Owner

@rekram1-node commented on GitHub (Nov 4, 2025):

@zippeurfou hmm what terminal are u in and are u on latest? This doesn't work for u?

https://github.com/user-attachments/assets/58400ede-af19-4dda-a8f8-78d5448a95db

@rekram1-node commented on GitHub (Nov 4, 2025): @zippeurfou hmm what terminal are u in and are u on latest? This doesn't work for u? https://github.com/user-attachments/assets/58400ede-af19-4dda-a8f8-78d5448a95db
Author
Owner

@zippeurfou commented on GitHub (Nov 4, 2025):

No it does not @rekram1-node .
I am on iterm2 on macos
I am on v1.0.20

Image

@zippeurfou commented on GitHub (Nov 4, 2025): No it does not @rekram1-node . I am on iterm2 on macos I am on v1.0.20 ![Image](https://github.com/user-attachments/assets/36a76403-79a6-4a6f-9ec4-3f0087c4b001)
Author
Owner

@rekram1-node commented on GitHub (Nov 4, 2025):

@zippeurfou I think it has a minimum # of lines required before it does that. Try pasting a large chunk of text like a code file or soemthing

@rekram1-node commented on GitHub (Nov 4, 2025): @zippeurfou I think it has a minimum # of lines required before it does that. Try pasting a large chunk of text like a code file or soemthing
Author
Owner

@zippeurfou commented on GitHub (Nov 4, 2025):

Image
@rekram1-node maybe this was a bad example but long text does exactly the same.

@zippeurfou commented on GitHub (Nov 4, 2025): ![Image](https://github.com/user-attachments/assets/53d7c184-7d2b-47ad-b4d4-14e9da8a328b) @rekram1-node maybe this was a bad example but long text does exactly the same.
Author
Owner

@rekram1-node commented on GitHub (Nov 4, 2025):

wow weird

@rekram1-node commented on GitHub (Nov 4, 2025): wow weird
Author
Owner

@rekram1-node commented on GitHub (Nov 4, 2025):

im gonna close this one and open a separate issue for u

@rekram1-node commented on GitHub (Nov 4, 2025): im gonna close this one and open a separate issue for u
Author
Owner

@rekram1-node commented on GitHub (Nov 4, 2025):

disable_paste_summary will be respected in next release

@rekram1-node commented on GitHub (Nov 4, 2025): disable_paste_summary will be respected in next release
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2331