Skip to content

tui: cannot select/copy text in VS Code integrated terminal #63753

Closed as not planned

Description

@albertVel

Summary

In the opencode TUI running inside the VS Code integrated terminal, I cannot select text with the mouse, so I can't copy any output (tables, IDs, commands) the assistant prints.

Environment

  • opencode version: 2.2.7
  • OS: macOS (Darwin 25.6.0, arm64)
  • Terminal: VS Code integrated terminal 1.145.2 (TERM=xterm-256color, TERM_PROGRAM=vscode, COLORTERM=truecolor)
  • Shell: /bin/zsh
  • Install/channel: latest
  • Active plugins: 1 local plugin (~/.config/opencode/plugins/postman.ts)

Reproduction

  1. Open VS Code and start opencode in the integrated terminal.
  2. Ask anything that produces output (e.g. a markdown table).
  3. Try to select part of the response by clicking and dragging with the mouse.

Expected Behavior

Text is highlighted and can be copied with Cmd+C (or copied on selection).

Actual Behavior

Nothing gets highlighted - text can't be selected at all, so nothing can be copied.

Additional Context

  • Long sessions produce lots of resource IDs, ARNs and tables that I need to reuse elsewhere; without selection I have to retype them.
  • Not tested yet in other terminals (iTerm2 / Terminal.app) or with Option/Shift+drag.

Activity

  1. opencodejr commented on Nov 13, 2026

    @opencodejr
    Contributor

    Thanks for the clear report! In-app mouse selection is meant to work in the TUI, so a drag that never highlights anything is unexpected. A few details would help us work out what's going on:

    1. Has selection ever worked in this setup, or does it stop after some use (for example after a few copies)?
    2. Was a response streaming, or another session working, while you dragged? Does it also fail when everything is idle?
    3. Without your plugin: does it still happen if you temporarily move ~/.config/opencode/plugins/postman.ts out of the plugins folder and restart opencode?
    4. Config: do you have a cli.json with mouse or terminal settings? If so, please paste those settings (the mouse setting turns terminal mouse capture on or off).
    5. Native selection: does Option+drag (with VS Code's terminal.integrated.macOptionClickForcesSelection enabled) or Shift+drag select text?
    6. Other terminals: does the same thing happen in Terminal.app or iTerm2?

    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.

    These existing issues are related. They're ordered from most to least likely, and none looks exactly the same yet:

  2. opencodejr commented on Nov 13, 2026

    @opencodejr
    Contributor

    We haven't heard back, so I'm closing this for now. Mouse selection is meant to work in the TUI, so a drag that never highlights anything points to something in this setup. We couldn't try to reproduce it without a few details: whether selection ever worked or stops after some use, whether a response was streaming during the drag, whether it still happens with the postman.ts plugin disabled, any mouse or terminal settings in your cli.json, whether Option+drag or Shift+drag works, and whether it also happens in Terminal.app or iTerm2.

    In the meantime, #60602, #61398, #54509 and #51056 cover related selection problems, so one of them may match what you're seeing.

    Thanks for the report! If it still happens, reply here with those details and the issue will be reopened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions