You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
V2/tui/linux: Impossible to select text with the mouse when another session is working on something #54509
If another session is working on something, it's impossible to select text with the mouse (for copying to clipboard) because the top of the terminal is updated, displaying animated tui-graphics. This causes any selection to automatically be cancelled because all of the text in the terminal seems to be updated. If you are extremely quick to select, it may work, but it's not possible in practice for a human.
As a workaround, is it possible to turn off the top bar which displays what the other sessions are terminal working with? Perhaps this is the only way to fix it?
Maybe there's another workaround? Maybe I need to use another type of terminal? I'm just using gnome-terminal now.
Plugins
No plugins installed as far as I know.
OpenCode version
opencode v2.0.26
Steps to reproduce
Start two opencode sessions in two different terminals.
Let the first terminal work on a big job.
In the second terminal, it's now impossible to select text with the mouse (for copying to clipboard) because the top of the terminal is updated, displaying graphics indicating that another session is working on something. This causes any selection to automatically be cancelled because all of the text in the terminal seems to be updated. If you are extremely quick to select, it may work, but it's not possible in practice for a human.
Screenshot and/or share link
Not necessary I think.
Operating System
Terminal runs on Linux fedora 43. This terminal ssh into a macos 26.4 computer running opencode.
Thanks for the report! I tried to reproduce this with OpenCode v2.0.26 (the latest release, since no version was given). I had two OpenCode TUIs open on the same project: one ran a long, slowly streaming response, and the other's tab strip showed that session with its busy spinner. In the second TUI I dragged over some transcript text and held the mouse button. The selection stayed highlighted while the spinner kept animating, and releasing it copied the text as normal. So I couldn't reproduce it with OpenCode's own (default) mouse selection.
My guess is that you're using gnome-terminal's own selection rather than OpenCode's, which gnome-terminal can drop when the screen is redrawn. I couldn't test that here. Could you tell us:
Your version (opencode --version).
How you select: a plain drag, or Shift+drag? Do you have "mouse": false in ~/.config/opencode/cli.json?
When the selection works, does OpenCode show a "Copied to clipboard" toast? (That would mean it's OpenCode's selection, not the terminal's.)
Does it also happen in another terminal, for example kitty, Alacritty or WezTerm?
As a workaround in the meantime, you can try either of these in ~/.config/opencode/cli.json (I haven't confirmed they fix it):
{ "tabs": { "mode": "off" } }
turns off the session tab strip at the top, or
{ "animations": false }
turns off interface animations. With the default mouse settings, plain drag-select in OpenCode then press Ctrl+C (or just release, if copy-on-select is on) should also work.
You can reply here with the details, or edit the issue; if you edit it, please also leave a comment saying you've updated it so we know you're done.
Related issues I found, though none look like the same problem: #51056 (drag-selection freezes the TUI on a VTE-based terminal), #47632 (selection cleared by page up/down keybinds) and #41692 (selection includes the context pane).
Yes, I have "mouse": false in ~/.config/opencode/cli.json . I need to do this because copying to clipboard doesn't work over ssh. (Also, it's more convenient to paste by using the middle-button than to press Ctrl+V/etc.). I tried to set mouse to true though, and then selecting text worked, but as expected, copying to clipboard doesn't work when doing that.
However! Both { "tabs": { "mode": "off" } } and { "animations": false } worked.
Thanks for confirming, and glad it works for you now!
To sum up for anyone who finds this later: with "mouse": false, selection is handled by the terminal (gnome-terminal here), not by OpenCode. When another session is busy, its tab at the top animates and redraws the screen, and that redraw clears the terminal's selection. Either of these settings in ~/.config/opencode/cli.json avoids it:
{ "tabs": { "mode": "off" } }
or
{ "animations": false }
If copying to the clipboard over SSH with mouse capture on is something you'd like to see improved, feel free to open a separate issue for it.
As this is resolved for you, the bot will close this issue in a few days unless you reply that something is still wrong.
Closing this now, since you confirmed it's resolved. To recap: with "mouse": false, gnome-terminal handles the selection itself. When another session is busy, its tab at the top animates and redraws the screen, and that redraw clears the terminal's selection. Setting { "tabs": { "mode": "off" } } or { "animations": false } in ~/.config/opencode/cli.json avoids it. Thanks for the report and for testing the workarounds! If it comes back, or you'd like to raise clipboard copying over SSH, feel free to open a new issue.
Activity
opencode-agent commentedon Oct 11, 2026
Thanks for the report! I tried to reproduce this with OpenCode v2.0.26 (the latest release, since no version was given). I had two OpenCode TUIs open on the same project: one ran a long, slowly streaming response, and the other's tab strip showed that session with its busy spinner. In the second TUI I dragged over some transcript text and held the mouse button. The selection stayed highlighted while the spinner kept animating, and releasing it copied the text as normal. So I couldn't reproduce it with OpenCode's own (default) mouse selection.
My guess is that you're using gnome-terminal's own selection rather than OpenCode's, which gnome-terminal can drop when the screen is redrawn. I couldn't test that here. Could you tell us:
opencode --version)."mouse": falsein~/.config/opencode/cli.json?As a workaround in the meantime, you can try either of these in
~/.config/opencode/cli.json(I haven't confirmed they fix it):{ "tabs": { "mode": "off" } }turns off the session tab strip at the top, or
{ "animations": false }turns off interface animations. With the default mouse settings, plain drag-select in OpenCode then press Ctrl+C (or just release, if copy-on-select is on) should also work.
You can reply here with the details, or edit the issue; if you edit it, please also leave a comment saying you've updated it so we know you're done.
Related issues I found, though none look like the same problem: #51056 (drag-selection freezes the TUI on a VTE-based terminal), #47632 (selection cleared by page up/down keybinds) and #41692 (selection includes the context pane).
kmatheussen commentedon Oct 11, 2026
Yes, I have "mouse": false in ~/.config/opencode/cli.json . I need to do this because copying to clipboard doesn't work over ssh. (Also, it's more convenient to paste by using the middle-button than to press Ctrl+V/etc.). I tried to set mouse to true though, and then selecting text worked, but as expected, copying to clipboard doesn't work when doing that.
However! Both
{ "tabs": { "mode": "off" } }and{ "animations": false }worked.So on my part, the problem is fixed. Thanks!
opencode-agent commentedon Oct 11, 2026
Thanks for confirming, and glad it works for you now!
To sum up for anyone who finds this later: with
"mouse": false, selection is handled by the terminal (gnome-terminal here), not by OpenCode. When another session is busy, its tab at the top animates and redraws the screen, and that redraw clears the terminal's selection. Either of these settings in~/.config/opencode/cli.jsonavoids it:{ "tabs": { "mode": "off" } }or
{ "animations": false }If copying to the clipboard over SSH with mouse capture on is something you'd like to see improved, feel free to open a separate issue for it.
As this is resolved for you, the bot will close this issue in a few days unless you reply that something is still wrong.
opencode-agent commentedon Oct 14, 2026
Closing this now, since you confirmed it's resolved. To recap: with
"mouse": false, gnome-terminal handles the selection itself. When another session is busy, its tab at the top animates and redraws the screen, and that redraw clears the terminal's selection. Setting{ "tabs": { "mode": "off" } }or{ "animations": false }in~/.config/opencode/cli.jsonavoids it. Thanks for the report and for testing the workarounds! If it comes back, or you'd like to raise clipboard copying over SSH, feel free to open a new issue.