BUG: command+shift+V does not paste from the global clipboard, but only from the local terminal clipboard in same tab/session #6533

Open
opened 2026-02-16 18:04:30 -05:00 by yindo · 3 comments
Owner

Originally created by @tgrushka on GitHub (Jan 16, 2026).

Originally assigned to: @kommander on GitHub.

Description

commad+shift+V to paste unbracked.

Instead of pasting from the global clipboard, pastes the last string copied from that terminal session only, or nothing.

This issue does not affect command+V bracketed paste, so somehow command+V uses the global clipboard, and command+shift+V uses a "local" (???) clipboard?

Also, there is no way to "unbracket" the pasted text once pasted!!!

I am trying to create a prompt and then fill in file links inside opencode but this cannot currently be achieved because opencode insists on bracketing anything longer than a few words, even a single line.

Plugins

none

OpenCode version

dev branch

Steps to reproduce

  1. Copy text to the global clipboard (usually command+C) from any text editor.
  2. Run opencode in new terminal session.
  3. command+shift+V
  4. Nothing is pasted!
  5. Exit opencode.
  6. Copy some text, anything, from the same terminal window/tab/session.
  7. Run opencode in the same terminal window/tab/session again.
  8. command+shift+V
  9. Voila! Text you just copied from the terminal is pasted.
  10. Go back to your other text editor and copy text again (control-C).
  11. Go back to opencode.
  12. command+shift+V
  13. Text from your other editor is NOT pasted.
  14. Text from prior attempt in step 8 is pasted.

Screenshot and/or share link

Maybe related to #3397?

Operating System

Darwin 25.2.0 arm64 arm

Terminal

iTerm2 but I also tried it in Terminal.app and got same results

Originally created by @tgrushka on GitHub (Jan 16, 2026). Originally assigned to: @kommander on GitHub. ### Description `commad+shift+V` to paste unbracked. Instead of pasting from the global clipboard, pastes the last string copied from that terminal session only, or nothing. This issue does **not** affect `command+V` bracketed paste, so somehow `command+V` uses the global clipboard, and `command+shift+V` uses a "local" (???) clipboard? Also, there is no way to "unbracket" the pasted text once pasted!!! I am trying to create a prompt and then fill in file links inside opencode but this cannot currently be achieved because opencode insists on bracketing anything longer than a few words, even a single line. ### Plugins none ### OpenCode version dev branch ### Steps to reproduce 1. Copy text to the global clipboard (usually `command+C`) from any text editor. 2. Run opencode in new terminal session. 3. `command+shift+V` 4. Nothing is pasted! 5. Exit opencode. 6. Copy some text, anything, from the same terminal window/tab/session. 7. Run opencode in the same terminal window/tab/session again. 8. `command+shift+V` 9. Voila! Text you just copied from the terminal is pasted. 10. Go back to your other text editor and copy text again (`control-C`). 11. Go back to opencode. 12. `command+shift+V` 13. Text from your other editor is NOT pasted. 14. Text from prior attempt in step 8 is pasted. ### Screenshot and/or share link Maybe related to #3397? ### Operating System Darwin 25.2.0 arm64 arm ### Terminal iTerm2 but I also tried it in Terminal.app and got same results
yindo added the opentuibug labels 2026-02-16 18:04:30 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 16, 2026):

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

  • #7297: CLI input issues on WSL Ubuntu - copy/paste not working reliably in terminal prompts
  • #3343: Cannot paste multiple lines in Windows Terminal and VSCode+Powershell
  • #3941: Terminal in JetBrains IDE doesn't work - can't paste multiline commands properly
  • #6072: X Window (xorg) middle-click paste doesn't work - alternative paste mechanisms failing
  • #8038: Windows - cannot type in newline with shift+enter (related shift+modifier key issue)
  • #4046: Shift-return does not input newline on macOS/Ghostty
  • #8926: Starting from v1.1.22, shift+enter and ctrl+enter are not working (regression)
  • #8652: Keyboard shortcuts don't work while Korean IME is active on macOS

This appears to be part of a broader terminal input and keybind handling issue affecting multiple platforms (macOS, Windows, Linux, WSL) with various modifier key combinations (shift+, ctrl+, cmd+) and alternative paste methods.

For keybind-related issues, please also check our pinned keybinds documentation: #4997

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

@github-actions[bot] commented on GitHub (Jan 16, 2026): This issue might be a duplicate of existing issues. Please check: - #7297: CLI input issues on WSL Ubuntu - copy/paste not working reliably in terminal prompts - #3343: Cannot paste multiple lines in Windows Terminal and VSCode+Powershell - #3941: Terminal in JetBrains IDE doesn't work - can't paste multiline commands properly - #6072: X Window (xorg) middle-click paste doesn't work - alternative paste mechanisms failing - #8038: Windows - cannot type in newline with shift+enter (related shift+modifier key issue) - #4046: Shift-return does not input newline on macOS/Ghostty - #8926: Starting from v1.1.22, shift+enter and ctrl+enter are not working (regression) - #8652: Keyboard shortcuts don't work while Korean IME is active on macOS This appears to be part of a broader terminal input and keybind handling issue affecting multiple platforms (macOS, Windows, Linux, WSL) with various modifier key combinations (shift+, ctrl+, cmd+) and alternative paste methods. For keybind-related issues, please also check our pinned keybinds documentation: #4997 Feel free to ignore if none of these address your specific case.
Author
Owner

@justfortheloveof commented on GitHub (Jan 16, 2026):

FYI - You can use this in your config to disable the "bracket" paste:

  "experimental": {
    "disable_paste_summary": true
  },
@justfortheloveof commented on GitHub (Jan 16, 2026): FYI - You can use this in your config to disable the "bracket" paste: ``` "experimental": { "disable_paste_summary": true }, ```
Author
Owner

@berenar commented on GitHub (Jan 22, 2026):

Instead of pasting from the global clipboard, pastes the last string copied from that terminal session only, or nothing.

I don't think this has anything to do with OpenCode, I think this depends on your tmux/terminal/system config.

Also, there is no way to "unbracket" the pasted text once pasted!!!
I am trying to create a prompt and then fill in file links inside opencode but this cannot currently be achieved because opencode insists on bracketing anything longer than a few words, even a single line.

This is a feature that can be disabled like @justfortheloveof mentioned.

I opened an issue about it and implemented a PR to allow to expand ("unbracket") pasted text.

@berenar commented on GitHub (Jan 22, 2026): > Instead of pasting from the global clipboard, pastes the last string copied from that terminal session only, or nothing. I don't think this has anything to do with OpenCode, I think this depends on your tmux/terminal/system config. > Also, there is no way to "unbracket" the pasted text once pasted!!! > I am trying to create a prompt and then fill in file links inside opencode but this cannot currently be achieved because opencode insists on bracketing anything longer than a few words, even a single line. This is a feature that can be disabled like @justfortheloveof [mentioned](https://github.com/anomalyco/opencode/issues/8975#issuecomment-3762100404). I opened [an issue](https://github.com/anomalyco/opencode/issues/8501) about it and implemented [a PR](https://github.com/anomalyco/opencode/pull/8496) to allow to expand ("unbracket") pasted text.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#6533