Skip to content

[Bug] Auto clipboard copy in TUI prevents manual paste #22030

@gongjieliu

Description

@gongjieliu

Description

OpenCode TUI automatically copies selected text to clipboard (likely via xclip/xsel), but this breaks manual paste functionality because:

  1. On headless servers without X11 display, xclip fails with errors
  2. Even when xclip works, the copied content cannot be pasted in OpenCode dialogs
  3. This makes it impossible to use AI-generated code/response

Environment

  • OpenCode version: TUI
  • Run on server without X11 display

Steps to reproduce

  1. Start OpenCode TUI (likely any platform)
  2. Wait for AI to generate response
  3. Try to select/copy text - it auto-copies
  4. Try to paste - nothing happens

Expected behavior

  • Allow manual copy/paste OR
  • Allow disabling auto-copy OR
  • Fix clipboard integration for server environments

Potential solution

  • Add option to disable auto-copy in config
  • Or improve clipboard handling for headless/server environments
  • Or improve error handling so it doesn't silently break

Metadata

Metadata

Assignees

Labels

coreAnything pertaining to core functionality of the application (opencode server stuff)opentuiThis relates to changes in v1.0, now that opencode uses opentui

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions