Opening the editor essentially deletes pasted content #2647

Closed
opened 2026-02-16 17:36:36 -05:00 by yindo · 2 comments
Owner

Originally created by @maxandron on GitHub (Nov 6, 2025).

Originally assigned to: @thdxr on GitHub.

Description

Hello!

I believe this issue existed before the v1 releases as well.
If after pasting content (and seeing [Pasted ~11 lines]), I open the editor - the content in the editor shows the summary ([Pasted ~11 lines]).

There are two separate issues here:
a. I don't have any option to expand or edit pasted content
b. If I edit something else in the editor and close it, the pasted content summary becomes plain text of "[Pasted ~11 lines]" and does not expand to the pasted lines when sending the prompt.

Same thing is happening with images, though of course, the handling should be different

I'm happy to try taking a crack at it.

OpenCode version

v1.0.37

Steps to reproduce

  1. Paste enough content for a summary to occur / paste an image
  2. Open editor with -e
  3. Save an close the editor
  4. Send the prompt
  5. Note that the LLM didn't receive the text/image

Screenshot and/or share link

Image

Operating System

macOS 26.0.1

Terminal

tmux in ghostty

Originally created by @maxandron on GitHub (Nov 6, 2025). Originally assigned to: @thdxr on GitHub. ### Description Hello! I believe this issue existed before the v1 releases as well. If after pasting content (and seeing `[Pasted ~11 lines]`), I open the editor - the content in the editor shows the summary (`[Pasted ~11 lines]`). There are two separate issues here: a. I don't have any option to expand or edit pasted content b. If I edit something else in the editor and close it, the pasted content summary becomes plain text of "[Pasted ~11 lines]" and does not expand to the pasted lines when sending the prompt. Same thing is happening with images, though of course, the handling should be different I'm happy to try taking a crack at it. ### OpenCode version v1.0.37 ### Steps to reproduce 1. Paste enough content for a summary to occur / paste an image 2. Open editor with <leader>-e 3. Save an close the editor 4. Send the prompt 5. Note that the LLM didn't receive the text/image ### Screenshot and/or share link <img width="1194" height="477" alt="Image" src="https://github.com/user-attachments/assets/c2f67c49-c3cc-441b-a46b-233fc571f453" /> ### Operating System macOS 26.0.1 ### Terminal tmux in ghostty
yindo added the opentuibug labels 2026-02-16 17:36:36 -05:00
yindo closed this issue 2026-02-16 17:36:36 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Nov 6, 2025):

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

  • #3484: This describes the exact same problem - pasted text objects not expanding in the editor, causing content to be lost when using the editor integration

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

@github-actions[bot] commented on GitHub (Nov 6, 2025): This issue might be a duplicate of existing issues. Please check: - #3484: This describes the exact same problem - pasted text objects not expanding in the editor, causing content to be lost when using the editor integration Feel free to ignore if none of these address your specific case.
Author
Owner

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

@maxandron sure PR welcome, for the image I dont know if it makes sense to have different behavior when it is opened in the editor but the paste definitely does, i guess if u opened in the editor u could edit the filepath or something? But then youd have to convert it back

The issue of mapping back the attachments is also a good callout tho

@rekram1-node commented on GitHub (Nov 6, 2025): @maxandron sure PR welcome, for the image I dont know if it makes sense to have different behavior when it is opened in the editor but the paste definitely does, i guess if u opened in the editor u could edit the filepath or something? But then youd have to convert it back The issue of mapping back the attachments is also a good callout tho
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2647